From f78684490a3bc1f5f84bfface11de5f8638b5272 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 14 Mar 2025 03:08:57 +0000 Subject: [PATCH] CodeGen from PR 32938 in Azure/azure-rest-api-specs Merge 0a04a5454a0f5616f7cf7d6e728c8d0b7a8c12ba into 535377f6ef91e9d847bbee77d55871eb8b37b7b2 --- ...anager.CommonEdgeSiteManagerOperations.sln | 56 + .../CHANGELOG.md | 11 + .../Directory.Build.props | 6 + .../README.md | 80 + ....CommonEdgeSiteManagerOperations.net8.0.cs | 0 ...dgeSiteManagerOperations.netstandard2.0.cs | 0 .../assets.json | 7 + ...onEdgeSiteManagerOperations.Samples.csproj | 13 + ...ger.CommonEdgeSiteManagerOperations.csproj | 8 + .../src/Generated/ProviderConstants.cs | 16 + .../src/Properties/AssemblyInfo.cs | 11 + ...mmonEdgeSiteManagerOperations.Tests.csproj | 8 + ...SiteManagerOperationsManagementTestBase.cs | 45 + ...agerOperationsManagementTestEnvironment.cs | 11 + .../tsp-location.yaml | 4 + .../ci.mgmt.yml | 26 + .../Configuration.json | 13 + .../tsp-location.yaml | 4 +- .../tspCodeModel.json | 37370 +++++++++ .../Azure.ResourceManager.Contoso.sln | 56 + .../CHANGELOG.md | 11 + .../Directory.Build.props | 6 + .../Azure.ResourceManager.Contoso/README.md | 80 + .../Azure.ResourceManager.Contoso.net8.0.cs | 131 + ....ResourceManager.Contoso.netstandard2.0.cs | 131 + .../Azure.ResourceManager.Contoso/assets.json | 7 + ...ure.ResourceManager.Contoso.Samples.csproj | 13 + .../Samples/Sample_EmployeeCollection.cs | 206 + .../Samples/Sample_EmployeeResource.cs | 119 + .../Sample_SubscriptionResourceExtensions.cs | 50 + .../src/Azure.ResourceManager.Contoso.csproj | 8 + .../src/Generated/ArmContosoModelFactory.cs | 54 + .../src/Generated/EmployeeCollection.cs | 494 + .../Generated/EmployeeData.Serialization.cs | 178 + .../src/Generated/EmployeeData.cs | 83 + .../EmployeeResource.Serialization.cs | 26 + .../src/Generated/EmployeeResource.cs | 698 + .../Generated/Extensions/ContosoExtensions.cs | 219 + .../Extensions/MockableContosoArmClient.cs | 49 + .../MockableContosoResourceGroupResource.cs | 105 + .../MockableContosoSubscriptionResource.cs | 102 + .../src/Generated/Internal/Argument.cs | 129 + .../Internal/ChangeTrackingDictionary.cs | 167 + .../Generated/Internal/ChangeTrackingList.cs | 153 + .../Internal/ModelSerializationExtensions.cs | 399 + .../src/Generated/Internal/Optional.cs | 51 + .../Internal/Utf8JsonRequestContent.cs | 55 + .../ContosoArmOperation.cs | 94 + .../ContosoArmOperationOfT.cs | 100 + .../EmployeeOperationSource.cs | 36 + .../EmployeeListResult.Serialization.cs | 151 + .../Generated/Models/EmployeeListResult.cs | 80 + .../EmployeeProperties.Serialization.cs | 174 + .../Generated/Models/EmployeeProperties.cs | 77 + .../src/Generated/Models/ProvisioningState.cs | 66 + .../src/Generated/ProviderConstants.cs | 16 + .../RestOperations/EmployeesRestOperations.cs | 731 + .../src/Properties/AssemblyInfo.cs | 11 + ...Azure.ResourceManager.Contoso.Tests.csproj | 8 + .../tests/ContosoManagementTestBase.cs | 45 + .../tests/ContosoManagementTestEnvironment.cs | 11 + .../tsp-location.yaml | 4 + sdk/contoso/ci.mgmt.yml | 26 + .../Azure.ResourceManager.DatabaseWatcher.sln | 56 + .../CHANGELOG.md | 11 + .../Directory.Build.props | 6 + .../README.md | 80 + ....ResourceManager.DatabaseWatcher.net8.0.cs | 691 + ...eManager.DatabaseWatcher.netstandard2.0.cs | 691 + .../assets.json | 7 + ...urceManager.DatabaseWatcher.Samples.csproj | 13 + .../Samples/Sample_AlertRuleResource.cs | 113 + .../Sample_AlertRuleResourceCollection.cs | 200 + .../Sample_HealthValidationCollection.cs | 160 + .../Sample_HealthValidationResource.cs | 81 + .../Sample_SharedPrivateLinkResource.cs | 116 + ...ple_SharedPrivateLinkResourceCollection.cs | 203 + .../Sample_SubscriptionResourceExtensions.cs | 50 + .../Samples/Sample_TargetCollection.cs | 200 + .../Samples/Sample_TargetResource.cs | 113 + .../Samples/Sample_WatcherCollection.cs | 206 + .../Samples/Sample_WatcherResource.cs | 172 + ...ure.ResourceManager.DatabaseWatcher.csproj | 8 + .../AlertRuleResource.Serialization.cs | 26 + .../src/Generated/AlertRuleResource.cs | 355 + .../Generated/AlertRuleResourceCollection.cs | 497 + .../AlertRuleResourceData.Serialization.cs | 155 + .../src/Generated/AlertRuleResourceData.cs | 75 + .../ArmDatabaseWatcherModelFactory.cs | 312 + .../Extensions/DatabaseWatcherExtensions.cs | 295 + .../MockableDatabaseWatcherArmClient.cs | 97 + ...bleDatabaseWatcherResourceGroupResource.cs | 105 + ...ableDatabaseWatcherSubscriptionResource.cs | 102 + .../Generated/HealthValidationCollection.cs | 395 + .../HealthValidationData.Serialization.cs | 155 + .../src/Generated/HealthValidationData.cs | 75 + .../HealthValidationResource.Serialization.cs | 26 + .../src/Generated/HealthValidationResource.cs | 255 + .../src/Generated/Internal/Argument.cs | 129 + .../Internal/ChangeTrackingDictionary.cs | 167 + .../Generated/Internal/ChangeTrackingList.cs | 153 + .../Internal/ModelSerializationExtensions.cs | 399 + .../src/Generated/Internal/Optional.cs | 51 + .../Internal/Utf8JsonRequestContent.cs | 55 + .../DatabaseWatcherArmOperation.cs | 94 + .../DatabaseWatcherArmOperationOfT.cs | 100 + .../HealthValidationOperationSource.cs | 36 + ...haredPrivateLinkResourceOperationSource.cs | 36 + .../WatcherOperationSource.cs | 36 + .../Models/AlertRuleCreationProperty.cs | 51 + ...ertRuleResourceListResult.Serialization.cs | 151 + .../Models/AlertRuleResourceListResult.cs | 80 + ...ertRuleResourceProperties.Serialization.cs | 180 + .../Models/AlertRuleResourceProperties.cs | 106 + .../DatabaseWatcherProvisioningState.cs | 54 + .../Models/Datastore.Serialization.cs | 192 + .../src/Generated/Models/Datastore.cs | 111 + ...ealthValidationListResult.Serialization.cs | 151 + .../Models/HealthValidationListResult.cs | 80 + ...ealthValidationProperties.Serialization.cs | 193 + .../Models/HealthValidationProperties.cs | 95 + .../src/Generated/Models/KustoOfferingType.cs | 54 + .../Models/ManagedServiceIdentityType.cs | 57 + .../ManagedServiceIdentityV4.Serialization.cs | 183 + .../Models/ManagedServiceIdentityV4.cs | 86 + .../Models/ResourceProvisioningState.cs | 54 + ...ateLinkResourceListResult.Serialization.cs | 151 + .../SharedPrivateLinkResourceListResult.cs | 80 + ...ateLinkResourceProperties.Serialization.cs | 190 + .../SharedPrivateLinkResourceProperties.cs | 102 + .../Models/SharedPrivateLinkResourceStatus.cs | 57 + ...asticPoolTargetProperties.Serialization.cs | 182 + .../SqlDbElasticPoolTargetProperties.cs | 64 + ...eDatabaseTargetProperties.Serialization.cs | 173 + .../SqlDbSingleDatabaseTargetProperties.cs | 57 + .../SqlMiTargetProperties.Serialization.cs | 189 + .../Generated/Models/SqlMiTargetProperties.cs | 61 + .../Models/TargetAuthenticationType.cs | 51 + .../Models/TargetListResult.Serialization.cs | 151 + .../src/Generated/Models/TargetListResult.cs | 80 + .../Models/TargetProperties.Serialization.cs | 133 + .../src/Generated/Models/TargetProperties.cs | 97 + .../UnknownTargetProperties.Serialization.cs | 148 + .../Models/UnknownTargetProperties.cs | 33 + .../Models/ValidationIssue.Serialization.cs | 211 + .../src/Generated/Models/ValidationIssue.cs | 101 + .../src/Generated/Models/ValidationStatus.cs | 63 + .../Models/VaultSecret.Serialization.cs | 155 + .../src/Generated/Models/VaultSecret.cs | 74 + .../Models/WatcherListResult.Serialization.cs | 151 + .../src/Generated/Models/WatcherListResult.cs | 80 + .../Models/WatcherPatch.Serialization.cs | 174 + .../src/Generated/Models/WatcherPatch.cs | 74 + .../Models/WatcherProperties.Serialization.cs | 178 + .../src/Generated/Models/WatcherProperties.cs | 78 + .../src/Generated/Models/WatcherStatus.cs | 60 + .../WatcherUpdateProperties.Serialization.cs | 148 + .../Models/WatcherUpdateProperties.cs | 70 + .../src/Generated/ProviderConstants.cs | 16 + .../AlertRuleResourcesRestOperations.cs | 523 + .../HealthValidationsRestOperations.cs | 415 + ...haredPrivateLinkResourcesRestOperations.cs | 513 + .../RestOperations/TargetsRestOperations.cs | 523 + .../RestOperations/WatchersRestOperations.cs | 895 + ...SharedPrivateLinkResource.Serialization.cs | 26 + .../Generated/SharedPrivateLinkResource.cs | 347 + .../SharedPrivateLinkResourceCollection.cs | 493 + ...edPrivateLinkResourceData.Serialization.cs | 155 + .../SharedPrivateLinkResourceData.cs | 75 + .../src/Generated/TargetCollection.cs | 497 + .../src/Generated/TargetData.Serialization.cs | 155 + .../src/Generated/TargetData.cs | 83 + .../Generated/TargetResource.Serialization.cs | 26 + .../src/Generated/TargetResource.cs | 355 + .../src/Generated/WatcherCollection.cs | 494 + .../Generated/WatcherData.Serialization.cs | 194 + .../src/Generated/WatcherData.cs | 87 + .../WatcherResource.Serialization.cs | 26 + .../src/Generated/WatcherResource.cs | 1151 + .../src/Properties/AssemblyInfo.cs | 11 + ...sourceManager.DatabaseWatcher.Tests.csproj | 8 + .../DatabaseWatcherManagementTestBase.cs | 45 + ...atabaseWatcherManagementTestEnvironment.cs | 11 + .../tsp-location.yaml | 4 + sdk/databasewatcher/ci.mgmt.yml | 26 + .../Configuration.json | 12 + .../tsp-location.yaml | 5 +- .../tspCodeModel.json | 24645 ++++++ ...urceManager.DevOpsInfrastructure.net8.0.cs | 124 + ...ger.DevOpsInfrastructure.netstandard2.0.cs | 124 + .../Samples/Sample_DevOpsPoolCollection.cs | 25 +- .../Samples/Sample_DevOpsPoolResource.cs | 8 +- .../Sample_ResourceGroupResourceExtensions.cs | 2 +- .../Sample_SubscriptionResourceExtensions.cs | 31 +- .../ArmDevOpsInfrastructureModelFactory.cs | 11 + .../src/Generated/DevOpsPoolCollection.cs | 20 +- .../src/Generated/DevOpsPoolResource.cs | 28 +- .../DevOpsInfrastructureExtensions.cs | 92 +- ...vOpsInfrastructureResourceGroupResource.cs | 8 +- ...evOpsInfrastructureSubscriptionResource.cs | 97 +- .../Generated/Models/AvailabilityStatus.cs | 51 + .../Models/CertificateStoreNameOption.cs | 51 + .../CheckNameAvailability.Serialization.cs | 134 + .../Generated/Models/CheckNameAvailability.cs | 81 + .../Models/CheckNameAvailabilityReason.cs | 51 + ...eckNameAvailabilityResult.Serialization.cs | 150 + .../Models/CheckNameAvailabilityResult.cs | 94 + .../DevOpsInfrastructureResourceType.cs | 48 + .../DevOpsOrganization.Serialization.cs | 17 +- .../Generated/Models/DevOpsOrganization.cs | 6 +- .../Models/DevOpsPoolVmImage.Serialization.cs | 23 +- .../src/Generated/Models/DevOpsPoolVmImage.cs | 6 +- .../src/Generated/Models/EphemeralType.cs | 54 + ...SecretsManagementSettings.Serialization.cs | 17 +- .../Models/SecretsManagementSettings.cs | 6 +- .../ImageVersionsRestOperations.cs | 2 +- .../RestOperations/PoolsRestOperations.cs | 88 +- .../ResourceDetailsRestOperations.cs | 2 +- .../RestOperations/SkuRestOperations.cs | 2 +- .../SubscriptionUsagesRestOperations.cs | 2 +- .../tsp-location.yaml | 7 +- .../Azure.ResourceManager.DurableTask.sln | 56 + .../CHANGELOG.md | 11 + .../Directory.Build.props | 6 + .../README.md | 80 + ...zure.ResourceManager.DurableTask.net8.0.cs | 229 + ...ourceManager.DurableTask.netstandard2.0.cs | 229 + .../assets.json | 7 + ...ResourceManager.DurableTask.Samples.csproj | 13 + .../Samples/Sample_SchedulerCollection.cs | 201 + .../Samples/Sample_SchedulerResource.cs | 117 + .../Sample_SubscriptionResourceExtensions.cs | 50 + .../Samples/Sample_TaskHubCollection.cs | 200 + .../Samples/Sample_TaskHubResource.cs | 113 + .../Azure.ResourceManager.DurableTask.csproj | 8 + .../Generated/ArmDurableTaskModelFactory.cs | 93 + .../Extensions/DurableTaskExtensions.cs | 238 + .../MockableDurableTaskArmClient.cs | 61 + ...ockableDurableTaskResourceGroupResource.cs | 105 + ...MockableDurableTaskSubscriptionResource.cs | 102 + .../src/Generated/Internal/Argument.cs | 129 + .../Internal/ChangeTrackingDictionary.cs | 167 + .../Generated/Internal/ChangeTrackingList.cs | 153 + .../Internal/ModelSerializationExtensions.cs | 399 + .../src/Generated/Internal/Optional.cs | 51 + .../Internal/Utf8JsonRequestContent.cs | 55 + .../DurableTaskArmOperation.cs | 94 + .../DurableTaskArmOperationOfT.cs | 100 + .../SchedulerOperationSource.cs | 36 + .../TaskHubOperationSource.cs | 36 + .../src/Generated/Models/ProvisioningState.cs | 66 + .../src/Generated/Models/RedundancyState.cs | 51 + .../SchedulerListResult.Serialization.cs | 151 + .../Generated/Models/SchedulerListResult.cs | 80 + .../SchedulerProperties.Serialization.cs | 170 + .../Generated/Models/SchedulerProperties.cs | 91 + .../Models/SchedulerSku.Serialization.cs | 156 + .../src/Generated/Models/SchedulerSku.cs | 83 + .../Models/TaskHubListResult.Serialization.cs | 151 + .../src/Generated/Models/TaskHubListResult.cs | 80 + .../Models/TaskHubProperties.Serialization.cs | 148 + .../src/Generated/Models/TaskHubProperties.cs | 69 + .../src/Generated/ProviderConstants.cs | 16 + .../SchedulersRestOperations.cs | 723 + .../RestOperations/TaskHubsRestOperations.cs | 513 + .../src/Generated/SchedulerCollection.cs | 494 + .../Generated/SchedulerData.Serialization.cs | 178 + .../src/Generated/SchedulerData.cs | 83 + .../SchedulerResource.Serialization.cs | 26 + .../src/Generated/SchedulerResource.cs | 775 + .../src/Generated/TaskHubCollection.cs | 493 + .../Generated/TaskHubData.Serialization.cs | 155 + .../src/Generated/TaskHubData.cs | 75 + .../TaskHubResource.Serialization.cs | 26 + .../src/Generated/TaskHubResource.cs | 347 + .../src/Properties/AssemblyInfo.cs | 11 + ...e.ResourceManager.DurableTask.Tests.csproj | 8 + .../tests/DurableTaskManagementTestBase.cs | 45 + .../DurableTaskManagementTestEnvironment.cs | 11 + .../tsp-location.yaml | 4 + sdk/durabletask/ci.mgmt.yml | 26 + .../Azure.ResourceManager.Fabric.net8.0.cs | 32 + ...e.ResourceManager.Fabric.netstandard2.0.cs | 32 + .../Sample_FabricCapacityCollection.cs | 10 +- .../Samples/Sample_FabricCapacityResource.cs | 12 +- .../Sample_SubscriptionResourceExtensions.cs | 34 +- .../src/Generated/ArmFabricModelFactory.cs | 20 + .../Generated/Extensions/FabricExtensions.cs | 92 +- .../MockableFabricResourceGroupResource.cs | 4 +- .../MockableFabricSubscriptionResource.cs | 82 +- .../src/Generated/FabricCapacityCollection.cs | 20 +- .../src/Generated/FabricCapacityResource.cs | 36 +- .../Models/FabricQuota.Serialization.cs | 157 + .../src/Generated/Models/FabricQuota.cs | 91 + .../Models/PagedQuota.Serialization.cs | 151 + .../src/Generated/Models/PagedQuota.cs | 80 + .../Models/QuotaName.Serialization.cs | 140 + .../src/Generated/Models/QuotaName.cs | 69 + .../FabricCapacitiesRestOperations.cs | 168 +- .../tsp-location.yaml | 3 +- .../Configuration.json | 12 + .../tsp-location.yaml | 3 +- .../tspCodeModel.json | 10375 +++ .../Azure.ResourceManager.ImpactReporting.sln | 56 + .../CHANGELOG.md | 11 + .../Directory.Build.props | 6 + .../README.md | 80 + ....ResourceManager.ImpactReporting.net8.0.cs | 616 + ...eManager.ImpactReporting.netstandard2.0.cs | 616 + .../assets.json | 7 + ...urceManager.ImpactReporting.Samples.csproj | 13 + .../Samples/Sample_ConnectorCollection.cs | 191 + .../Samples/Sample_ConnectorResource.cs | 106 + .../Sample_ImpactCategoryCollection.cs | 154 + .../Samples/Sample_ImpactCategoryResource.cs | 47 + .../Samples/Sample_InsightCollection.cs | 405 + .../Samples/Sample_InsightResource.cs | 174 + .../Sample_WorkloadImpactCollection.cs | 368 + .../Samples/Sample_WorkloadImpactResource.cs | 275 + ...ure.ResourceManager.ImpactReporting.csproj | 8 + .../ArmImpactReportingModelFactory.cs | 213 + .../src/Generated/ConnectorCollection.cs | 494 + .../Generated/ConnectorData.Serialization.cs | 155 + .../src/Generated/ConnectorData.cs | 75 + .../ConnectorResource.Serialization.cs | 26 + .../src/Generated/ConnectorResource.cs | 343 + .../Extensions/ImpactReportingExtensions.cs | 385 + .../MockableImpactReportingArmClient.cs | 85 + ...ableImpactReportingSubscriptionResource.cs | 243 + .../src/Generated/ImpactCategoryCollection.cs | 389 + .../ImpactCategoryData.Serialization.cs | 155 + .../src/Generated/ImpactCategoryData.cs | 75 + .../ImpactCategoryResource.Serialization.cs | 26 + .../src/Generated/ImpactCategoryResource.cs | 170 + .../src/Generated/InsightCollection.cs | 497 + .../Generated/InsightData.Serialization.cs | 155 + .../src/Generated/InsightData.cs | 75 + .../InsightResource.Serialization.cs | 26 + .../src/Generated/InsightResource.cs | 354 + .../src/Generated/Internal/Argument.cs | 129 + .../Internal/ChangeTrackingDictionary.cs | 167 + .../Generated/Internal/ChangeTrackingList.cs | 153 + .../Internal/ModelSerializationExtensions.cs | 399 + .../src/Generated/Internal/Optional.cs | 51 + .../Internal/Utf8JsonRequestContent.cs | 55 + .../ConnectorOperationSource.cs | 36 + .../ImpactReportingArmOperation.cs | 94 + .../ImpactReportingArmOperationOfT.cs | 100 + .../WorkloadImpactOperationSource.cs | 36 + .../ClientIncidentDetails.Serialization.cs | 144 + .../Generated/Models/ClientIncidentDetails.cs | 69 + .../src/Generated/Models/ConfidenceLevel.cs | 54 + .../Models/Connectivity.Serialization.cs | 178 + .../src/Generated/Models/Connectivity.cs | 100 + .../ConnectorListResult.Serialization.cs | 151 + .../Generated/Models/ConnectorListResult.cs | 80 + .../Models/ConnectorPatch.Serialization.cs | 133 + .../src/Generated/Models/ConnectorPatch.cs | 76 + .../ConnectorProperties.Serialization.cs | 180 + .../Generated/Models/ConnectorProperties.cs | 94 + ...ConnectorUpdateProperties.Serialization.cs | 133 + .../Models/ConnectorUpdateProperties.cs | 65 + .../Generated/Models/Content.Serialization.cs | 134 + .../src/Generated/Models/Content.cs | 82 + .../ErrorDetailProperties.Serialization.cs | 140 + .../Generated/Models/ErrorDetailProperties.cs | 69 + .../ExpectedValueRange.Serialization.cs | 134 + .../Generated/Models/ExpectedValueRange.cs | 78 + .../ImpactCategoryListResult.Serialization.cs | 151 + .../Models/ImpactCategoryListResult.cs | 80 + .../ImpactCategoryProperties.Serialization.cs | 194 + .../Models/ImpactCategoryProperties.cs | 92 + .../Models/ImpactDetails.Serialization.cs | 157 + .../src/Generated/Models/ImpactDetails.cs | 92 + .../src/Generated/Models/IncidentSource.cs | 60 + .../Models/InsightListResult.Serialization.cs | 151 + .../src/Generated/Models/InsightListResult.cs | 80 + .../Models/InsightProperties.Serialization.cs | 239 + .../src/Generated/Models/InsightProperties.cs | 120 + ...opertiesAdditionalDetails.Serialization.cs | 118 + .../InsightPropertiesAdditionalDetails.cs | 60 + .../src/Generated/Models/MetricUnit.cs | 81 + .../Models/Performance.Serialization.cs | 195 + .../src/Generated/Models/Performance.cs | 81 + .../src/Generated/Models/Platform.cs | 48 + .../src/Generated/Models/Protocol.cs | 69 + .../src/Generated/Models/ProvisioningState.cs | 54 + .../RequiredImpactProperties.Serialization.cs | 151 + .../Models/RequiredImpactProperties.cs | 80 + .../Models/SourceOrTarget.Serialization.cs | 129 + .../src/Generated/Models/SourceOrTarget.cs | 65 + .../src/Generated/Models/Toolset.cs | 72 + .../Models/Workload.Serialization.cs | 144 + .../src/Generated/Models/Workload.cs | 69 + .../WorkloadImpactListResult.Serialization.cs | 151 + .../Models/WorkloadImpactListResult.cs | 80 + .../WorkloadImpactProperties.Serialization.cs | 378 + .../Models/WorkloadImpactProperties.cs | 146 + ...rtiesAdditionalProperties.Serialization.cs | 118 + ...oadImpactPropertiesAdditionalProperties.cs | 60 + .../src/Generated/ProviderConstants.cs | 16 + .../ConnectorsRestOperations.cs | 533 + .../ImpactCategoriesRestOperations.cs | 303 + .../RestOperations/InsightsRestOperations.cs | 487 + .../WorkloadImpactsRestOperations.cs | 441 + .../src/Generated/WorkloadImpactCollection.cs | 494 + .../WorkloadImpactData.Serialization.cs | 155 + .../src/Generated/WorkloadImpactData.cs | 75 + .../WorkloadImpactResource.Serialization.cs | 26 + .../src/Generated/WorkloadImpactResource.cs | 419 + .../src/Properties/AssemblyInfo.cs | 11 + ...sourceManager.ImpactReporting.Tests.csproj | 8 + .../ImpactReportingManagementTestBase.cs | 45 + ...mpactReportingManagementTestEnvironment.cs | 11 + .../tsp-location.yaml | 4 + sdk/impactreporting/ci.mgmt.yml | 26 + .../Configuration.json | 12 + .../tsp-location.yaml | 3 +- .../tspCodeModel.json | 68968 ++++++++++++++++ ...ure.ResourceManager.MongoCluster.net8.0.cs | 22 +- ...urceManager.MongoCluster.netstandard2.0.cs | 22 +- .../Samples/Sample_MongoClusterCollection.cs | 14 +- ...mple_MongoClusterFirewallRuleCollection.cs | 10 +- ...Sample_MongoClusterFirewallRuleResource.cs | 6 +- ...lusterPrivateEndpointConnectionResource.cs | 6 +- ...ateEndpointConnectionResourceCollection.cs | 10 +- .../Samples/Sample_MongoClusterResource.cs | 58 +- .../Sample_SubscriptionResourceExtensions.cs | 6 +- .../Generated/ArmMongoClusterModelFactory.cs | 4 +- ...ckableMongoClusterResourceGroupResource.cs | 4 +- ...ockableMongoClusterSubscriptionResource.cs | 8 +- .../Extensions/MongoClusterExtensions.cs | 12 +- .../src/Generated/Models/DataApiMode.cs | 51 + .../Models/DataApiProperties.Serialization.cs | 133 + .../src/Generated/Models/DataApiProperties.cs | 65 + .../MongoClusterProperties.Serialization.cs | 16 + .../Models/MongoClusterProperties.cs | 18 +- ...goClusterUpdateProperties.Serialization.cs | 16 + .../Models/MongoClusterUpdateProperties.cs | 18 +- .../src/Generated/MongoClusterCollection.cs | 20 +- .../MongoClusterFirewallRuleCollection.cs | 20 +- .../MongoClusterFirewallRuleResource.cs | 12 +- ...lusterPrivateEndpointConnectionResource.cs | 12 +- ...ateEndpointConnectionResourceCollection.cs | 20 +- .../src/Generated/MongoClusterResource.cs | 48 +- .../FirewallRulesRestOperations.cs | 2 +- .../MongoClustersRestOperations.cs | 2 +- ...rivateEndpointConnectionsRestOperations.cs | 2 +- .../PrivateLinksRestOperations.cs | 2 +- .../RestOperations/ReplicasRestOperations.cs | 2 +- .../tsp-location.yaml | 7 +- .../tsp-location.yaml | 3 +- ...Azure.ResourceManager.PineconeVectorDb.sln | 56 + .../CHANGELOG.md | 11 + .../Directory.Build.props | 6 + .../README.md | 80 + ...ResourceManager.PineconeVectorDb.net8.0.cs | 258 + ...Manager.PineconeVectorDb.netstandard2.0.cs | 258 + .../assets.json | 7 + ...rceManager.PineconeVectorDb.Samples.csproj | 13 + .../Samples/Sample_OrganizationResource.cs | 120 + .../Sample_OrganizationResourceCollection.cs | 233 + .../Sample_SubscriptionResourceExtensions.cs | 50 + ...re.ResourceManager.PineconeVectorDb.csproj | 8 + .../ArmPineconeVectorDbModelFactory.cs | 73 + .../MockablePineconeVectorDbArmClient.cs | 49 + ...lePineconeVectorDbResourceGroupResource.cs | 105 + ...blePineconeVectorDbSubscriptionResource.cs | 102 + .../Extensions/PineconeVectorDbExtensions.cs | 219 + .../src/Generated/Internal/Argument.cs | 129 + .../Internal/ChangeTrackingDictionary.cs | 167 + .../Generated/Internal/ChangeTrackingList.cs | 153 + .../Internal/ModelSerializationExtensions.cs | 399 + .../src/Generated/Internal/Optional.cs | 51 + .../Internal/Utf8JsonRequestContent.cs | 55 + .../OrganizationResourceOperationSource.cs | 36 + .../PineconeVectorDbArmOperation.cs | 94 + .../PineconeVectorDbArmOperationOfT.cs | 100 + .../MarketplaceDetails.Serialization.cs | 152 + .../Generated/Models/MarketplaceDetails.cs | 83 + .../Models/MarketplaceSubscriptionStatus.cs | 57 + .../Models/OfferDetails.Serialization.cs | 182 + .../src/Generated/Models/OfferDetails.cs | 101 + .../OrganizationProperties.Serialization.cs | 185 + .../Models/OrganizationProperties.cs | 101 + ...izationResourceListResult.Serialization.cs | 151 + .../Models/OrganizationResourceListResult.cs | 80 + ...OrganizationResourcePatch.Serialization.cs | 162 + .../Models/OrganizationResourcePatch.cs | 71 + .../Models/PartnerProperties.Serialization.cs | 126 + .../src/Generated/Models/PartnerProperties.cs | 75 + .../Models/ResourceProvisioningState.cs | 54 + .../SingleSignOnPropertiesV2.Serialization.cs | 194 + .../Models/SingleSignOnPropertiesV2.cs | 89 + .../src/Generated/Models/SingleSignOnState.cs | 54 + .../src/Generated/Models/SingleSignOnType.cs | 51 + .../Models/UserDetails.Serialization.cs | 179 + .../src/Generated/Models/UserDetails.cs | 81 + .../OrganizationResource.Serialization.cs | 26 + .../src/Generated/OrganizationResource.cs | 699 + .../OrganizationResourceCollection.cs | 494 + .../OrganizationResourceData.Serialization.cs | 196 + .../src/Generated/OrganizationResourceData.cs | 87 + .../src/Generated/ProviderConstants.cs | 16 + .../OrganizationsRestOperations.cs | 731 + .../src/Properties/AssemblyInfo.cs | 11 + ...ourceManager.PineconeVectorDb.Tests.csproj | 8 + .../PineconeVectorDbManagementTestBase.cs | 45 + ...neconeVectorDbManagementTestEnvironment.cs | 11 + .../tsp-location.yaml | 4 + sdk/pineconevectordb/ci.mgmt.yml | 26 + sdk/resourcemanager/ci.mgmt.yml | 20 +- .../Configuration.json | 12 + .../tsp-location.yaml | 3 +- .../tspCodeModel.json | 13781 +++ .../Azure.ResourceManager.SiteManager.sln | 54 + .../CHANGELOG.md | 11 + .../Directory.Build.props | 6 + .../README.md | 80 + ...zure.ResourceManager.SiteManager.net8.0.cs | 185 + ...ourceManager.SiteManager.netstandard2.0.cs | 185 + .../assets.json | 7 + ...ResourceManager.SiteManager.Samples.csproj | 13 + .../Azure.ResourceManager.SiteManager.csproj | 8 + .../Generated/ArmSiteManagerModelFactory.cs | 48 + .../MockableSiteManagerArmClient.cs | 61 + ...ockableSiteManagerResourceGroupResource.cs | 105 + ...MockableSiteManagerSubscriptionResource.cs | 105 + .../Extensions/SiteManagerExtensions.cs | 259 + .../src/Generated/Internal/Argument.cs | 129 + .../Internal/ChangeTrackingDictionary.cs | 167 + .../Generated/Internal/ChangeTrackingList.cs | 153 + .../Internal/ModelSerializationExtensions.cs | 399 + .../src/Generated/Internal/Optional.cs | 51 + .../Internal/Utf8JsonRequestContent.cs | 55 + .../ResourceGroupSiteOperationSource.cs | 36 + .../SiteManagerArmOperation.cs | 94 + .../SiteManagerArmOperationOfT.cs | 100 + .../SubscriptionSiteOperationSource.cs | 36 + .../Models/ResourceProvisioningState.cs | 54 + .../Models/SiteListResult.Serialization.cs | 151 + .../src/Generated/Models/SiteListResult.cs | 80 + .../Models/SiteProperties.Serialization.cs | 170 + .../src/Generated/Models/SiteProperties.cs | 78 + .../Models/SiteUpdate.Serialization.cs | 133 + .../src/Generated/Models/SiteUpdate.cs | 65 + .../SiteUpdateProperties.Serialization.cs | 155 + .../Generated/Models/SiteUpdateProperties.cs | 74 + .../src/Generated/ProviderConstants.cs | 16 + .../Generated/ResourceGroupSiteCollection.cs | 494 + ...ResourceGroupSiteResource.Serialization.cs | 26 + .../Generated/ResourceGroupSiteResource.cs | 344 + .../SitesBySubscriptionRestOperations.cs | 533 + .../RestOperations/SitesRestOperations.cs | 577 + .../src/Generated/SiteData.Serialization.cs | 155 + .../src/Generated/SiteData.cs | 75 + .../Generated/SubscriptionSiteCollection.cs | 494 + .../SubscriptionSiteResource.Serialization.cs | 26 + .../src/Generated/SubscriptionSiteResource.cs | 343 + .../src/Properties/AssemblyInfo.cs | 11 + .../tsp-location.yaml | 4 + sdk/sitemanager/ci.mgmt.yml | 26 + .../Configuration.json | 12 + .../tsp-location.yaml | 7 +- .../tspCodeModel.json | 16301 ++++ sdk/storage/ci.yml | 8 + .../Azure.ResourceManager.Terraform.net8.0.cs | 27 +- ...esourceManager.Terraform.netstandard2.0.cs | 27 +- .../src/Generated/ArmTerraformModelFactory.cs | 13 +- .../Models/AuthorizationScopeFilter.cs | 57 + .../ExportQueryTerraform.Serialization.cs | 30 +- .../Generated/Models/ExportQueryTerraform.cs | 10 +- .../TerraformExportResult.Serialization.cs | 13 +- .../Generated/Models/TerraformExportResult.cs | 6 +- .../tsp-location.yaml | 3 +- ...re.ResourceManager.SapVirtualInstances.sln | 56 + .../CHANGELOG.md | 11 + .../Directory.Build.props | 6 + .../README.md | 80 + .../assets.json | 7 + ...Manager.SapVirtualInstances.Samples.csproj | 13 + ..._SapApplicationServerInstanceCollection.cs | 241 + ...le_SapApplicationServerInstanceResource.cs | 306 + ...mple_SapCentralServerInstanceCollection.cs | 241 + ...Sample_SapCentralServerInstanceResource.cs | 240 + .../Sample_SapDatabaseInstanceCollection.cs | 241 + .../Sample_SapDatabaseInstanceResource.cs | 306 + .../Sample_SapVirtualInstanceCollection.cs | 3485 + .../Sample_SapVirtualInstanceResource.cs | 372 + .../Sample_SubscriptionResourceExtensions.cs | 423 + ...ResourceManager.SapVirtualInstances.csproj | 8 + .../ArmSapVirtualInstancesModelFactory.cs | 565 + .../MockableSapVirtualInstancesArmClient.cs | 85 + ...apVirtualInstancesResourceGroupResource.cs | 105 + ...SapVirtualInstancesSubscriptionResource.cs | 449 + .../SapVirtualInstancesExtensions.cs | 573 + .../src/Generated/Internal/Argument.cs | 129 + .../Internal/ChangeTrackingDictionary.cs | 167 + .../Generated/Internal/ChangeTrackingList.cs | 153 + .../Internal/ModelSerializationExtensions.cs | 399 + .../src/Generated/Internal/Optional.cs | 51 + .../Internal/Utf8JsonRequestContent.cs | 55 + .../OperationStatusResultOperationSource.cs | 30 + ...pplicationServerInstanceOperationSource.cs | 36 + ...SapCentralServerInstanceOperationSource.cs | 36 + .../SapDatabaseInstanceOperationSource.cs | 36 + .../SapVirtualInstanceOperationSource.cs | 36 + .../SapVirtualInstancesArmOperation.cs | 94 + .../SapVirtualInstancesArmOperationOfT.cs | 100 + ...cationServerConfiguration.Serialization.cs | 142 + .../Models/ApplicationServerConfiguration.cs | 88 + ...onServerFullResourceNames.Serialization.cs | 154 + .../ApplicationServerFullResourceNames.cs | 70 + .../ApplicationServerVirtualMachineType.cs | 54 + ...pplicationServerVmDetails.Serialization.cs | 170 + .../Models/ApplicationServerVmDetails.cs | 75 + ...entralServerConfiguration.Serialization.cs | 142 + .../Models/CentralServerConfiguration.cs | 88 + ...alServerFullResourceNames.Serialization.cs | 169 + .../Models/CentralServerFullResourceNames.cs | 74 + .../Models/CentralServerVirtualMachineType.cs | 66 + .../CentralServerVmDetails.Serialization.cs | 170 + .../Models/CentralServerVmDetails.cs | 75 + ...untFileShareConfiguration.Serialization.cs | 132 + .../CreateAndMountFileShareConfiguration.cs | 39 + .../DatabaseConfiguration.Serialization.cs | 178 + .../Generated/Models/DatabaseConfiguration.cs | 106 + ...seServerFullResourceNames.Serialization.cs | 169 + .../Models/DatabaseServerFullResourceNames.cs | 74 + .../Models/DatabaseVmDetails.Serialization.cs | 170 + .../src/Generated/Models/DatabaseVmDetails.cs | 75 + .../DeployerVmPackages.Serialization.cs | 140 + .../Generated/Models/DeployerVmPackages.cs | 69 + .../DeploymentConfiguration.Serialization.cs | 151 + .../Models/DeploymentConfiguration.cs | 59 + ...oymentWithOSConfiguration.Serialization.cs | 172 + .../Models/DeploymentWithOSConfiguration.cs | 63 + .../DiscoveryConfiguration.Serialization.cs | 143 + .../Models/DiscoveryConfiguration.cs | 43 + .../Models/DiskConfiguration.Serialization.cs | 144 + .../src/Generated/Models/DiskConfiguration.cs | 66 + .../Models/DiskDetails.Serialization.cs | 227 + .../src/Generated/Models/DiskDetails.cs | 95 + .../Generated/Models/DiskSku.Serialization.cs | 133 + .../src/Generated/Models/DiskSku.cs | 65 + .../src/Generated/Models/DiskSkuName.cs | 66 + .../DiskVolumeConfiguration.Serialization.cs | 163 + .../Models/DiskVolumeConfiguration.cs | 84 + ...plicationServerProperties.Serialization.cs | 211 + .../EnqueueReplicationServerProperties.cs | 89 + .../Models/EnqueueReplicationServerType.cs | 51 + .../EnqueueServerProperties.Serialization.cs | 170 + .../Models/EnqueueServerProperties.cs | 77 + .../Models/ErrorInformation.Serialization.cs | 165 + .../src/Generated/Models/ErrorInformation.cs | 74 + ...tionSoftwareConfiguration.Serialization.cs | 121 + ...ternalInstallationSoftwareConfiguration.cs | 35 + .../FileShareConfiguration.Serialization.cs | 119 + .../Models/FileShareConfiguration.cs | 69 + .../Models/FileShareConfigurationType.cs | 54 + .../GatewayServerProperties.Serialization.cs | 148 + .../Models/GatewayServerProperties.cs | 69 + ...AvailabilityConfiguration.Serialization.cs | 126 + .../Models/HighAvailabilityConfiguration.cs | 72 + ...litySoftwareConfiguration.Serialization.cs | 134 + .../HighAvailabilitySoftwareConfiguration.cs | 82 + .../Models/ImageReference.Serialization.cs | 183 + .../src/Generated/Models/ImageReference.cs | 82 + ...frastructureConfiguration.Serialization.cs | 120 + .../Models/InfrastructureConfiguration.cs | 83 + .../LinuxConfiguration.Serialization.cs | 155 + .../Generated/Models/LinuxConfiguration.cs | 54 + ...LoadBalancerResourceNames.Serialization.cs | 204 + .../Models/LoadBalancerResourceNames.cs | 80 + .../ManagedRGConfiguration.Serialization.cs | 129 + .../Models/ManagedRGConfiguration.cs | 65 + .../ManagedResourcesNetworkAccessType.cs | 51 + .../MessageServerProperties.Serialization.cs | 223 + .../Models/MessageServerProperties.cs | 89 + ...untFileShareConfiguration.Serialization.cs | 126 + .../Models/MountFileShareConfiguration.cs | 52 + .../src/Generated/Models/NamingPatternType.cs | 48 + .../NetworkConfiguration.Serialization.cs | 133 + .../Generated/Models/NetworkConfiguration.cs | 65 + ...orkInterfaceResourceNames.Serialization.cs | 129 + .../Models/NetworkInterfaceResourceNames.cs | 65 + .../Models/OSConfiguration.Serialization.cs | 118 + .../src/Generated/Models/OSConfiguration.cs | 69 + .../Models/OSProfile.Serialization.cs | 155 + .../src/Generated/Models/OSProfile.cs | 81 + .../OSSapConfiguration.Serialization.cs | 144 + .../Generated/Models/OSSapConfiguration.cs | 69 + .../src/Generated/Models/OSType.cs | 51 + .../OperationStatusResult.Serialization.cs | 258 + .../Generated/Models/OperationStatusResult.cs | 109 + ...nServerInstanceListResult.Serialization.cs | 151 + .../SAPApplicationServerInstanceListResult.cs | 80 + ...lServerInstanceListResult.Serialization.cs | 151 + .../SAPCentralServerInstanceListResult.cs | 80 + ...atabaseInstanceListResult.Serialization.cs | 151 + .../Models/SAPDatabaseInstanceListResult.cs | 80 + ...APVirtualInstanceIdentity.Serialization.cs | 153 + .../Models/SAPVirtualInstanceIdentity.cs | 78 + .../Models/SAPVirtualInstanceIdentityType.cs | 51 + ...VirtualInstanceListResult.Serialization.cs | 151 + .../Models/SAPVirtualInstanceListResult.cs | 80 + ...cationServerInstancePatch.Serialization.cs | 144 + .../SapApplicationServerInstancePatch.cs | 66 + ...plicationServerProperties.Serialization.cs | 358 + .../Models/SapApplicationServerProperties.cs | 139 + ...abilityZoneDetailsContent.Serialization.cs | 142 + .../SapAvailabilityZoneDetailsContent.cs | 87 + ...labilityZoneDetailsResult.Serialization.cs | 143 + .../SapAvailabilityZoneDetailsResult.cs | 66 + .../SapAvailabilityZonePair.Serialization.cs | 148 + .../Models/SapAvailabilityZonePair.cs | 69 + ...entralServerInstancePatch.Serialization.cs | 144 + .../Models/SapCentralServerInstancePatch.cs | 66 + ...apCentralServerProperties.Serialization.cs | 338 + .../Models/SapCentralServerProperties.cs | 131 + .../Models/SapConfiguration.Serialization.cs | 119 + .../src/Generated/Models/SapConfiguration.cs | 69 + .../Generated/Models/SapConfigurationType.cs | 54 + .../SapDatabaseInstancePatch.Serialization.cs | 144 + .../Models/SapDatabaseInstancePatch.cs | 66 + .../SapDatabaseProperties.Serialization.cs | 258 + .../Generated/Models/SapDatabaseProperties.cs | 111 + .../Models/SapDatabaseScaleMethod.cs | 48 + .../src/Generated/Models/SapDatabaseType.cs | 51 + .../src/Generated/Models/SapDeploymentType.cs | 51 + .../SapDiskConfiguration.Serialization.cs | 158 + .../Generated/Models/SapDiskConfiguration.cs | 70 + ...DiskConfigurationsContent.Serialization.cs | 173 + .../Models/SapDiskConfigurationsContent.cs | 106 + ...pDiskConfigurationsResult.Serialization.cs | 144 + .../Models/SapDiskConfigurationsResult.cs | 66 + .../Generated/Models/SapEnvironmentType.cs | 51 + .../src/Generated/Models/SapHealthState.cs | 57 + .../Models/SapHighAvailabilityType.cs | 51 + ...nfigSoftwareConfiguration.Serialization.cs | 155 + ...allWithoutOSConfigSoftwareConfiguration.cs | 63 + .../src/Generated/Models/SapProductType.cs | 54 + ...zingRecommendationContent.Serialization.cs | 214 + .../Models/SapSizingRecommendationContent.cs | 119 + ...izingRecommendationResult.Serialization.cs | 118 + .../Models/SapSizingRecommendationResult.cs | 69 + .../Models/SapSoftwareInstallationType.cs | 54 + ...pportedResourceSkusResult.Serialization.cs | 143 + .../Models/SapSupportedResourceSkusResult.cs | 66 + .../Models/SapSupportedSku.Serialization.cs | 159 + .../src/Generated/Models/SapSupportedSku.cs | 73 + .../SapSupportedSkusContent.Serialization.cs | 180 + .../Models/SapSupportedSkusContent.cs | 103 + .../SapVirtualInstanceError.Serialization.cs | 133 + .../Models/SapVirtualInstanceError.cs | 65 + .../SapVirtualInstancePatch.Serialization.cs | 174 + .../Models/SapVirtualInstancePatch.cs | 85 + ...VirtualInstanceProperties.Serialization.cs | 258 + .../Models/SapVirtualInstanceProperties.cs | 144 + .../SapVirtualInstanceProvisioningState.cs | 63 + .../Models/SapVirtualInstanceState.cs | 84 + .../Models/SapVirtualInstanceStatus.cs | 66 + ...atedSoftwareConfiguration.Serialization.cs | 173 + .../ServiceInitiatedSoftwareConfiguration.cs | 77 + ...haredStorageResourceNames.Serialization.cs | 140 + .../Models/SharedStorageResourceNames.cs | 69 + ...SingleServerConfiguration.Serialization.cs | 201 + .../Models/SingleServerConfiguration.cs | 102 + ...ServerCustomResourceNames.Serialization.cs | 117 + .../Models/SingleServerCustomResourceNames.cs | 69 + ...leServerFullResourceNames.Serialization.cs | 125 + .../Models/SingleServerFullResourceNames.cs | 35 + ...erverRecommendationResult.Serialization.cs | 121 + .../SingleServerRecommendationResult.cs | 35 + ...kipFileShareConfiguration.Serialization.cs | 110 + .../Models/SkipFileShareConfiguration.cs | 30 + .../SoftwareConfiguration.Serialization.cs | 119 + .../Generated/Models/SoftwareConfiguration.cs | 69 + .../Models/SshConfiguration.Serialization.cs | 143 + .../src/Generated/Models/SshConfiguration.cs | 66 + .../Models/SshKeyPair.Serialization.cs | 140 + .../src/Generated/Models/SshKeyPair.cs | 69 + .../Models/SshPublicKey.Serialization.cs | 129 + .../src/Generated/Models/SshPublicKey.cs | 65 + .../Models/StartContent.Serialization.cs | 133 + .../src/Generated/Models/StartContent.cs | 65 + .../Models/StopContent.Serialization.cs | 148 + .../src/Generated/Models/StopContent.cs | 69 + .../StorageConfiguration.Serialization.cs | 133 + .../Generated/Models/StorageConfiguration.cs | 73 + .../ThreeTierConfiguration.Serialization.cs | 210 + .../Models/ThreeTierConfiguration.cs | 124 + ...eeTierCustomResourceNames.Serialization.cs | 117 + .../Models/ThreeTierCustomResourceNames.cs | 69 + ...hreeTierFullResourceNames.Serialization.cs | 176 + .../Models/ThreeTierFullResourceNames.cs | 47 + ...eTierRecommendationResult.Serialization.cs | 196 + .../Models/ThreeTierRecommendationResult.cs | 55 + ...ownFileShareConfiguration.Serialization.cs | 110 + .../Models/UnknownFileShareConfiguration.cs | 29 + ...frastructureConfiguration.Serialization.cs | 116 + .../UnknownInfrastructureConfiguration.cs | 30 + .../UnknownOSConfiguration.Serialization.cs | 110 + .../Models/UnknownOSConfiguration.cs | 29 + .../UnknownSapConfiguration.Serialization.cs | 110 + .../Models/UnknownSapConfiguration.cs | 29 + ...izingRecommendationResult.Serialization.cs | 110 + .../UnknownSapSizingRecommendationResult.cs | 29 + ...ServerCustomResourceNames.Serialization.cs | 110 + .../UnknownSingleServerCustomResourceNames.cs | 29 + ...nownSoftwareConfiguration.Serialization.cs | 110 + .../Models/UnknownSoftwareConfiguration.cs | 29 + ...eeTierCustomResourceNames.Serialization.cs | 110 + .../UnknownThreeTierCustomResourceNames.cs | 29 + ...VirtualInstanceProperties.Serialization.cs | 133 + .../UpdateSapVirtualInstanceProperties.cs | 65 + ...rtualMachineConfiguration.Serialization.cs | 142 + .../Models/VirtualMachineConfiguration.cs | 89 + ...rtualMachineResourceNames.Serialization.cs | 230 + .../Models/VirtualMachineResourceNames.cs | 83 + .../WindowsConfiguration.Serialization.cs | 110 + .../Generated/Models/WindowsConfiguration.cs | 30 + .../src/Generated/ProviderConstants.cs | 16 + ...pplicationServerInstancesRestOperations.cs | 827 + ...SapCentralServerInstancesRestOperations.cs | 827 + .../SapDatabaseInstancesRestOperations.cs | 827 + .../SapVirtualInstancesRestOperations.cs | 1281 + .../SapApplicationServerInstanceCollection.cs | 493 + ...icationServerInstanceData.Serialization.cs | 178 + .../SapApplicationServerInstanceData.cs | 83 + ...ionServerInstanceResource.Serialization.cs | 26 + .../SapApplicationServerInstanceResource.cs | 871 + .../SapCentralServerInstanceCollection.cs | 493 + ...CentralServerInstanceData.Serialization.cs | 178 + .../Generated/SapCentralServerInstanceData.cs | 83 + ...ralServerInstanceResource.Serialization.cs | 26 + .../SapCentralServerInstanceResource.cs | 871 + .../SapDatabaseInstanceCollection.cs | 493 + .../SapDatabaseInstanceData.Serialization.cs | 178 + .../src/Generated/SapDatabaseInstanceData.cs | 83 + ...pDatabaseInstanceResource.Serialization.cs | 26 + .../Generated/SapDatabaseInstanceResource.cs | 871 + .../Generated/SapVirtualInstanceCollection.cs | 494 + .../SapVirtualInstanceData.Serialization.cs | 194 + .../src/Generated/SapVirtualInstanceData.cs | 87 + ...apVirtualInstanceResource.Serialization.cs | 26 + .../Generated/SapVirtualInstanceResource.cs | 1086 + .../src/Properties/AssemblyInfo.cs | 11 + ...ceManager.SapVirtualInstances.Tests.csproj | 8 + .../SapVirtualInstancesManagementTestBase.cs | 45 + ...rtualInstancesManagementTestEnvironment.cs | 11 + .../tsp-location.yaml | 4 + sdk/workloadssapvirtualinstance/ci.mgmt.yml | 26 + 853 files changed, 282860 insertions(+), 285 deletions(-) create mode 100644 sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations.sln create mode 100644 sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/CHANGELOG.md create mode 100644 sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/Directory.Build.props create mode 100644 sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/README.md create mode 100644 sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/api/Azure.ResourceManager.CommonEdgeSiteManagerOperations.net8.0.cs create mode 100644 sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/api/Azure.ResourceManager.CommonEdgeSiteManagerOperations.netstandard2.0.cs create mode 100644 sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/assets.json create mode 100644 sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/samples/Azure.ResourceManager.CommonEdgeSiteManagerOperations.Samples.csproj create mode 100644 sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Azure.ResourceManager.CommonEdgeSiteManagerOperations.csproj create mode 100644 sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Generated/ProviderConstants.cs create mode 100644 sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Properties/AssemblyInfo.cs create mode 100644 sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/Azure.ResourceManager.CommonEdgeSiteManagerOperations.Tests.csproj create mode 100644 sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/CommonEdgeSiteManagerOperationsManagementTestBase.cs create mode 100644 sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/CommonEdgeSiteManagerOperationsManagementTestEnvironment.cs create mode 100644 sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tsp-location.yaml create mode 100644 sdk/commonedgesitemanageroperations/ci.mgmt.yml create mode 100644 sdk/computefleet/Azure.ResourceManager.ComputeFleet/Configuration.json create mode 100644 sdk/computefleet/Azure.ResourceManager.ComputeFleet/tspCodeModel.json create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/Azure.ResourceManager.Contoso.sln create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/CHANGELOG.md create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/Directory.Build.props create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/README.md create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.net8.0.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.netstandard2.0.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/assets.json create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/samples/Azure.ResourceManager.Contoso.Samples.csproj create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeCollection.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeResource.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Azure.ResourceManager.Contoso.csproj create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ArmContosoModelFactory.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeCollection.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.Serialization.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.Serialization.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/ContosoExtensions.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoArmClient.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoResourceGroupResource.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoSubscriptionResource.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Argument.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingDictionary.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingList.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ModelSerializationExtensions.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Optional.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Utf8JsonRequestContent.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperation.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperationOfT.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/EmployeeOperationSource.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.Serialization.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.Serialization.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/ProvisioningState.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ProviderConstants.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/RestOperations/EmployeesRestOperations.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/src/Properties/AssemblyInfo.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/tests/Azure.ResourceManager.Contoso.Tests.csproj create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestBase.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestEnvironment.cs create mode 100644 sdk/contoso/Azure.ResourceManager.Contoso/tsp-location.yaml create mode 100644 sdk/contoso/ci.mgmt.yml create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/Azure.ResourceManager.DatabaseWatcher.sln create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/CHANGELOG.md create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/Directory.Build.props create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/README.md create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/api/Azure.ResourceManager.DatabaseWatcher.net8.0.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/api/Azure.ResourceManager.DatabaseWatcher.netstandard2.0.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/assets.json create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Azure.ResourceManager.DatabaseWatcher.Samples.csproj create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_AlertRuleResource.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_AlertRuleResourceCollection.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_HealthValidationCollection.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_HealthValidationResource.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_SharedPrivateLinkResource.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_SharedPrivateLinkResourceCollection.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_TargetCollection.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_TargetResource.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_WatcherCollection.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_WatcherResource.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Azure.ResourceManager.DatabaseWatcher.csproj create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResource.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResource.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResourceCollection.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResourceData.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResourceData.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/ArmDatabaseWatcherModelFactory.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/DatabaseWatcherExtensions.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/MockableDatabaseWatcherArmClient.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/MockableDatabaseWatcherResourceGroupResource.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/MockableDatabaseWatcherSubscriptionResource.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationCollection.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationData.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationData.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationResource.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationResource.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/Argument.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/ChangeTrackingDictionary.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/ChangeTrackingList.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/ModelSerializationExtensions.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/Optional.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/Utf8JsonRequestContent.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/DatabaseWatcherArmOperation.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/DatabaseWatcherArmOperationOfT.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/HealthValidationOperationSource.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/SharedPrivateLinkResourceOperationSource.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/WatcherOperationSource.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleCreationProperty.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceListResult.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceListResult.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceProperties.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceProperties.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/DatabaseWatcherProvisioningState.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/Datastore.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/Datastore.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationListResult.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationListResult.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationProperties.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationProperties.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/KustoOfferingType.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ManagedServiceIdentityType.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ManagedServiceIdentityV4.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ManagedServiceIdentityV4.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ResourceProvisioningState.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceListResult.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceListResult.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceProperties.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceProperties.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceStatus.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbElasticPoolTargetProperties.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbElasticPoolTargetProperties.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbSingleDatabaseTargetProperties.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbSingleDatabaseTargetProperties.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlMiTargetProperties.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlMiTargetProperties.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetAuthenticationType.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetListResult.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetListResult.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetProperties.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetProperties.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/UnknownTargetProperties.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/UnknownTargetProperties.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ValidationIssue.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ValidationIssue.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ValidationStatus.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/VaultSecret.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/VaultSecret.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherListResult.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherListResult.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherPatch.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherPatch.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherProperties.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherProperties.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherStatus.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherUpdateProperties.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherUpdateProperties.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/ProviderConstants.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/AlertRuleResourcesRestOperations.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/HealthValidationsRestOperations.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/SharedPrivateLinkResourcesRestOperations.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/TargetsRestOperations.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/WatchersRestOperations.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResource.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResource.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResourceCollection.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResourceData.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResourceData.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetCollection.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetData.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetData.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetResource.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetResource.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherCollection.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherData.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherData.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherResource.Serialization.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherResource.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Properties/AssemblyInfo.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Azure.ResourceManager.DatabaseWatcher.Tests.csproj create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/DatabaseWatcherManagementTestBase.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/DatabaseWatcherManagementTestEnvironment.cs create mode 100644 sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tsp-location.yaml create mode 100644 sdk/databasewatcher/ci.mgmt.yml create mode 100644 sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/Configuration.json create mode 100644 sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tspCodeModel.json create mode 100644 sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/AvailabilityStatus.cs create mode 100644 sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CertificateStoreNameOption.cs create mode 100644 sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailability.Serialization.cs create mode 100644 sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailability.cs create mode 100644 sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityReason.cs create mode 100644 sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs create mode 100644 sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityResult.cs create mode 100644 sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsInfrastructureResourceType.cs create mode 100644 sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/EphemeralType.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/Azure.ResourceManager.DurableTask.sln create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/CHANGELOG.md create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/Directory.Build.props create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/README.md create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.net8.0.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.netstandard2.0.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/assets.json create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Azure.ResourceManager.DurableTask.Samples.csproj create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SchedulerCollection.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SchedulerResource.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_TaskHubCollection.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_TaskHubResource.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Azure.ResourceManager.DurableTask.csproj create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ArmDurableTaskModelFactory.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskArmClient.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskResourceGroupResource.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskSubscriptionResource.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Argument.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingDictionary.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingList.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ModelSerializationExtensions.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Optional.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Utf8JsonRequestContent.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperation.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperationOfT.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerOperationSource.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/TaskHubOperationSource.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/ProvisioningState.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RedundancyState.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.Serialization.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.Serialization.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.Serialization.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.Serialization.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubProperties.Serialization.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubProperties.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ProviderConstants.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/SchedulersRestOperations.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/TaskHubsRestOperations.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerCollection.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.Serialization.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.Serialization.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubCollection.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubData.Serialization.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubData.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubResource.Serialization.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubResource.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/src/Properties/AssemblyInfo.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Azure.ResourceManager.DurableTask.Tests.csproj create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/tests/DurableTaskManagementTestBase.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/tests/DurableTaskManagementTestEnvironment.cs create mode 100644 sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml create mode 100644 sdk/durabletask/ci.mgmt.yml create mode 100644 sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.Serialization.cs create mode 100644 sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.cs create mode 100644 sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.Serialization.cs create mode 100644 sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.cs create mode 100644 sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.Serialization.cs create mode 100644 sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.cs create mode 100644 sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/Configuration.json create mode 100644 sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tspCodeModel.json create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/Azure.ResourceManager.ImpactReporting.sln create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/CHANGELOG.md create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/Directory.Build.props create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/README.md create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/api/Azure.ResourceManager.ImpactReporting.net8.0.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/api/Azure.ResourceManager.ImpactReporting.netstandard2.0.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/assets.json create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Azure.ResourceManager.ImpactReporting.Samples.csproj create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ConnectorCollection.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ConnectorResource.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ImpactCategoryCollection.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ImpactCategoryResource.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_InsightCollection.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_InsightResource.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_WorkloadImpactCollection.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_WorkloadImpactResource.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Azure.ResourceManager.ImpactReporting.csproj create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ArmImpactReportingModelFactory.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorCollection.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorData.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorData.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorResource.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorResource.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Extensions/ImpactReportingExtensions.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Extensions/MockableImpactReportingArmClient.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Extensions/MockableImpactReportingSubscriptionResource.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryCollection.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryData.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryData.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryResource.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryResource.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightCollection.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightData.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightData.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightResource.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightResource.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/Argument.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/ChangeTrackingDictionary.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/ChangeTrackingList.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/ModelSerializationExtensions.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/Optional.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/Utf8JsonRequestContent.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/ConnectorOperationSource.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/ImpactReportingArmOperation.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/ImpactReportingArmOperationOfT.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/WorkloadImpactOperationSource.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ClientIncidentDetails.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ClientIncidentDetails.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConfidenceLevel.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Connectivity.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Connectivity.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorListResult.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorListResult.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorPatch.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorPatch.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorProperties.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorProperties.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorUpdateProperties.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorUpdateProperties.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Content.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Content.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ErrorDetailProperties.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ErrorDetailProperties.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ExpectedValueRange.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ExpectedValueRange.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryListResult.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryListResult.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryProperties.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryProperties.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactDetails.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactDetails.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/IncidentSource.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightListResult.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightListResult.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightProperties.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightProperties.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightPropertiesAdditionalDetails.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightPropertiesAdditionalDetails.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/MetricUnit.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Performance.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Performance.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Platform.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Protocol.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ProvisioningState.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/RequiredImpactProperties.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/RequiredImpactProperties.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/SourceOrTarget.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/SourceOrTarget.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Toolset.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Workload.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Workload.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactListResult.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactListResult.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactProperties.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactProperties.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactPropertiesAdditionalProperties.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactPropertiesAdditionalProperties.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ProviderConstants.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/ConnectorsRestOperations.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/ImpactCategoriesRestOperations.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/InsightsRestOperations.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/WorkloadImpactsRestOperations.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactCollection.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactData.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactData.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactResource.Serialization.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactResource.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Properties/AssemblyInfo.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/tests/Azure.ResourceManager.ImpactReporting.Tests.csproj create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/tests/ImpactReportingManagementTestBase.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/tests/ImpactReportingManagementTestEnvironment.cs create mode 100644 sdk/impactreporting/Azure.ResourceManager.ImpactReporting/tsp-location.yaml create mode 100644 sdk/impactreporting/ci.mgmt.yml create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/Configuration.json create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/tspCodeModel.json create mode 100644 sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiMode.cs create mode 100644 sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiProperties.Serialization.cs create mode 100644 sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiProperties.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/Azure.ResourceManager.PineconeVectorDb.sln create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/CHANGELOG.md create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/Directory.Build.props create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/README.md create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/api/Azure.ResourceManager.PineconeVectorDb.net8.0.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/api/Azure.ResourceManager.PineconeVectorDb.netstandard2.0.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/assets.json create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Azure.ResourceManager.PineconeVectorDb.Samples.csproj create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Generated/Samples/Sample_OrganizationResource.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Generated/Samples/Sample_OrganizationResourceCollection.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Azure.ResourceManager.PineconeVectorDb.csproj create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/ArmPineconeVectorDbModelFactory.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/MockablePineconeVectorDbArmClient.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/MockablePineconeVectorDbResourceGroupResource.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/MockablePineconeVectorDbSubscriptionResource.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/PineconeVectorDbExtensions.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/Argument.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/ChangeTrackingDictionary.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/ChangeTrackingList.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/ModelSerializationExtensions.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/Optional.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/Utf8JsonRequestContent.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/LongRunningOperation/OrganizationResourceOperationSource.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/LongRunningOperation/PineconeVectorDbArmOperation.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/LongRunningOperation/PineconeVectorDbArmOperationOfT.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/MarketplaceDetails.Serialization.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/MarketplaceDetails.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/MarketplaceSubscriptionStatus.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OfferDetails.Serialization.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OfferDetails.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationProperties.Serialization.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationProperties.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourceListResult.Serialization.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourceListResult.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourcePatch.Serialization.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourcePatch.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/PartnerProperties.Serialization.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/PartnerProperties.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/ResourceProvisioningState.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnPropertiesV2.Serialization.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnPropertiesV2.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnState.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnType.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/UserDetails.Serialization.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/UserDetails.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResource.Serialization.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResource.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResourceCollection.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResourceData.Serialization.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResourceData.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/ProviderConstants.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/RestOperations/OrganizationsRestOperations.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Properties/AssemblyInfo.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tests/Azure.ResourceManager.PineconeVectorDb.Tests.csproj create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tests/PineconeVectorDbManagementTestBase.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tests/PineconeVectorDbManagementTestEnvironment.cs create mode 100644 sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tsp-location.yaml create mode 100644 sdk/pineconevectordb/ci.mgmt.yml create mode 100644 sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/Configuration.json create mode 100644 sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tspCodeModel.json create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/Azure.ResourceManager.SiteManager.sln create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/CHANGELOG.md create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/Directory.Build.props create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/README.md create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/api/Azure.ResourceManager.SiteManager.net8.0.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/api/Azure.ResourceManager.SiteManager.netstandard2.0.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/assets.json create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Azure.ResourceManager.SiteManager.Samples.csproj create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Azure.ResourceManager.SiteManager.csproj create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ArmSiteManagerModelFactory.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerArmClient.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerResourceGroupResource.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerSubscriptionResource.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/SiteManagerExtensions.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Argument.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ChangeTrackingDictionary.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ChangeTrackingList.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ModelSerializationExtensions.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Optional.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Utf8JsonRequestContent.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/ResourceGroupSiteOperationSource.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteManagerArmOperation.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteManagerArmOperationOfT.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SubscriptionSiteOperationSource.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/ResourceProvisioningState.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteListResult.Serialization.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteListResult.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteProperties.Serialization.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteProperties.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdate.Serialization.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdate.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdateProperties.Serialization.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdateProperties.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ProviderConstants.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ResourceGroupSiteCollection.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ResourceGroupSiteResource.Serialization.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ResourceGroupSiteResource.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/RestOperations/SitesBySubscriptionRestOperations.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/RestOperations/SitesRestOperations.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteData.Serialization.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteData.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SubscriptionSiteCollection.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SubscriptionSiteResource.Serialization.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SubscriptionSiteResource.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Properties/AssemblyInfo.cs create mode 100644 sdk/sitemanager/Azure.ResourceManager.SiteManager/tsp-location.yaml create mode 100644 sdk/sitemanager/ci.mgmt.yml create mode 100644 sdk/standbypool/Azure.ResourceManager.StandbyPool/Configuration.json create mode 100644 sdk/standbypool/Azure.ResourceManager.StandbyPool/tspCodeModel.json create mode 100644 sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/AuthorizationScopeFilter.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Azure.ResourceManager.SapVirtualInstances.sln create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/CHANGELOG.md create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Directory.Build.props create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/README.md create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/assets.json create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Azure.ResourceManager.SapVirtualInstances.Samples.csproj create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceResource.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceResource.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceCollection.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceResource.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Azure.ResourceManager.SapVirtualInstances.csproj create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ArmSapVirtualInstancesModelFactory.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesArmClient.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesResourceGroupResource.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesSubscriptionResource.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/SapVirtualInstancesExtensions.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Argument.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingDictionary.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingList.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ModelSerializationExtensions.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Optional.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Utf8JsonRequestContent.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapApplicationServerInstanceOperationSource.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapCentralServerInstanceOperationSource.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapDatabaseInstanceOperationSource.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstanceOperationSource.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperation.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperationOfT.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVirtualMachineType.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVirtualMachineType.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSkuName.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerType.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfigurationType.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedResourcesNetworkAccessType.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NamingPatternType.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSType.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentityType.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfigurationType.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseScaleMethod.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseType.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDeploymentType.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapEnvironmentType.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHealthState.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHighAvailabilityType.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapProductType.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSoftwareInstallationType.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProvisioningState.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceState.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceStatus.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ProviderConstants.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapApplicationServerInstancesRestOperations.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapCentralServerInstancesRestOperations.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapDatabaseInstancesRestOperations.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapVirtualInstancesRestOperations.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceCollection.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceCollection.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceCollection.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceCollection.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.Serialization.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Properties/AssemblyInfo.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/Azure.ResourceManager.SapVirtualInstances.Tests.csproj create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/SapVirtualInstancesManagementTestBase.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/SapVirtualInstancesManagementTestEnvironment.cs create mode 100644 sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tsp-location.yaml create mode 100644 sdk/workloadssapvirtualinstance/ci.mgmt.yml diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations.sln b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations.sln new file mode 100644 index 000000000000..3febeda1d79a --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.CommonEdgeSiteManagerOperations.Samples", "samples\Azure.ResourceManager.CommonEdgeSiteManagerOperations.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.CommonEdgeSiteManagerOperations", "src\Azure.ResourceManager.CommonEdgeSiteManagerOperations.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.CommonEdgeSiteManagerOperations.Tests", "tests\Azure.ResourceManager.CommonEdgeSiteManagerOperations.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/CHANGELOG.md b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/Directory.Build.props b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/README.md b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/README.md new file mode 100644 index 000000000000..400d3289e91b --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure CommonEdgeSiteManagerOperations management client library for .NET + +**[Describe the service briefly first.]** + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - 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. + +## Getting started + +### Install the package + +Install the Microsoft Azure CommonEdgeSiteManagerOperations management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.CommonEdgeSiteManagerOperations --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET 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/dev/mgmt_quickstart.md). +- [API References](https://learn.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://aka.ms/azuresdk-net-mgmt-samples) + +## 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 about Microsoft Azure SDK, see [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 +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action 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 other 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/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/api/Azure.ResourceManager.CommonEdgeSiteManagerOperations.net8.0.cs b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/api/Azure.ResourceManager.CommonEdgeSiteManagerOperations.net8.0.cs new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/api/Azure.ResourceManager.CommonEdgeSiteManagerOperations.netstandard2.0.cs b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/api/Azure.ResourceManager.CommonEdgeSiteManagerOperations.netstandard2.0.cs new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/assets.json b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/assets.json new file mode 100644 index 000000000000..72dd3de501b8 --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations", + "Tag": "" +} diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/samples/Azure.ResourceManager.CommonEdgeSiteManagerOperations.Samples.csproj b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/samples/Azure.ResourceManager.CommonEdgeSiteManagerOperations.Samples.csproj new file mode 100644 index 000000000000..3bd0d2c2c204 --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/samples/Azure.ResourceManager.CommonEdgeSiteManagerOperations.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Azure.ResourceManager.CommonEdgeSiteManagerOperations.csproj b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Azure.ResourceManager.CommonEdgeSiteManagerOperations.csproj new file mode 100644 index 000000000000..734b7f9162de --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Azure.ResourceManager.CommonEdgeSiteManagerOperations.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider CommonEdgeSiteManagerOperations. + 1.0.0-beta.1 + azure;management;arm;resource manager;commonedgesitemanageroperations + Azure.ResourceManager.CommonEdgeSiteManagerOperations + + diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Generated/ProviderConstants.cs b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..adf411bd9ea6 --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/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.CommonEdgeSiteManagerOperations +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Properties/AssemblyInfo.cs b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..7e11c0643466 --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.CommonEdgeSiteManagerOperations.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("CommonEdgeSiteManagerOperations")] diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/Azure.ResourceManager.CommonEdgeSiteManagerOperations.Tests.csproj b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/Azure.ResourceManager.CommonEdgeSiteManagerOperations.Tests.csproj new file mode 100644 index 000000000000..1efc30b94c13 --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/Azure.ResourceManager.CommonEdgeSiteManagerOperations.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/CommonEdgeSiteManagerOperationsManagementTestBase.cs b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/CommonEdgeSiteManagerOperationsManagementTestBase.cs new file mode 100644 index 000000000000..2990bf3079ac --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/CommonEdgeSiteManagerOperationsManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.CommonEdgeSiteManagerOperations.Tests +{ + public class CommonEdgeSiteManagerOperationsManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected CommonEdgeSiteManagerOperationsManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected CommonEdgeSiteManagerOperationsManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + 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/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/CommonEdgeSiteManagerOperationsManagementTestEnvironment.cs b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/CommonEdgeSiteManagerOperationsManagementTestEnvironment.cs new file mode 100644 index 000000000000..be1d6c3c9e66 --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tests/CommonEdgeSiteManagerOperationsManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.CommonEdgeSiteManagerOperations.Tests +{ + public class CommonEdgeSiteManagerOperationsManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tsp-location.yaml b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tsp-location.yaml new file mode 100644 index 000000000000..57772593ae81 --- /dev/null +++ b/sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/edge/Microsoft.Edge.Management +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/commonedgesitemanageroperations/ci.mgmt.yml b/sdk/commonedgesitemanageroperations/ci.mgmt.yml new file mode 100644 index 000000000000..da6ca6240b7a --- /dev/null +++ b/sdk/commonedgesitemanageroperations/ci.mgmt.yml @@ -0,0 +1,26 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/commonedgesitemanageroperations /ci.mgmt.yml + - sdk/commonedgesitemanageroperations /Azure.ResourceManager.CommonEdgeSiteManagerOperations / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: commonedgesitemanageroperations + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.CommonEdgeSiteManagerOperations + safeName: AzureResourceManagerCommonEdgeSiteManagerOperations diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Configuration.json b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Configuration.json new file mode 100644 index 000000000000..950808ed35b8 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Configuration.json @@ -0,0 +1,13 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.ComputeFleet", + "library-name": "Azure.ResourceManager.ComputeFleet", + "flavor": "azure", + "use-model-reader-writer": true, + "shared-source-folders": [ + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared", + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "model-namespace": false, + "azure-arm": true +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml index 33e2a8ab89cd..bb26fe9b3812 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/azurefleet/AzureFleet.Management -commit: 7e22a66617633d162735fe65388c2852127b4aac +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 repo: Azure/azure-rest-api-specs - +additionalDirectories: diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tspCodeModel.json b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tspCodeModel.json new file mode 100644 index 000000000000..534d0e2dc1e5 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tspCodeModel.json @@ -0,0 +1,37370 @@ +{ + "$id": "1", + "Name": "Microsoft.AzureFleet", + "ApiVersions": [ + "2024-11-01" + ], + "Enums": [ + { + "$id": "2", + "kind": "enum", + "name": "ComputeFleetProvisioningState", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProvisioningState", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + }, + { + "$id": "10", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Initial creation in progress.", + "decorators": [] + }, + { + "$id": "12", + "kind": "enumvalue", + "name": "Updating", + "value": "Updating", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Update in progress.", + "decorators": [] + }, + { + "$id": "14", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Deletion in progress.", + "decorators": [] + }, + { + "$id": "16", + "kind": "enumvalue", + "name": "Migrating", + "value": "Migrating", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Resource is being migrated from one subscription or resource group to another.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "The status of the current operation.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "18", + "kind": "enum", + "name": "ComputeFleetEvictionPolicy", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.EvictionPolicy", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "20", + "kind": "enumvalue", + "name": "Delete", + "value": "Delete", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "18" + }, + "doc": "When evicted, the Spot VM will be deleted and the corresponding capacity will be updated to reflect this.", + "decorators": [] + }, + { + "$id": "22", + "kind": "enumvalue", + "name": "Deallocate", + "value": "Deallocate", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "18" + }, + "doc": "When evicted, the Spot VM will be deallocated/stopped", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Different kind of eviction policies", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "24", + "kind": "enum", + "name": "SpotAllocationStrategy", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotAllocationStrategy", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "26", + "kind": "enumvalue", + "name": "PriceCapacityOptimized", + "value": "PriceCapacityOptimized", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "Default. VM sizes distribution will be determined to optimize for both price and capacity.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "LowestPrice", + "value": "LowestPrice", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "VM sizes distribution will be determined to optimize for price. Note: Capacity will still be considered here but will be given much less weight.", + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "CapacityOptimized", + "value": "CapacityOptimized", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "VM sizes distribution will be determined to optimize for capacity.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Spot allocation strategy types for Compute Fleet", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "32", + "kind": "enum", + "name": "RegularPriorityAllocationStrategy", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityAllocationStrategy", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "34", + "kind": "enumvalue", + "name": "LowestPrice", + "value": "LowestPrice", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "Default. VM sizes distribution will be determined to optimize for price.", + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "Prioritized", + "value": "Prioritized", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "VM sizes distribution will be determined to optimize for the 'priority' as specified for each vm size.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Regular VM Allocation strategy types for Compute Fleet", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "38", + "kind": "enum", + "name": "ComputeFleetVMAttributeSupport", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeSupport", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "40", + "kind": "enumvalue", + "name": "Excluded", + "value": "Excluded", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "All VMSizes having the feature support will be excluded.", + "decorators": [] + }, + { + "$id": "42", + "kind": "enumvalue", + "name": "Included", + "value": "Included", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": " VMSizes that have the feature support and that do not have the feature support will be used. Included is a union of Excluded and Required.", + "decorators": [] + }, + { + "$id": "44", + "kind": "enumvalue", + "name": "Required", + "value": "Required", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Only the VMSizes having the feature support will be used.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "VMSizes supported by Azure VMs. Included is a union of Excluded and Required.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "46", + "kind": "enum", + "name": "LocalStorageDiskType", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LocalStorageDiskType", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "48", + "kind": "enumvalue", + "name": "HDD", + "value": "HDD", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "46" + }, + "doc": "HDD DiskType.", + "decorators": [] + }, + { + "$id": "50", + "kind": "enumvalue", + "name": "SSD", + "value": "SSD", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "46" + }, + "doc": "SDD DiskType.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Different kind of Local storage disk types supported by Azure VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "52", + "kind": "enum", + "name": "AcceleratorManufacturer", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AcceleratorManufacturer", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "54", + "kind": "enumvalue", + "name": "AMD", + "value": "AMD", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "doc": "AMD GpuType", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "Nvidia", + "value": "Nvidia", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "doc": "Nvidia GpuType", + "decorators": [] + }, + { + "$id": "58", + "kind": "enumvalue", + "name": "Xilinx", + "value": "Xilinx", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "52" + }, + "doc": "Xilinx GpuType", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Accelerator manufacturers supported by Azure VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "60", + "kind": "enum", + "name": "AcceleratorType", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AcceleratorType", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "62", + "kind": "enumvalue", + "name": "GPU", + "value": "GPU", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "doc": "GPU Accelerator", + "decorators": [] + }, + { + "$id": "64", + "kind": "enumvalue", + "name": "FPGA", + "value": "FPGA", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "doc": "FPGA Accelerator", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Accelerator types supported by Azure VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "66", + "kind": "enum", + "name": "ComputeFleetVmCategory", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMCategory", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "68", + "kind": "enumvalue", + "name": "GeneralPurpose", + "value": "GeneralPurpose", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "doc": "General purpose VM sizes provide balanced CPU-to-memory ratio. Ideal for testing and development, small to medium databases, and low to medium traffic web servers.", + "decorators": [] + }, + { + "$id": "70", + "kind": "enumvalue", + "name": "ComputeOptimized", + "value": "ComputeOptimized", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "doc": "Compute optimized VM sizes have a high CPU-to-memory ratio. These sizes are good for medium traffic web servers, network appliances, batch processes, and application servers.", + "decorators": [] + }, + { + "$id": "72", + "kind": "enumvalue", + "name": "MemoryOptimized", + "value": "MemoryOptimized", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "doc": "Memory optimized VM sizes offer a high memory-to-CPU ratio that is great for relational database servers, medium to large caches, and in-memory analytics.", + "decorators": [] + }, + { + "$id": "74", + "kind": "enumvalue", + "name": "StorageOptimized", + "value": "StorageOptimized", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "doc": "Storage optimized virtual machine (VM) sizes offer high disk throughput and IO, and are ideal for Big Data, SQL, NoSQL databases, data warehousing, and large transactional databases. \nExamples include Cassandra, MongoDB, Cloudera, and Redis.", + "decorators": [] + }, + { + "$id": "76", + "kind": "enumvalue", + "name": "GpuAccelerated", + "value": "GpuAccelerated", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "doc": "GPU optimized VM sizes are specialized virtual machines available with single, multiple, or fractional GPUs. \nThese sizes are designed for compute-intensive, graphics-intensive, and visualization workloads.", + "decorators": [] + }, + { + "$id": "78", + "kind": "enumvalue", + "name": "FpgaAccelerated", + "value": "FpgaAccelerated", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "doc": "FPGA optimized VM sizes are specialized virtual machines available with single or multiple FPGA. \nThese sizes are designed for compute-intensive workloads. This article provides information about the number and type of FPGA, vCPUs, data disks, and NICs. \nStorage throughput and network bandwidth are also included for each size in this grouping.", + "decorators": [] + }, + { + "$id": "80", + "kind": "enumvalue", + "name": "HighPerformanceCompute", + "value": "HighPerformanceCompute", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "doc": "Azure High Performance Compute VMs are optimized for various HPC workloads such as computational fluid dynamics, finite element analysis, frontend and backend EDA, \nrendering, molecular dynamics, computational geo science, weather simulation, and financial risk analysis.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "VMCategories defined for Azure VMs.\nSee: https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/overview?tabs=breakdownseries%2Cgeneralsizelist%2Ccomputesizelist%2Cmemorysizelist%2Cstoragesizelist%2Cgpusizelist%2Cfpgasizelist%2Chpcsizelist#general-purpose", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "82", + "kind": "enum", + "name": "ArchitectureType", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ArchitectureType", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "84", + "kind": "enumvalue", + "name": "ARM64", + "value": "ARM64", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "82" + }, + "doc": "ARM64 Architecture", + "decorators": [] + }, + { + "$id": "86", + "kind": "enumvalue", + "name": "X64", + "value": "X64", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "82" + }, + "doc": "X64 Architecture", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Architecture types supported by Azure VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "88", + "kind": "enum", + "name": "CpuManufacturer", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.CpuManufacturer", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "90", + "kind": "enumvalue", + "name": "Intel", + "value": "Intel", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "88" + }, + "doc": "Intel CPU.", + "decorators": [] + }, + { + "$id": "92", + "kind": "enumvalue", + "name": "AMD", + "value": "AMD", + "valueType": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "88" + }, + "doc": "AMD CPU.", + "decorators": [] + }, + { + "$id": "94", + "kind": "enumvalue", + "name": "Microsoft", + "value": "Microsoft", + "valueType": { + "$id": "95", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "88" + }, + "doc": "Microsoft CPU.", + "decorators": [] + }, + { + "$id": "96", + "kind": "enumvalue", + "name": "Ampere", + "value": "Ampere", + "valueType": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "88" + }, + "doc": "Ampere CPU.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Cpu Manufacturers supported by Azure VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "98", + "kind": "enum", + "name": "WindowsSetupAdditionalInformation_passName", + "valueType": { + "$id": "99", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "100", + "kind": "enumvalue", + "name": "OobeSystem", + "value": "OobeSystem", + "doc": "OobeSystem", + "valueType": { + "$ref": "99" + }, + "enumType": { + "$ref": "98" + } + } + ], + "crossLanguageDefinitionId": "", + "namespace": "Microsoft.AzureFleet", + "doc": "The WindowsSetupAdditionalInformation_passName", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "101", + "kind": "enum", + "name": "WindowsSetupAdditionalInformation_componentName", + "valueType": { + "$id": "102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "103", + "kind": "enumvalue", + "name": "Microsoft-Windows-Shell-Setup", + "value": "Microsoft-Windows-Shell-Setup", + "doc": "Microsoft-Windows-Shell-Setup", + "valueType": { + "$ref": "102" + }, + "enumType": { + "$ref": "101" + } + } + ], + "crossLanguageDefinitionId": "", + "namespace": "Microsoft.AzureFleet", + "doc": "The WindowsSetupAdditionalInformation_componentName", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "104", + "kind": "enum", + "name": "AdditionalInformationSettingNames", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SettingNames", + "valueType": { + "$id": "105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "106", + "kind": "enumvalue", + "name": "AutoLogon", + "value": "AutoLogon", + "valueType": { + "$id": "107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "104" + }, + "doc": "AutoLogon setting", + "decorators": [] + }, + { + "$id": "108", + "kind": "enumvalue", + "name": "FirstLogonCommands", + "value": "FirstLogonCommands", + "valueType": { + "$id": "109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "104" + }, + "doc": "FirstLogonCommands setting", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the name of the setting to which the content applies. Possible values\nare: FirstLogonCommands and AutoLogon.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "110", + "kind": "enum", + "name": "ComputeFleetWindowsVMGuestPatchMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchMode", + "valueType": { + "$id": "111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "112", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$id": "113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "110" + }, + "doc": "You control the application of patches to a virtual machine.\nYou do this by applying patches manually inside the VM. In this mode,\nautomatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates\nmust be false", + "decorators": [] + }, + { + "$id": "114", + "kind": "enumvalue", + "name": "AutomaticByOS", + "value": "AutomaticByOS", + "valueType": { + "$id": "115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "110" + }, + "doc": "The virtual machine will automatically be updated by the OS.\nThe property WindowsConfiguration.enableAutomaticUpdates must be true.", + "decorators": [] + }, + { + "$id": "116", + "kind": "enumvalue", + "name": "AutomaticByPlatform", + "value": "AutomaticByPlatform", + "valueType": { + "$id": "117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "110" + }, + "doc": "The virtual machine will automatically updated by the platform. The properties\nprovisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual\nmachines associated to virtual machine scale set with OrchestrationMode as\nFlexible.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "118", + "kind": "enum", + "name": "ComputeFleetWindowsPatchAssessmentMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsPatchAssessmentMode", + "valueType": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "120", + "kind": "enumvalue", + "name": "ImageDefault", + "value": "ImageDefault", + "valueType": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "118" + }, + "doc": "You control the timing of patch assessments on a virtual machine.", + "decorators": [] + }, + { + "$id": "122", + "kind": "enumvalue", + "name": "AutomaticByPlatform", + "value": "AutomaticByPlatform", + "valueType": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "118" + }, + "doc": "The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "124", + "kind": "enum", + "name": "ComputeFleetWindowsVMGuestPatchAutomaticByPlatformRebootSetting", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchAutomaticByPlatformRebootSetting", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "126", + "kind": "enumvalue", + "name": "Unknown", + "value": "Unknown", + "valueType": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "124" + }, + "doc": "Unknown Reboot setting", + "decorators": [] + }, + { + "$id": "128", + "kind": "enumvalue", + "name": "IfRequired", + "value": "IfRequired", + "valueType": { + "$id": "129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "124" + }, + "doc": "IfRequired Reboot setting", + "decorators": [] + }, + { + "$id": "130", + "kind": "enumvalue", + "name": "Never", + "value": "Never", + "valueType": { + "$id": "131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "124" + }, + "doc": "Never Reboot setting", + "decorators": [] + }, + { + "$id": "132", + "kind": "enumvalue", + "name": "Always", + "value": "Always", + "valueType": { + "$id": "133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "124" + }, + "doc": "Always Reboot setting", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the reboot setting for all AutomaticByPlatform patch installation operations.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "134", + "kind": "enum", + "name": "ComputeFleetProtocolTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProtocolTypes", + "valueType": { + "$id": "135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "136", + "kind": "enumvalue", + "name": "Http", + "value": "Http", + "valueType": { + "$id": "137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "134" + }, + "doc": "Http protocol", + "decorators": [] + }, + { + "$id": "138", + "kind": "enumvalue", + "name": "Https", + "value": "Https", + "valueType": { + "$id": "139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "134" + }, + "doc": "Https protocol", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the protocol of WinRM listener. Possible values are: **http,**\n**https.**", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "140", + "kind": "enum", + "name": "ComputeFleetLinuxVMGuestPatchMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchMode", + "valueType": { + "$id": "141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "142", + "kind": "enumvalue", + "name": "ImageDefault", + "value": "ImageDefault", + "valueType": { + "$id": "143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "140" + }, + "doc": "The virtual machine's default patching configuration is used.", + "decorators": [] + }, + { + "$id": "144", + "kind": "enumvalue", + "name": "AutomaticByPlatform", + "value": "AutomaticByPlatform", + "valueType": { + "$id": "145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "140" + }, + "doc": "The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual\nmachines associated to virtual machine scale set with OrchestrationMode as\nFlexible.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "146", + "kind": "enum", + "name": "ComputeFleetLinuxPatchAssessmentMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxPatchAssessmentMode", + "valueType": { + "$id": "147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "148", + "kind": "enumvalue", + "name": "ImageDefault", + "value": "ImageDefault", + "valueType": { + "$id": "149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "146" + }, + "doc": "You control the timing of patch assessments on a virtual machine.", + "decorators": [] + }, + { + "$id": "150", + "kind": "enumvalue", + "name": "AutomaticByPlatform", + "value": "AutomaticByPlatform", + "valueType": { + "$id": "151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "146" + }, + "doc": "The platform will trigger periodic patch assessments.The property provisionVMAgent must be true.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the mode of VM Guest Patch Assessment for the IaaS virtual\nmachine.

Possible values are:

**ImageDefault** - You\ncontrol the timing of patch assessments on a virtual machine.

\n**AutomaticByPlatform** - The platform will trigger periodic patch assessments.\nThe property provisionVMAgent must be true.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "152", + "kind": "enum", + "name": "ComputeFleetLinuxVMGuestPatchAutomaticByPlatformRebootSetting", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchAutomaticByPlatformRebootSetting", + "valueType": { + "$id": "153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "154", + "kind": "enumvalue", + "name": "Unknown", + "value": "Unknown", + "valueType": { + "$id": "155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "152" + }, + "doc": "Unknown Reboot setting", + "decorators": [] + }, + { + "$id": "156", + "kind": "enumvalue", + "name": "IfRequired", + "value": "IfRequired", + "valueType": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "152" + }, + "doc": "IfRequired Reboot setting", + "decorators": [] + }, + { + "$id": "158", + "kind": "enumvalue", + "name": "Never", + "value": "Never", + "valueType": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "152" + }, + "doc": "Never Reboot setting", + "decorators": [] + }, + { + "$id": "160", + "kind": "enumvalue", + "name": "Always", + "value": "Always", + "valueType": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "152" + }, + "doc": "Always Reboot setting", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the reboot setting for all AutomaticByPlatform patch installation\noperations.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "162", + "kind": "enum", + "name": "ComputeFleetCachingTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.CachingTypes", + "valueType": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "164", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "162" + }, + "doc": "'None' is default for Standard Storage", + "decorators": [] + }, + { + "$id": "166", + "kind": "enumvalue", + "name": "ReadOnly", + "value": "ReadOnly", + "valueType": { + "$id": "167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "162" + }, + "doc": "'ReadOnly' is default for Premium Storage", + "decorators": [] + }, + { + "$id": "168", + "kind": "enumvalue", + "name": "ReadWrite", + "value": "ReadWrite", + "valueType": { + "$id": "169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "162" + }, + "doc": "'ReadWrite' is default for OS Disk", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the caching requirements.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "170", + "kind": "enum", + "name": "ComputeFleetDiskCreateOptionTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskCreateOptionTypes", + "valueType": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "172", + "kind": "enumvalue", + "name": "FromImage", + "value": "FromImage", + "valueType": { + "$id": "173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "doc": "This value is used when you are using an image to create the virtual machine.\nIf you are using a platform image, you also use the imageReference element\ndescribed above. If you are using a marketplace image, you also use the\nplan element previously described.", + "decorators": [] + }, + { + "$id": "174", + "kind": "enumvalue", + "name": "Empty", + "value": "Empty", + "valueType": { + "$id": "175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "doc": "This value is used when creating an empty data disk.", + "decorators": [] + }, + { + "$id": "176", + "kind": "enumvalue", + "name": "Attach", + "value": "Attach", + "valueType": { + "$id": "177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "doc": "This value is used when you are using a specialized disk to create the virtual machine.", + "decorators": [] + }, + { + "$id": "178", + "kind": "enumvalue", + "name": "Copy", + "value": "Copy", + "valueType": { + "$id": "179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "doc": "This value is used to create a data disk from a snapshot or another disk.", + "decorators": [] + }, + { + "$id": "180", + "kind": "enumvalue", + "name": "Restore", + "value": "Restore", + "valueType": { + "$id": "181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "doc": "This value is used to create a data disk from a disk restore point.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies how the virtual machine should be created.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "182", + "kind": "enum", + "name": "ComputeFleetDiffDiskOptions", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskOptions", + "valueType": { + "$id": "183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "184", + "kind": "enumvalue", + "name": "Local", + "value": "Local", + "valueType": { + "$id": "185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "182" + }, + "doc": "Local Option.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the ephemeral disk option for operating system disk.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "186", + "kind": "enum", + "name": "ComputeFleetDiffDiskPlacement", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskPlacement", + "valueType": { + "$id": "187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "188", + "kind": "enumvalue", + "name": "CacheDisk", + "value": "CacheDisk", + "valueType": { + "$id": "189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "186" + }, + "doc": "CacheDisk option.", + "decorators": [] + }, + { + "$id": "190", + "kind": "enumvalue", + "name": "ResourceDisk", + "value": "ResourceDisk", + "valueType": { + "$id": "191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "186" + }, + "doc": "Resource Disk option.", + "decorators": [] + }, + { + "$id": "192", + "kind": "enumvalue", + "name": "NvmeDisk", + "value": "NvmeDisk", + "valueType": { + "$id": "193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "186" + }, + "doc": "NvmeDisk option.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the ephemeral disk placement for operating system disk. This property\ncan be used by user in the request to choose the location i.e, cache disk or\nresource disk space for Ephemeral OS disk provisioning. For more information on\nEphemeral OS disk size requirements, please refer Ephemeral OS disk size\nrequirements for Windows VM at\nhttps://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements\nand Linux VM at\nhttps://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements\nMinimum api-version for NvmeDisk: 2024-03-01.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "194", + "kind": "enum", + "name": "ComputeFleetOperatingSystemTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.OperatingSystemTypes", + "valueType": { + "$id": "195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "196", + "kind": "enumvalue", + "name": "Windows", + "value": "Windows", + "valueType": { + "$id": "197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "194" + }, + "doc": "Windows OS type", + "decorators": [] + }, + { + "$id": "198", + "kind": "enumvalue", + "name": "Linux", + "value": "Linux", + "valueType": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "194" + }, + "doc": "Linux OS type", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "This property allows you to specify the type of the OS that is included in the\ndisk if creating a VM from user-image or a specialized VHD. Possible values\nare: **Windows,** **Linux.**", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "200", + "kind": "enum", + "name": "ComputeFleetStorageAccountTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.StorageAccountTypes", + "valueType": { + "$id": "201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "202", + "kind": "enumvalue", + "name": "StandardLrs", + "value": "Standard_LRS", + "valueType": { + "$id": "203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "doc": "Standard_LRS option.", + "decorators": [] + }, + { + "$id": "204", + "kind": "enumvalue", + "name": "PremiumLrs", + "value": "Premium_LRS", + "valueType": { + "$id": "205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "doc": "Premium_LRS option.", + "decorators": [] + }, + { + "$id": "206", + "kind": "enumvalue", + "name": "StandardSsdLrd", + "value": "StandardSSD_LRS", + "valueType": { + "$id": "207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "doc": "StandardSSD_LRS option.", + "decorators": [] + }, + { + "$id": "208", + "kind": "enumvalue", + "name": "UltraSsdLrs", + "value": "UltraSSD_LRS", + "valueType": { + "$id": "209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "doc": "UltraSSD_LRS option.", + "decorators": [] + }, + { + "$id": "210", + "kind": "enumvalue", + "name": "PremiumZrs", + "value": "Premium_ZRS", + "valueType": { + "$id": "211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "doc": "Premium_ZRS option.", + "decorators": [] + }, + { + "$id": "212", + "kind": "enumvalue", + "name": "StandardSsdZrs", + "value": "StandardSSD_ZRS", + "valueType": { + "$id": "213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "doc": "StandardSSD_ZRS option.", + "decorators": [] + }, + { + "$id": "214", + "kind": "enumvalue", + "name": "PremiumV2_LRS", + "value": "PremiumV2_LRS", + "valueType": { + "$id": "215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "doc": "PremiumV2_LRS option.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the storage account type for the managed disk. Managed OS disk\nstorage account type can only be set when you create the scale set. NOTE:\nUltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk.\nStandard_LRS uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS\nuses Premium SSD. UltraSSD_LRS uses Ultra disk. Premium_ZRS uses Premium SSD\nzone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant\nstorage. For more information regarding disks supported for Windows Virtual\nMachines, refer to\nhttps://learn.microsoft.com/azure/virtual-machines/windows/disks-types and, for\nLinux Virtual Machines, refer to\nhttps://learn.microsoft.com/azure/virtual-machines/linux/disks-types", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "216", + "kind": "enum", + "name": "ComputeFleetSecurityEncryptionTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityEncryptionTypes", + "valueType": { + "$id": "217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "218", + "kind": "enumvalue", + "name": "VMGuestStateOnly", + "value": "VMGuestStateOnly", + "valueType": { + "$id": "219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "216" + }, + "doc": "EncryptionType of the managed disk is set to VMGuestStateOnly for encryption\nof just the VMGuestState blob.", + "decorators": [] + }, + { + "$id": "220", + "kind": "enumvalue", + "name": "DiskWithVMGuestState", + "value": "DiskWithVMGuestState", + "valueType": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "216" + }, + "doc": "EncryptionType of the managed disk is set to DiskWithVMGuestState for encryption\nof the managed disk along with VMGuestState blob.", + "decorators": [] + }, + { + "$id": "222", + "kind": "enumvalue", + "name": "NonPersistedTpm", + "value": "NonPersistedTPM", + "valueType": { + "$id": "223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "216" + }, + "doc": "EncryptionType of the managed disk is set to NonPersistedTPM for not persisting\nfirmware state in the VMGuestState blob.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the EncryptionType of the managed disk.\n**Note:** It can be set for only Confidential VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "224", + "kind": "enum", + "name": "ComputeFleetDiskDeleteOptionTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskDeleteOptionTypes", + "valueType": { + "$id": "225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "226", + "kind": "enumvalue", + "name": "Delete", + "value": "Delete", + "valueType": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "224" + }, + "doc": "If this value is used, the managed disk is deleted when VM gets deleted.", + "decorators": [] + }, + { + "$id": "228", + "kind": "enumvalue", + "name": "Detach", + "value": "Detach", + "valueType": { + "$id": "229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "224" + }, + "doc": "If this value is used, the managed disk is retained after VM gets deleted.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the behavior of the managed disk when the VM gets deleted, for\nexample whether the managed disk is deleted or detached. Supported values are:\n**Delete.** If this value is used, the managed disk is deleted when VM gets\ndeleted. **Detach.** If this value is used, the managed disk is retained after\nVM gets deleted. Minimum api-version: 2021-03-01.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "230", + "kind": "enum", + "name": "ComputeFleetDiskControllerTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskControllerTypes", + "valueType": { + "$id": "231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "232", + "kind": "enumvalue", + "name": "Scsi", + "value": "SCSI", + "valueType": { + "$id": "233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "230" + }, + "doc": "SCSI disk type", + "decorators": [] + }, + { + "$id": "234", + "kind": "enumvalue", + "name": "Nvme", + "value": "NVMe", + "valueType": { + "$id": "235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "230" + }, + "doc": "NVMe disk type", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the disk controller type configured for the VM and\nVirtualMachineScaleSet. This property is only supported for virtual machines\nwhose operating system disk and VM sku supports Generation 2\n(https://learn.microsoft.com/en-us/azure/virtual-machines/generation-2), please\ncheck the HyperVGenerations capability returned as part of VM sku capabilities\nin the response of Microsoft.Compute SKUs api for the region contains V2\n(https://learn.microsoft.com/rest/api/compute/resourceskus/list). For more\ninformation about Disk Controller Types supported please refer to\nhttps://aka.ms/azure-diskcontrollertypes.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "236", + "kind": "enum", + "name": "ComputeFleetDomainNameLabelScopeTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DomainNameLabelScopeTypes", + "valueType": { + "$id": "237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "238", + "kind": "enumvalue", + "name": "TenantReuse", + "value": "TenantReuse", + "valueType": { + "$id": "239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "236" + }, + "doc": "TenantReuse type", + "decorators": [] + }, + { + "$id": "240", + "kind": "enumvalue", + "name": "SubscriptionReuse", + "value": "SubscriptionReuse", + "valueType": { + "$id": "241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "236" + }, + "doc": "SubscriptionReuse type", + "decorators": [] + }, + { + "$id": "242", + "kind": "enumvalue", + "name": "ResourceGroupReuse", + "value": "ResourceGroupReuse", + "valueType": { + "$id": "243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "236" + }, + "doc": "ResourceGroupReuse type", + "decorators": [] + }, + { + "$id": "244", + "kind": "enumvalue", + "name": "NoReuse", + "value": "NoReuse", + "valueType": { + "$id": "245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "236" + }, + "doc": "NoReuse type", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "The Domain name label scope.The concatenation of the hashed domain name label\nthat generated according to the policy from domain name label scope and vm\nindex will be the domain name labels of the PublicIPAddress resources that will\nbe created", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "246", + "kind": "enum", + "name": "ComputeFleetIPVersion", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.IPVersion", + "valueType": { + "$id": "247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "248", + "kind": "enumvalue", + "name": "IPv4", + "value": "IPv4", + "valueType": { + "$id": "249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "246" + }, + "doc": "IPv4 version", + "decorators": [] + }, + { + "$id": "250", + "kind": "enumvalue", + "name": "IPv6", + "value": "IPv6", + "valueType": { + "$id": "251", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "246" + }, + "doc": "IPv6 version", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Available from Api-Version 2017-03-30 onwards, it represents whether the\nspecific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible\nvalues are: 'IPv4' and 'IPv6'.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "252", + "kind": "enum", + "name": "ComputeFleetVmDeleteOptions", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DeleteOptions", + "valueType": { + "$id": "253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "254", + "kind": "enumvalue", + "name": "Delete", + "value": "Delete", + "valueType": { + "$id": "255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "252" + }, + "doc": "Delete Option", + "decorators": [] + }, + { + "$id": "256", + "kind": "enumvalue", + "name": "Detach", + "value": "Detach", + "valueType": { + "$id": "257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "252" + }, + "doc": "Detach Option", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specify what happens to the network interface when the VM is deleted", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "258", + "kind": "enum", + "name": "ComputeFleetPublicIPAddressSkuName", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSkuName", + "valueType": { + "$id": "259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "260", + "kind": "enumvalue", + "name": "Basic", + "value": "Basic", + "valueType": { + "$id": "261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "258" + }, + "doc": "Basic sku name", + "decorators": [] + }, + { + "$id": "262", + "kind": "enumvalue", + "name": "Standard", + "value": "Standard", + "valueType": { + "$id": "263", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "258" + }, + "doc": "Standard sku name", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specify public IP sku name.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "264", + "kind": "enum", + "name": "ComputeFleetPublicIPAddressSkuTier", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSkuTier", + "valueType": { + "$id": "265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "266", + "kind": "enumvalue", + "name": "Regional", + "value": "Regional", + "valueType": { + "$id": "267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "264" + }, + "doc": "Regional sku tier", + "decorators": [] + }, + { + "$id": "268", + "kind": "enumvalue", + "name": "Global", + "value": "Global", + "valueType": { + "$id": "269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "264" + }, + "doc": "Global sku tier", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specify public IP sku tier", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "270", + "kind": "enum", + "name": "ComputeFleetNetworkInterfaceAuxiliaryMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.NetworkInterfaceAuxiliaryMode", + "valueType": { + "$id": "271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "272", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "270" + }, + "doc": "None Mode", + "decorators": [] + }, + { + "$id": "274", + "kind": "enumvalue", + "name": "AcceleratedConnections", + "value": "AcceleratedConnections", + "valueType": { + "$id": "275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "270" + }, + "doc": "AcceleratedConnections Mode", + "decorators": [] + }, + { + "$id": "276", + "kind": "enumvalue", + "name": "Floating", + "value": "Floating", + "valueType": { + "$id": "277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "270" + }, + "doc": "Floating Mode", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies whether the Auxiliary mode is enabled for the Network Interface\nresource.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "278", + "kind": "enum", + "name": "ComputeFleetNetworkInterfaceAuxiliarySku", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.NetworkInterfaceAuxiliarySku", + "valueType": { + "$id": "279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "280", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "278" + }, + "doc": "no sku", + "decorators": [] + }, + { + "$id": "282", + "kind": "enumvalue", + "name": "A1", + "value": "A1", + "valueType": { + "$id": "283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "278" + }, + "doc": "A1 sku", + "decorators": [] + }, + { + "$id": "284", + "kind": "enumvalue", + "name": "A2", + "value": "A2", + "valueType": { + "$id": "285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "278" + }, + "doc": "A2 sku", + "decorators": [] + }, + { + "$id": "286", + "kind": "enumvalue", + "name": "A4", + "value": "A4", + "valueType": { + "$id": "287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "278" + }, + "doc": "A4 sku", + "decorators": [] + }, + { + "$id": "288", + "kind": "enumvalue", + "name": "A8", + "value": "A8", + "valueType": { + "$id": "289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "278" + }, + "doc": "A8 sku", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies whether the Auxiliary sku is enabled for the Network Interface\nresource.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "290", + "kind": "enum", + "name": "ComputeFleetNetworkApiVersion", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.NetworkApiVersion", + "valueType": { + "$id": "291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "292", + "kind": "enumvalue", + "name": "v2020_11_01", + "value": "2020-11-01", + "valueType": { + "$id": "293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "290" + }, + "doc": "Initial version supported. Later versions are supported as well.", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "specifies the Microsoft.Network API version used when creating networking\nresources in the Network Interface Configurations for Virtual Machine Scale Set\nwith orchestration mode 'Flexible'", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "294", + "kind": "enum", + "name": "ComputeFleetSecurityTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityTypes", + "valueType": { + "$id": "295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "296", + "kind": "enumvalue", + "name": "TrustedLaunch", + "value": "TrustedLaunch", + "valueType": { + "$id": "297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "294" + }, + "doc": "TrustedLaunch security type", + "decorators": [] + }, + { + "$id": "298", + "kind": "enumvalue", + "name": "ConfidentialVM", + "value": "ConfidentialVM", + "valueType": { + "$id": "299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "294" + }, + "doc": "ConfidentialVM security type", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the SecurityType of the virtual machine. It has to be set to any\nspecified value to enable UefiSettings. The default behavior is: UefiSettings\nwill not be enabled unless this property is set.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "300", + "kind": "enum", + "name": "ProxyAgentExecuteMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Mode", + "valueType": { + "$id": "301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "302", + "kind": "enumvalue", + "name": "Audit", + "value": "Audit", + "valueType": { + "$id": "303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "300" + }, + "doc": "Audit Mode", + "decorators": [] + }, + { + "$id": "304", + "kind": "enumvalue", + "name": "Enforce", + "value": "Enforce", + "valueType": { + "$id": "305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "300" + }, + "doc": "Enforce Mode", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Specifies the mode that ProxyAgent will execute on if the feature is enabled.\nProxyAgent will start to audit or monitor but not enforce access control over\nrequests to host endpoints in Audit mode, while in Enforce mode it will enforce\naccess control. The default value is Enforce mode.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "306", + "kind": "enum", + "name": "ManagedServiceIdentityType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "valueType": { + "$id": "307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "308", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "306" + }, + "doc": "No managed identity.", + "decorators": [] + }, + { + "$id": "310", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$id": "311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "306" + }, + "doc": "System assigned managed identity.", + "decorators": [] + }, + { + "$id": "312", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$id": "313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "306" + }, + "doc": "User assigned managed identity.", + "decorators": [] + }, + { + "$id": "314", + "kind": "enumvalue", + "name": "SystemAssigned,UserAssigned", + "value": "SystemAssigned,UserAssigned", + "valueType": { + "$id": "315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "306" + }, + "doc": "System and user assigned managed identity.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "316", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "317", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "318", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "316" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "320", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "316" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "322", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "323", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "316" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "324", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "316" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "326", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "327", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "328", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "326" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "330", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "326" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "332", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "326" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "334", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "335", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "336", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "337", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "334" + }, + "doc": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "338", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "339", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "334" + }, + "doc": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "340", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "334" + }, + "doc": "Indicates the operation is initiated by a user or system.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "342", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "344", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "342" + }, + "doc": "Actions are for internal-only APIs.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "346", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Versions", + "valueType": { + "$id": "347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "348", + "kind": "enumvalue", + "name": "v2024_11_01", + "value": "2024-11-01", + "valueType": { + "$id": "349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "doc": "Public Api version", + "decorators": [] + } + ], + "namespace": "Microsoft.AzureFleet", + "doc": "Api versions", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "Models": [ + { + "$id": "350", + "kind": "model", + "name": "ComputeFleet", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "An Compute Fleet resource", + "decorators": [], + "baseModel": { + "$id": "351", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$id": "352", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "353", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "type": { + "$id": "354", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", + "serializationOptions": { + "$id": "356", + "json": { + "$id": "357", + "name": "id" + } + } + }, + { + "$id": "358", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name", + "serializationOptions": { + "$id": "360", + "json": { + "$id": "361", + "name": "name" + } + } + }, + { + "$id": "362", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "363", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "364", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type", + "serializationOptions": { + "$id": "365", + "json": { + "$id": "366", + "name": "type" + } + } + }, + { + "$id": "367", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "368", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "369", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "370", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy", + "serializationOptions": { + "$id": "371", + "json": { + "$id": "372", + "name": "createdBy" + } + } + }, + { + "$id": "373", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "316" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "374", + "json": { + "$id": "375", + "name": "createdByType" + } + } + }, + { + "$id": "376", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "377", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "378", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt", + "serializationOptions": { + "$id": "379", + "json": { + "$id": "380", + "name": "createdAt" + } + } + }, + { + "$id": "381", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "382", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy", + "serializationOptions": { + "$id": "383", + "json": { + "$id": "384", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "385", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "316" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "386", + "json": { + "$id": "387", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "388", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "389", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "390", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt", + "serializationOptions": { + "$id": "391", + "json": { + "$id": "392", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "393", + "json": { + "$id": "394", + "name": "systemData" + } + } + } + ] + }, + "properties": [ + { + "$id": "395", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "396", + "kind": "dict", + "keyType": { + "$id": "397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "398", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags", + "serializationOptions": { + "$id": "399", + "json": { + "$id": "400", + "name": "tags" + } + } + }, + { + "$id": "401", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "402", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location", + "serializationOptions": { + "$id": "403", + "json": { + "$id": "404", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "405", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "406", + "kind": "model", + "name": "ComputeFleetProperties", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Details of the Compute Fleet.", + "decorators": [], + "properties": [ + { + "$id": "407", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.provisioningState", + "serializationOptions": { + "$id": "408", + "json": { + "$id": "409", + "name": "provisioningState" + } + } + }, + { + "$id": "410", + "kind": "property", + "name": "spotPriorityProfile", + "serializedName": "spotPriorityProfile", + "doc": "Configuration Options for Spot instances in Compute Fleet.", + "type": { + "$id": "411", + "kind": "model", + "name": "SpotPriorityProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Configuration Options for Spot instances in Compute Fleet.", + "decorators": [], + "properties": [ + { + "$id": "412", + "kind": "property", + "name": "capacity", + "serializedName": "capacity", + "doc": "Total capacity to achieve. It is currently in terms of number of VMs.", + "type": { + "$id": "413", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.capacity", + "serializationOptions": { + "$id": "414", + "json": { + "$id": "415", + "name": "capacity" + } + } + }, + { + "$id": "416", + "kind": "property", + "name": "minCapacity", + "serializedName": "minCapacity", + "doc": "Minimum capacity to achieve which cannot be updated. If we will not be able to \"guarantee\" minimum capacity, we will reject the request in the sync path itself.", + "type": { + "$id": "417", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.minCapacity", + "serializationOptions": { + "$id": "418", + "json": { + "$id": "419", + "name": "minCapacity" + } + } + }, + { + "$id": "420", + "kind": "property", + "name": "maxPricePerVM", + "serializedName": "maxPricePerVM", + "doc": "Price per hour of each Spot VM will never exceed this.", + "type": { + "$id": "421", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.maxPricePerVM", + "serializationOptions": { + "$id": "422", + "json": { + "$id": "423", + "name": "maxPricePerVM" + } + } + }, + { + "$id": "424", + "kind": "property", + "name": "evictionPolicy", + "serializedName": "evictionPolicy", + "doc": "Eviction Policy to follow when evicting Spot VMs.", + "type": { + "$ref": "18" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.evictionPolicy", + "serializationOptions": { + "$id": "425", + "json": { + "$id": "426", + "name": "evictionPolicy" + } + } + }, + { + "$id": "427", + "kind": "property", + "name": "allocationStrategy", + "serializedName": "allocationStrategy", + "doc": "Allocation strategy to follow when determining the VM sizes distribution for Spot VMs.", + "type": { + "$ref": "24" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.allocationStrategy", + "serializationOptions": { + "$id": "428", + "json": { + "$id": "429", + "name": "allocationStrategy" + } + } + }, + { + "$id": "430", + "kind": "property", + "name": "IsMaintainEnabled", + "serializedName": "maintain", + "doc": "Flag to enable/disable continuous goal seeking for the desired capacity and restoration of evicted Spot VMs.\nIf maintain is enabled, AzureFleetRP will use all VM sizes in vmSizesProfile to create new VMs (if VMs are evicted deleted)\nor update existing VMs with new VM sizes (if VMs are evicted deallocated or failed to allocate due to capacity constraint) in order to achieve the desired capacity.\nMaintain is enabled by default.", + "type": { + "$id": "431", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.maintain", + "serializationOptions": { + "$id": "432", + "json": { + "$id": "433", + "name": "maintain" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.spotPriorityProfile", + "serializationOptions": { + "$id": "434", + "json": { + "$id": "435", + "name": "spotPriorityProfile" + } + } + }, + { + "$id": "436", + "kind": "property", + "name": "regularPriorityProfile", + "serializedName": "regularPriorityProfile", + "doc": "Configuration Options for Regular instances in Compute Fleet.", + "type": { + "$id": "437", + "kind": "model", + "name": "RegularPriorityProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Configuration Options for Regular instances in Compute Fleet.", + "decorators": [], + "properties": [ + { + "$id": "438", + "kind": "property", + "name": "capacity", + "serializedName": "capacity", + "doc": "Total capacity to achieve. It is currently in terms of number of VMs.", + "type": { + "$id": "439", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityProfile.capacity", + "serializationOptions": { + "$id": "440", + "json": { + "$id": "441", + "name": "capacity" + } + } + }, + { + "$id": "442", + "kind": "property", + "name": "minCapacity", + "serializedName": "minCapacity", + "doc": "Minimum capacity to achieve which cannot be updated. If we will not be able to \"guarantee\" minimum capacity, we will reject the request in the sync path itself.", + "type": { + "$id": "443", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityProfile.minCapacity", + "serializationOptions": { + "$id": "444", + "json": { + "$id": "445", + "name": "minCapacity" + } + } + }, + { + "$id": "446", + "kind": "property", + "name": "allocationStrategy", + "serializedName": "allocationStrategy", + "doc": "Allocation strategy to follow when determining the VM sizes distribution for Regular VMs.", + "type": { + "$ref": "32" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityProfile.allocationStrategy", + "serializationOptions": { + "$id": "447", + "json": { + "$id": "448", + "name": "allocationStrategy" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.regularPriorityProfile", + "serializationOptions": { + "$id": "449", + "json": { + "$id": "450", + "name": "regularPriorityProfile" + } + } + }, + { + "$id": "451", + "kind": "property", + "name": "vmSizesProfile", + "serializedName": "vmSizesProfile", + "doc": "List of VM sizes supported for Compute Fleet", + "type": { + "$id": "452", + "kind": "array", + "name": "ArrayVmSizeProfile", + "valueType": { + "$id": "453", + "kind": "model", + "name": "ComputeFleetVmSizeProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VmSizeProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifications about a VM Size. This will also contain the corresponding rank and weight in future.", + "decorators": [], + "properties": [ + { + "$id": "454", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The Sku name (e.g. 'Standard_DS1_v2')", + "type": { + "$id": "455", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VmSizeProfile.name", + "serializationOptions": { + "$id": "456", + "json": { + "$id": "457", + "name": "name" + } + } + }, + { + "$id": "458", + "kind": "property", + "name": "rank", + "serializedName": "rank", + "doc": "The rank of the VM size. This is used with 'RegularPriorityAllocationStrategy.Prioritized'\nThe lower the number, the higher the priority. Starting with 0.", + "type": { + "$id": "459", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VmSizeProfile.rank", + "serializationOptions": { + "$id": "460", + "json": { + "$id": "461", + "name": "rank" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.vmSizesProfile", + "serializationOptions": { + "$id": "462", + "json": { + "$id": "463", + "name": "vmSizesProfile" + } + } + }, + { + "$id": "464", + "kind": "property", + "name": "vmAttributes", + "serializedName": "vmAttributes", + "doc": "Attribute based Fleet.", + "type": { + "$id": "465", + "kind": "model", + "name": "ComputeFleetVMAttributes", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "VMAttributes that will be used to filter VMSizes which will be used to build Fleet.", + "decorators": [], + "properties": [ + { + "$id": "466", + "kind": "property", + "name": "vCpuCount", + "serializedName": "vCpuCount", + "doc": "The range of vCpuCount specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified.", + "type": { + "$id": "467", + "kind": "model", + "name": "ComputeFleetVmAttributeMinMaxInteger", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxInteger", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "While retrieving VMSizes from CRS, Min = 0 (uint.MinValue) if not specified, Max = 4294967295 (uint.MaxValue) if not specified. This allows to filter VMAttributes on all available VMSizes.", + "decorators": [], + "properties": [ + { + "$id": "468", + "kind": "property", + "name": "min", + "serializedName": "min", + "doc": "Min VMSize from CRS, Min = 0 (uint.MinValue) if not specified.", + "type": { + "$id": "469", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxInteger.min", + "serializationOptions": { + "$id": "470", + "json": { + "$id": "471", + "name": "min" + } + } + }, + { + "$id": "472", + "kind": "property", + "name": "max", + "serializedName": "max", + "doc": "Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified.", + "type": { + "$id": "473", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxInteger.max", + "serializationOptions": { + "$id": "474", + "json": { + "$id": "475", + "name": "max" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.vCpuCount", + "serializationOptions": { + "$id": "476", + "json": { + "$id": "477", + "name": "vCpuCount" + } + } + }, + { + "$id": "478", + "kind": "property", + "name": "memoryInGiB", + "serializedName": "memoryInGiB", + "doc": "The range of memory specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified.", + "type": { + "$id": "479", + "kind": "model", + "name": "ComputeFleetVmAttributeMinMaxDouble", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxDouble", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "VMAttributes using double values.", + "decorators": [], + "properties": [ + { + "$id": "480", + "kind": "property", + "name": "min", + "serializedName": "min", + "doc": "Minimum value. default 0. Double.MinValue()", + "type": { + "$id": "481", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxDouble.min", + "serializationOptions": { + "$id": "482", + "json": { + "$id": "483", + "name": "min" + } + } + }, + { + "$id": "484", + "kind": "property", + "name": "max", + "serializedName": "max", + "doc": "Maximum value. Double.MaxValue(1.7976931348623157E+308)", + "type": { + "$id": "485", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxDouble.max", + "serializationOptions": { + "$id": "486", + "json": { + "$id": "487", + "name": "max" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.memoryInGiB", + "serializationOptions": { + "$id": "488", + "json": { + "$id": "489", + "name": "memoryInGiB" + } + } + }, + { + "$id": "490", + "kind": "property", + "name": "memoryInGiBPerVCpu", + "serializedName": "memoryInGiBPerVCpu", + "doc": "The range of memory in GiB per vCPU specified from min to max. Optional parameter. Either Min or Max is required if specified.", + "type": { + "$ref": "479" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.memoryInGiBPerVCpu", + "serializationOptions": { + "$id": "491", + "json": { + "$id": "492", + "name": "memoryInGiBPerVCpu" + } + } + }, + { + "$id": "493", + "kind": "property", + "name": "localStorageSupport", + "serializedName": "localStorageSupport", + "doc": "Specifies whether the VMSize supporting local storage should be used to build Fleet or not.\nIncluded - Default if not specified as most Azure VMs support local storage.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.localStorageSupport", + "serializationOptions": { + "$id": "494", + "json": { + "$id": "495", + "name": "localStorageSupport" + } + } + }, + { + "$id": "496", + "kind": "property", + "name": "localStorageInGiB", + "serializedName": "localStorageInGiB", + "doc": "LocalStorageSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf localStorageSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$ref": "479" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.localStorageInGiB", + "serializationOptions": { + "$id": "497", + "json": { + "$id": "498", + "name": "localStorageInGiB" + } + } + }, + { + "$id": "499", + "kind": "property", + "name": "localStorageDiskTypes", + "serializedName": "localStorageDiskTypes", + "doc": "The local storage disk types specified as a list. LocalStorageSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf localStorageSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$id": "500", + "kind": "array", + "name": "ArrayLocalStorageDiskType", + "valueType": { + "$ref": "46" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.localStorageDiskTypes", + "serializationOptions": { + "$id": "501", + "json": { + "$id": "502", + "name": "localStorageDiskTypes" + } + } + }, + { + "$id": "503", + "kind": "property", + "name": "dataDiskCount", + "serializedName": "dataDiskCount", + "doc": "The range of data disk count specified from Min to Max. Optional parameter. Either Min or Max is required if specified.", + "type": { + "$ref": "467" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.dataDiskCount", + "serializationOptions": { + "$id": "504", + "json": { + "$id": "505", + "name": "dataDiskCount" + } + } + }, + { + "$id": "506", + "kind": "property", + "name": "networkInterfaceCount", + "serializedName": "networkInterfaceCount", + "doc": "The range of network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified.", + "type": { + "$ref": "467" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.networkInterfaceCount", + "serializationOptions": { + "$id": "507", + "json": { + "$id": "508", + "name": "networkInterfaceCount" + } + } + }, + { + "$id": "509", + "kind": "property", + "name": "networkBandwidthInMbps", + "serializedName": "networkBandwidthInMbps", + "doc": "The range of network bandwidth in Mbps specified from Min to Max. Optional parameter. Either Min or Max is required if specified.", + "type": { + "$ref": "479" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.networkBandwidthInMbps", + "serializationOptions": { + "$id": "510", + "json": { + "$id": "511", + "name": "networkBandwidthInMbps" + } + } + }, + { + "$id": "512", + "kind": "property", + "name": "rdmaSupport", + "serializedName": "rdmaSupport", + "doc": "Specifies whether the VMSize supporting RDMA (Remote Direct Memory Access) should be used to build Fleet or not.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.rdmaSupport", + "serializationOptions": { + "$id": "513", + "json": { + "$id": "514", + "name": "rdmaSupport" + } + } + }, + { + "$id": "515", + "kind": "property", + "name": "rdmaNetworkInterfaceCount", + "serializedName": "rdmaNetworkInterfaceCount", + "doc": "The range of RDMA (Remote Direct Memory Access) network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified.\nrdmaSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf rdmaSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$ref": "467" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.rdmaNetworkInterfaceCount", + "serializationOptions": { + "$id": "516", + "json": { + "$id": "517", + "name": "rdmaNetworkInterfaceCount" + } + } + }, + { + "$id": "518", + "kind": "property", + "name": "acceleratorSupport", + "serializedName": "acceleratorSupport", + "doc": "Specifies whether the VMSize supporting accelerator should be used to build Fleet or not.\nacceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf acceleratorSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.acceleratorSupport", + "serializationOptions": { + "$id": "519", + "json": { + "$id": "520", + "name": "acceleratorSupport" + } + } + }, + { + "$id": "521", + "kind": "property", + "name": "acceleratorManufacturers", + "serializedName": "acceleratorManufacturers", + "doc": "The accelerator manufacturers specified as a list. \nacceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf acceleratorSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$id": "522", + "kind": "array", + "name": "ArrayAcceleratorManufacturer", + "valueType": { + "$ref": "52" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.acceleratorManufacturers", + "serializationOptions": { + "$id": "523", + "json": { + "$id": "524", + "name": "acceleratorManufacturers" + } + } + }, + { + "$id": "525", + "kind": "property", + "name": "acceleratorTypes", + "serializedName": "acceleratorTypes", + "doc": "The accelerator types specified as a list. acceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf acceleratorSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$id": "526", + "kind": "array", + "name": "ArrayAcceleratorType", + "valueType": { + "$ref": "60" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.acceleratorTypes", + "serializationOptions": { + "$id": "527", + "json": { + "$id": "528", + "name": "acceleratorTypes" + } + } + }, + { + "$id": "529", + "kind": "property", + "name": "acceleratorCount", + "serializedName": "acceleratorCount", + "doc": "The range of accelerator count specified from min to max. Optional parameter. Either Min or Max is required if specified.\nacceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf acceleratorSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$ref": "467" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.acceleratorCount", + "serializationOptions": { + "$id": "530", + "json": { + "$id": "531", + "name": "acceleratorCount" + } + } + }, + { + "$id": "532", + "kind": "property", + "name": "vmCategories", + "serializedName": "vmCategories", + "doc": "The VM category specified as a list. Optional parameter.", + "type": { + "$id": "533", + "kind": "array", + "name": "ArrayVmCategory", + "valueType": { + "$ref": "66" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.vmCategories", + "serializationOptions": { + "$id": "534", + "json": { + "$id": "535", + "name": "vmCategories" + } + } + }, + { + "$id": "536", + "kind": "property", + "name": "architectureTypes", + "serializedName": "architectureTypes", + "doc": "The VM architecture types specified as a list. Optional parameter.", + "type": { + "$id": "537", + "kind": "array", + "name": "ArrayArchitectureType", + "valueType": { + "$ref": "82" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.architectureTypes", + "serializationOptions": { + "$id": "538", + "json": { + "$id": "539", + "name": "architectureTypes" + } + } + }, + { + "$id": "540", + "kind": "property", + "name": "cpuManufacturers", + "serializedName": "cpuManufacturers", + "doc": "The VM CPU manufacturers specified as a list. Optional parameter.", + "type": { + "$id": "541", + "kind": "array", + "name": "ArrayCpuManufacturer", + "valueType": { + "$ref": "88" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.cpuManufacturers", + "serializationOptions": { + "$id": "542", + "json": { + "$id": "543", + "name": "cpuManufacturers" + } + } + }, + { + "$id": "544", + "kind": "property", + "name": "burstableSupport", + "serializedName": "burstableSupport", + "doc": "Specifies whether the VMSize supporting burstable capability should be used to build Fleet or not.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.burstableSupport", + "serializationOptions": { + "$id": "545", + "json": { + "$id": "546", + "name": "burstableSupport" + } + } + }, + { + "$id": "547", + "kind": "property", + "name": "excludedVMSizes", + "serializedName": "excludedVMSizes", + "doc": "Specifies which VMSizes should be excluded while building Fleet. Optional parameter.", + "type": { + "$id": "548", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "549", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.excludedVMSizes", + "serializationOptions": { + "$id": "550", + "json": { + "$id": "551", + "name": "excludedVMSizes" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.vmAttributes", + "serializationOptions": { + "$id": "552", + "json": { + "$id": "553", + "name": "vmAttributes" + } + } + }, + { + "$id": "554", + "kind": "property", + "name": "additionalLocationsProfile", + "serializedName": "additionalLocationsProfile", + "doc": "Represents the configuration for additional locations where Fleet resources may be deployed.", + "type": { + "$id": "555", + "kind": "model", + "name": "AdditionalLocationsProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalLocationsProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Represents the configuration for additional locations where Fleet resources may be deployed.", + "decorators": [], + "properties": [ + { + "$id": "556", + "kind": "property", + "name": "locationProfiles", + "serializedName": "locationProfiles", + "doc": "The list of location profiles.", + "type": { + "$id": "557", + "kind": "array", + "name": "ArrayLocationProfile", + "valueType": { + "$id": "558", + "kind": "model", + "name": "LocationProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LocationProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Represents the profile for a single additional location in the Fleet. The location and the virtualMachineProfileOverride (optional).", + "decorators": [], + "properties": [ + { + "$id": "559", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The ARM location name of the additional region. If LocationProfile is specified, then location is required.", + "type": { + "$id": "560", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LocationProfile.location", + "serializationOptions": { + "$id": "562", + "json": { + "$id": "563", + "name": "location" + } + } + }, + { + "$id": "564", + "kind": "property", + "name": "virtualMachineProfileOverride", + "serializedName": "virtualMachineProfileOverride", + "doc": "An override for computeProfile.baseVirtualMachineProfile specific to this region. \nThis override is merged with the base virtual machine profile to define the final virtual machine profile for the resources deployed in this location.", + "type": { + "$id": "565", + "kind": "model", + "name": "ComputeFleetVmProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes the base virtual machine profile for fleet", + "decorators": [], + "properties": [ + { + "$id": "566", + "kind": "property", + "name": "osProfile", + "serializedName": "osProfile", + "doc": "Specifies the operating system settings for the virtual machines in the scale\nset.", + "type": { + "$id": "567", + "kind": "model", + "name": "ComputeFleetVmssOSProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set OS profile.", + "decorators": [], + "properties": [ + { + "$id": "568", + "kind": "property", + "name": "computerNamePrefix", + "serializedName": "computerNamePrefix", + "doc": "Specifies the computer name prefix for all of the virtual machines in the scale\nset. Computer name prefixes must be 1 to 15 characters long.", + "type": { + "$id": "569", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.computerNamePrefix", + "serializationOptions": { + "$id": "570", + "json": { + "$id": "571", + "name": "computerNamePrefix" + } + } + }, + { + "$id": "572", + "kind": "property", + "name": "adminUsername", + "serializedName": "adminUsername", + "doc": "Specifies the name of the administrator account.

**Windows-only\nrestriction:** Cannot end in \".\"

**Disallowed values:**\n\"administrator\", \"admin\", \"user\", \"user1\", \"test\", \"user2\", \"test1\", \"user3\",\n\"admin1\", \"1\", \"123\", \"a\", \"actuser\", \"adm\", \"admin2\", \"aspnet\", \"backup\",\n\"console\", \"david\", \"guest\", \"john\", \"owner\", \"root\", \"server\", \"sql\",\n\"support\", \"support_388945a0\", \"sys\", \"test2\", \"test3\", \"user4\", \"user5\".\n

**Minimum-length (Linux):** 1 character

**Max-length\n(Linux):** 64 characters

**Max-length (Windows):** 20 characters", + "type": { + "$id": "573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.adminUsername", + "serializationOptions": { + "$id": "574", + "json": { + "$id": "575", + "name": "adminUsername" + } + } + }, + { + "$id": "576", + "kind": "property", + "name": "adminPassword", + "serializedName": "adminPassword", + "doc": "Specifies the password of the administrator account.

**Minimum-length\n(Windows):** 8 characters

**Minimum-length (Linux):** 6 characters\n

**Max-length (Windows):** 123 characters

**Max-length\n(Linux):** 72 characters

**Complexity requirements:** 3 out of 4\nconditions below need to be fulfilled
Has lower characters
Has upper\ncharacters
Has a digit
Has a special character (Regex match [\\W_])\n

**Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\",\n\"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\",\n\"Password22\", \"iloveyou!\"

For resetting the password, see [How to\nreset the Remote Desktop service or its login password in a Windows\nVM](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)\n

For resetting root password, see [Manage users, SSH, and check or\nrepair disks on Azure Linux VMs using the VMAccess\nExtension](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)", + "type": { + "$id": "577", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.adminPassword", + "serializationOptions": { + "$id": "578", + "json": { + "$id": "579", + "name": "adminPassword" + } + } + }, + { + "$id": "580", + "kind": "property", + "name": "customData", + "serializedName": "customData", + "doc": "Specifies a base-64 encoded string of custom data. The base-64 encoded string\nis decoded to a binary array that is saved as a file on the Virtual Machine.\nThe maximum length of the binary array is 65535 bytes. For using cloud-init for\nyour VM, see [Using cloud-init to customize a Linux VM during\ncreation](https://learn.microsoft.com/azure/virtual-machines/linux/using-cloud-init)", + "type": { + "$id": "581", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.customData", + "serializationOptions": { + "$id": "582", + "json": { + "$id": "583", + "name": "customData" + } + } + }, + { + "$id": "584", + "kind": "property", + "name": "windowsConfiguration", + "serializedName": "windowsConfiguration", + "doc": "Specifies Windows operating system settings on the virtual machine.", + "type": { + "$id": "585", + "kind": "model", + "name": "ComputeFleetWindowsConfiguration", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies Windows operating system settings on the virtual machine.", + "decorators": [], + "properties": [ + { + "$id": "586", + "kind": "property", + "name": "IsVmAgentProvisioned", + "serializedName": "provisionVMAgent", + "doc": "Indicates whether virtual machine agent should be provisioned on the virtual\nmachine. When this property is not specified in the request body, it is set to\ntrue by default. This will ensure that VM Agent is installed on the VM so that\nextensions can be added to the VM later.", + "type": { + "$id": "587", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.provisionVMAgent", + "serializationOptions": { + "$id": "588", + "json": { + "$id": "589", + "name": "provisionVMAgent" + } + } + }, + { + "$id": "590", + "kind": "property", + "name": "IsAutomaticUpdatesEnabled", + "serializedName": "enableAutomaticUpdates", + "doc": "Indicates whether Automatic Updates is enabled for the Windows virtual machine.\nDefault value is true. For virtual machine scale sets, this property can be\nupdated and updates will take effect on OS reprovisioning.", + "type": { + "$id": "591", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.enableAutomaticUpdates", + "serializationOptions": { + "$id": "592", + "json": { + "$id": "593", + "name": "enableAutomaticUpdates" + } + } + }, + { + "$id": "594", + "kind": "property", + "name": "timeZone", + "serializedName": "timeZone", + "doc": "Specifies the time zone of the virtual machine. e.g. \"Pacific Standard Time\".\nPossible values can be\n[TimeZoneInfo.Id](https://learn.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id)\nvalue from time zones returned by\n[TimeZoneInfo.GetSystemTimeZones](https://learn.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones).", + "type": { + "$id": "595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.timeZone", + "serializationOptions": { + "$id": "596", + "json": { + "$id": "597", + "name": "timeZone" + } + } + }, + { + "$id": "598", + "kind": "property", + "name": "additionalUnattendContent", + "serializedName": "additionalUnattendContent", + "doc": "Specifies additional base-64 encoded XML formatted information that can be\nincluded in the Unattend.xml file, which is used by Windows Setup.", + "type": { + "$id": "599", + "kind": "array", + "name": "ArrayAdditionalUnattendContent", + "valueType": { + "$id": "600", + "kind": "model", + "name": "WindowsSetupAdditionalInformation", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies additional XML formatted information that can be included in the\nUnattend.xml file, which is used by Windows Setup. Contents are defined by\nsetting name, component name, and the pass in which the content is applied.", + "decorators": [], + "properties": [ + { + "$id": "601", + "kind": "property", + "name": "passName", + "serializedName": "passName", + "doc": "The pass name. Currently, the only allowable value is OobeSystem.", + "type": { + "$id": "602", + "kind": "constant", + "valueType": { + "$ref": "98" + }, + "value": "OobeSystem", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent.passName", + "serializationOptions": { + "$id": "603", + "json": { + "$id": "604", + "name": "passName" + } + } + }, + { + "$id": "605", + "kind": "property", + "name": "componentName", + "serializedName": "componentName", + "doc": "The component name. Currently, the only allowable value is\nMicrosoft-Windows-Shell-Setup.", + "type": { + "$id": "606", + "kind": "constant", + "valueType": { + "$ref": "101" + }, + "value": "Microsoft-Windows-Shell-Setup", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent.componentName", + "serializationOptions": { + "$id": "607", + "json": { + "$id": "608", + "name": "componentName" + } + } + }, + { + "$id": "609", + "kind": "property", + "name": "settingName", + "serializedName": "settingName", + "doc": "Specifies the name of the setting to which the content applies. Possible values\nare: FirstLogonCommands and AutoLogon.", + "type": { + "$ref": "104" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent.settingName", + "serializationOptions": { + "$id": "610", + "json": { + "$id": "611", + "name": "settingName" + } + } + }, + { + "$id": "612", + "kind": "property", + "name": "content", + "serializedName": "content", + "doc": "Specifies the XML formatted content that is added to the unattend.xml file for\nthe specified path and component. The XML must be less than 4KB and must\ninclude the root element for the setting or feature that is being inserted.", + "type": { + "$id": "613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent.content", + "serializationOptions": { + "$id": "614", + "json": { + "$id": "615", + "name": "content" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.additionalUnattendContent", + "serializationOptions": { + "$id": "616", + "json": { + "$id": "617", + "name": "additionalUnattendContent" + } + } + }, + { + "$id": "618", + "kind": "property", + "name": "patchSettings", + "serializedName": "patchSettings", + "doc": "[Preview Feature] Specifies settings related to VM Guest Patching on Windows.", + "type": { + "$id": "619", + "kind": "model", + "name": "ComputeFleetVmGuestPatchSettings", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PatchSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies settings related to VM Guest Patching on Windows.", + "decorators": [], + "properties": [ + { + "$id": "620", + "kind": "property", + "name": "patchMode", + "serializedName": "patchMode", + "doc": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual\nmachines associated to virtual machine scale set with OrchestrationMode as\nFlexible.

Possible values are:

**Manual** - You\ncontrol the application of patches to a virtual machine. You do this by\napplying patches manually inside the VM. In this mode, automatic updates are\ndisabled; the property WindowsConfiguration.enableAutomaticUpdates must be\nfalse

**AutomaticByOS** - The virtual machine will automatically be\nupdated by the OS. The property WindowsConfiguration.enableAutomaticUpdates\nmust be true.

**AutomaticByPlatform** - the virtual machine will\nautomatically updated by the platform. The properties provisionVMAgent and\nWindowsConfiguration.enableAutomaticUpdates must be true", + "type": { + "$ref": "110" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PatchSettings.patchMode", + "serializationOptions": { + "$id": "621", + "json": { + "$id": "622", + "name": "patchMode" + } + } + }, + { + "$id": "623", + "kind": "property", + "name": "IsHotPatchingEnabled", + "serializedName": "enableHotpatching", + "doc": "Enables customers to patch their Azure VMs without requiring a reboot. For\nenableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode'\nmust be set to 'AutomaticByPlatform'.", + "type": { + "$id": "624", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PatchSettings.enableHotpatching", + "serializationOptions": { + "$id": "625", + "json": { + "$id": "626", + "name": "enableHotpatching" + } + } + }, + { + "$id": "627", + "kind": "property", + "name": "assessmentMode", + "serializedName": "assessmentMode", + "doc": "Specifies the mode of VM Guest patch assessment for the IaaS virtual\nmachine.

Possible values are:

**ImageDefault** - You\ncontrol the timing of patch assessments on a virtual machine.

\n**AutomaticByPlatform** - The platform will trigger periodic patch assessments.\nThe property provisionVMAgent must be true.", + "type": { + "$ref": "118" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PatchSettings.assessmentMode", + "serializationOptions": { + "$id": "628", + "json": { + "$id": "629", + "name": "assessmentMode" + } + } + }, + { + "$id": "630", + "kind": "property", + "name": "automaticByPlatformSettings", + "serializedName": "automaticByPlatformSettings", + "doc": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest\nPatching on Windows.", + "type": { + "$id": "631", + "kind": "model", + "name": "ComputeFleetWindowsVMGuestPatchAutomaticByPlatformSettings", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchAutomaticByPlatformSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies additional settings to be applied when patch mode AutomaticByPlatform\nis selected in Windows patch settings.", + "decorators": [], + "properties": [ + { + "$id": "632", + "kind": "property", + "name": "rebootSetting", + "serializedName": "rebootSetting", + "doc": "Specifies the reboot setting for all AutomaticByPlatform patch installation\noperations.", + "type": { + "$ref": "124" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchAutomaticByPlatformSettings.rebootSetting", + "serializationOptions": { + "$id": "633", + "json": { + "$id": "634", + "name": "rebootSetting" + } + } + }, + { + "$id": "635", + "kind": "property", + "name": "IsBypassPlatformSafetyChecksOnUserScheduleEnabled", + "serializedName": "bypassPlatformSafetyChecksOnUserSchedule", + "doc": "Enables customer to schedule patching without accidental upgrades", + "type": { + "$id": "636", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchAutomaticByPlatformSettings.bypassPlatformSafetyChecksOnUserSchedule", + "serializationOptions": { + "$id": "637", + "json": { + "$id": "638", + "name": "bypassPlatformSafetyChecksOnUserSchedule" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PatchSettings.automaticByPlatformSettings", + "serializationOptions": { + "$id": "639", + "json": { + "$id": "640", + "name": "automaticByPlatformSettings" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.patchSettings", + "serializationOptions": { + "$id": "641", + "json": { + "$id": "642", + "name": "patchSettings" + } + } + }, + { + "$id": "643", + "kind": "property", + "name": "winRM", + "serializedName": "winRM", + "doc": "Specifies the Windows Remote Management listeners. This enables remote Windows\nPowerShell.", + "type": { + "$id": "644", + "kind": "model", + "name": "WinRMConfiguration", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes Windows Remote Management configuration of the VM", + "decorators": [], + "properties": [ + { + "$id": "645", + "kind": "property", + "name": "listeners", + "serializedName": "listeners", + "doc": "The list of Windows Remote Management listeners", + "type": { + "$id": "646", + "kind": "array", + "name": "ArrayWinRmListener", + "valueType": { + "$id": "647", + "kind": "model", + "name": "ComputeFleetWinRMListener", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMListener", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes Protocol and thumbprint of Windows Remote Management listener", + "decorators": [], + "properties": [ + { + "$id": "648", + "kind": "property", + "name": "protocol", + "serializedName": "protocol", + "doc": "Specifies the protocol of WinRM listener. Possible values are: **http,**\n**https.**", + "type": { + "$ref": "134" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMListener.protocol", + "serializationOptions": { + "$id": "649", + "json": { + "$id": "650", + "name": "protocol" + } + } + }, + { + "$id": "651", + "kind": "property", + "name": "certificateUrl", + "serializedName": "certificateUrl", + "doc": "This is the URL of a certificate that has been uploaded to Key Vault as a\nsecret. For adding a secret to the Key Vault, see [Add a key or secret to the\nkey\nvault](https://learn.microsoft.com/azure/key-vault/key-vault-get-started/#add).\nIn this case, your certificate needs to be the Base64 encoding of the following\nJSON Object which is encoded in UTF-8:

{
\n\"data\":\"\",
\"dataType\":\"pfx\",
\n\"password\":\"\"
}
To install certificates on a virtual\nmachine it is recommended to use the [Azure Key Vault virtual machine extension\nfor\nLinux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)\nor the [Azure Key Vault virtual machine extension for\nWindows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).", + "type": { + "$id": "652", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMListener.certificateUrl", + "serializationOptions": { + "$id": "653", + "json": { + "$id": "654", + "name": "certificateUrl" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMConfiguration.listeners", + "serializationOptions": { + "$id": "655", + "json": { + "$id": "656", + "name": "listeners" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.winRM", + "serializationOptions": { + "$id": "657", + "json": { + "$id": "658", + "name": "winRM" + } + } + }, + { + "$id": "659", + "kind": "property", + "name": "IsVmAgentPlatformUpdatesEnabled", + "serializedName": "enableVMAgentPlatformUpdates", + "doc": "Indicates whether VMAgent Platform Updates is enabled for the Windows virtual\nmachine. Default value is false.", + "type": { + "$id": "660", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.enableVMAgentPlatformUpdates", + "serializationOptions": { + "$id": "661", + "json": { + "$id": "662", + "name": "enableVMAgentPlatformUpdates" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.windowsConfiguration", + "serializationOptions": { + "$id": "663", + "json": { + "$id": "664", + "name": "windowsConfiguration" + } + } + }, + { + "$id": "665", + "kind": "property", + "name": "linuxConfiguration", + "serializedName": "linuxConfiguration", + "doc": "Specifies the Linux operating system settings on the virtual machine. For a\nlist of supported Linux distributions, see [Linux on Azure-Endorsed\nDistributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros).", + "type": { + "$id": "666", + "kind": "model", + "name": "ComputeFleetLinuxConfiguration", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the Linux operating system settings on the virtual machine. For a\nlist of supported Linux distributions, see [Linux on Azure-Endorsed\nDistributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros).", + "decorators": [], + "properties": [ + { + "$id": "667", + "kind": "property", + "name": "IsPasswordAuthenticationDisabled", + "serializedName": "disablePasswordAuthentication", + "doc": "Specifies whether password authentication should be disabled.", + "type": { + "$id": "668", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.disablePasswordAuthentication", + "serializationOptions": { + "$id": "669", + "json": { + "$id": "670", + "name": "disablePasswordAuthentication" + } + } + }, + { + "$id": "671", + "kind": "property", + "name": "ssh", + "serializedName": "ssh", + "doc": "Specifies the ssh key configuration for a Linux OS.", + "type": { + "$id": "672", + "kind": "model", + "name": "ComputeFleetSshConfiguration", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "SSH configuration for Linux based VMs running on Azure", + "decorators": [], + "properties": [ + { + "$id": "673", + "kind": "property", + "name": "publicKeys", + "serializedName": "publicKeys", + "doc": "The list of SSH public keys used to authenticate with linux based VMs.", + "type": { + "$id": "674", + "kind": "array", + "name": "ArraySshPublicKey", + "valueType": { + "$id": "675", + "kind": "model", + "name": "ComputeFleetSshPublicKey", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshPublicKey", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Contains information about SSH certificate public key and the path on the Linux\nVM where the public key is placed.", + "decorators": [], + "properties": [ + { + "$id": "676", + "kind": "property", + "name": "path", + "serializedName": "path", + "doc": "Specifies the full path on the created VM where ssh public key is stored. If\nthe file already exists, the specified key is appended to the file. Example:\n/home/user/.ssh/authorized_keys", + "type": { + "$id": "677", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshPublicKey.path", + "serializationOptions": { + "$id": "678", + "json": { + "$id": "679", + "name": "path" + } + } + }, + { + "$id": "680", + "kind": "property", + "name": "keyData", + "serializedName": "keyData", + "doc": "SSH public key certificate used to authenticate with the VM through ssh. The\nkey needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys,\nsee [Create SSH keys on Linux and Mac for Linux VMs in\nAzure]https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).", + "type": { + "$id": "681", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshPublicKey.keyData", + "serializationOptions": { + "$id": "682", + "json": { + "$id": "683", + "name": "keyData" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshConfiguration.publicKeys", + "serializationOptions": { + "$id": "684", + "json": { + "$id": "685", + "name": "publicKeys" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.ssh", + "serializationOptions": { + "$id": "686", + "json": { + "$id": "687", + "name": "ssh" + } + } + }, + { + "$id": "688", + "kind": "property", + "name": "IsVmAgentProvisioned", + "serializedName": "provisionVMAgent", + "doc": "Indicates whether virtual machine agent should be provisioned on the virtual\nmachine. When this property is not specified in the request body, default\nbehavior is to set it to true. This will ensure that VM Agent is installed on\nthe VM so that extensions can be added to the VM later.", + "type": { + "$id": "689", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.provisionVMAgent", + "serializationOptions": { + "$id": "690", + "json": { + "$id": "691", + "name": "provisionVMAgent" + } + } + }, + { + "$id": "692", + "kind": "property", + "name": "patchSettings", + "serializedName": "patchSettings", + "doc": "[Preview Feature] Specifies settings related to VM Guest Patching on Linux.", + "type": { + "$id": "693", + "kind": "model", + "name": "ComputeFleetLinuxPatchSettings", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxPatchSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies settings related to VM Guest Patching on Linux.", + "decorators": [], + "properties": [ + { + "$id": "694", + "kind": "property", + "name": "patchMode", + "serializedName": "patchMode", + "doc": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual\nmachines associated to virtual machine scale set with OrchestrationMode as\nFlexible.

Possible values are:

**ImageDefault** - The\nvirtual machine's default patching configuration is used.

\n**AutomaticByPlatform** - The virtual machine will be automatically updated by\nthe platform. The property provisionVMAgent must be true", + "type": { + "$ref": "140" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxPatchSettings.patchMode", + "serializationOptions": { + "$id": "695", + "json": { + "$id": "696", + "name": "patchMode" + } + } + }, + { + "$id": "697", + "kind": "property", + "name": "assessmentMode", + "serializedName": "assessmentMode", + "doc": "Specifies the mode of VM Guest Patch Assessment for the IaaS virtual\nmachine.

Possible values are:

**ImageDefault** - You\ncontrol the timing of patch assessments on a virtual machine.

\n**AutomaticByPlatform** - The platform will trigger periodic patch assessments.\nThe property provisionVMAgent must be true.", + "type": { + "$ref": "146" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxPatchSettings.assessmentMode", + "serializationOptions": { + "$id": "698", + "json": { + "$id": "699", + "name": "assessmentMode" + } + } + }, + { + "$id": "700", + "kind": "property", + "name": "automaticByPlatformSettings", + "serializedName": "automaticByPlatformSettings", + "doc": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest\nPatching on Linux.", + "type": { + "$id": "701", + "kind": "model", + "name": "ComputeFleetLinuxVMGuestPatchAutomaticByPlatformSettings", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchAutomaticByPlatformSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies additional settings to be applied when patch mode AutomaticByPlatform\nis selected in Linux patch settings.", + "decorators": [], + "properties": [ + { + "$id": "702", + "kind": "property", + "name": "rebootSetting", + "serializedName": "rebootSetting", + "doc": "Specifies the reboot setting for all AutomaticByPlatform patch installation\noperations.", + "type": { + "$ref": "152" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchAutomaticByPlatformSettings.rebootSetting", + "serializationOptions": { + "$id": "703", + "json": { + "$id": "704", + "name": "rebootSetting" + } + } + }, + { + "$id": "705", + "kind": "property", + "name": "IsBypassPlatformSafetyChecksOnUserScheduleEnabled", + "serializedName": "bypassPlatformSafetyChecksOnUserSchedule", + "doc": "Enables customer to schedule patching without accidental upgrades", + "type": { + "$id": "706", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchAutomaticByPlatformSettings.bypassPlatformSafetyChecksOnUserSchedule", + "serializationOptions": { + "$id": "707", + "json": { + "$id": "708", + "name": "bypassPlatformSafetyChecksOnUserSchedule" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxPatchSettings.automaticByPlatformSettings", + "serializationOptions": { + "$id": "709", + "json": { + "$id": "710", + "name": "automaticByPlatformSettings" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.patchSettings", + "serializationOptions": { + "$id": "711", + "json": { + "$id": "712", + "name": "patchSettings" + } + } + }, + { + "$id": "713", + "kind": "property", + "name": "IsVmAgentPlatformUpdatesEnabled", + "serializedName": "enableVMAgentPlatformUpdates", + "doc": "Indicates whether VMAgent Platform Updates is enabled for the Linux virtual\nmachine. Default value is false.", + "type": { + "$id": "714", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.enableVMAgentPlatformUpdates", + "serializationOptions": { + "$id": "715", + "json": { + "$id": "716", + "name": "enableVMAgentPlatformUpdates" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.linuxConfiguration", + "serializationOptions": { + "$id": "717", + "json": { + "$id": "718", + "name": "linuxConfiguration" + } + } + }, + { + "$id": "719", + "kind": "property", + "name": "secrets", + "serializedName": "secrets", + "doc": "Specifies set of certificates that should be installed onto the virtual\nmachines in the scale set. To install certificates on a virtual machine it is\nrecommended to use the [Azure Key Vault virtual machine extension for\nLinux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)\nor the [Azure Key Vault virtual machine extension for\nWindows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).", + "type": { + "$id": "720", + "kind": "array", + "name": "ArrayVaultSecretGroup", + "valueType": { + "$id": "721", + "kind": "model", + "name": "ComputeFleetVaultSecretGroup", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultSecretGroup", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a set of certificates which are all in the same Key Vault.", + "decorators": [], + "properties": [ + { + "$id": "722", + "kind": "property", + "name": "sourceVault", + "serializedName": "sourceVault", + "doc": "The relative URL of the Key Vault containing all of the certificates in\nVaultCertificates.", + "type": { + "$id": "723", + "kind": "model", + "name": "SubResource", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SubResource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes SubResource", + "decorators": [], + "properties": [ + { + "$id": "724", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource Id", + "type": { + "$id": "725", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "726", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SubResource.id", + "serializationOptions": { + "$id": "727", + "json": { + "$id": "728", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultSecretGroup.sourceVault", + "serializationOptions": { + "$id": "729", + "json": { + "$id": "730", + "name": "sourceVault" + } + } + }, + { + "$id": "731", + "kind": "property", + "name": "vaultCertificates", + "serializedName": "vaultCertificates", + "doc": "The list of key vault references in SourceVault which contain certificates.", + "type": { + "$id": "732", + "kind": "array", + "name": "ArrayVaultCertificate", + "valueType": { + "$id": "733", + "kind": "model", + "name": "ComputeFleetVaultCertificate", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultCertificate", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a single certificate reference in a Key Vault, and where the\ncertificate should reside on the VM.", + "decorators": [], + "properties": [ + { + "$id": "734", + "kind": "property", + "name": "certificateUrl", + "serializedName": "certificateUrl", + "doc": "This is the URL of a certificate that has been uploaded to Key Vault as a\nsecret. For adding a secret to the Key Vault, see [Add a key or secret to the\nkey\nvault](https://learn.microsoft.com/azure/key-vault/key-vault-get-started/#add).\nIn this case, your certificate needs to be It is the Base64 encoding of the\nfollowing JSON Object which is encoded in UTF-8:

{
\n\"data\":\"\",
\"dataType\":\"pfx\",
\n\"password\":\"\"
}
To install certificates on a virtual\nmachine it is recommended to use the [Azure Key Vault virtual machine extension\nfor\nLinux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)\nor the [Azure Key Vault virtual machine extension for\nWindows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).", + "type": { + "$id": "735", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultCertificate.certificateUrl", + "serializationOptions": { + "$id": "736", + "json": { + "$id": "737", + "name": "certificateUrl" + } + } + }, + { + "$id": "738", + "kind": "property", + "name": "certificateStore", + "serializedName": "certificateStore", + "doc": "For Windows VMs, specifies the certificate store on the Virtual Machine to\nwhich the certificate should be added. The specified certificate store is\nimplicitly in the LocalMachine account. For Linux VMs, the certificate file is\nplaced under the /var/lib/waagent directory, with the file name\n<UppercaseThumbprint>.crt for the X509 certificate file and\n<UppercaseThumbprint>.prv for private key. Both of these files are .pem\nformatted.", + "type": { + "$id": "739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultCertificate.certificateStore", + "serializationOptions": { + "$id": "740", + "json": { + "$id": "741", + "name": "certificateStore" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultSecretGroup.vaultCertificates", + "serializationOptions": { + "$id": "742", + "json": { + "$id": "743", + "name": "vaultCertificates" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.secrets", + "serializationOptions": { + "$id": "744", + "json": { + "$id": "745", + "name": "secrets" + } + } + }, + { + "$id": "746", + "kind": "property", + "name": "AreExtensionOperationsAllowed", + "serializedName": "allowExtensionOperations", + "doc": "Specifies whether extension operations should be allowed on the virtual machine\nscale set. This may only be set to False when no extensions are present on the\nvirtual machine scale set.", + "type": { + "$id": "747", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.allowExtensionOperations", + "serializationOptions": { + "$id": "748", + "json": { + "$id": "749", + "name": "allowExtensionOperations" + } + } + }, + { + "$id": "750", + "kind": "property", + "name": "IsGuestProvisionSignalRequired", + "serializedName": "requireGuestProvisionSignal", + "doc": "Optional property which must either be set to True or omitted.", + "type": { + "$id": "751", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.requireGuestProvisionSignal", + "serializationOptions": { + "$id": "752", + "json": { + "$id": "753", + "name": "requireGuestProvisionSignal" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.osProfile", + "serializationOptions": { + "$id": "754", + "json": { + "$id": "755", + "name": "osProfile" + } + } + }, + { + "$id": "756", + "kind": "property", + "name": "storageProfile", + "serializedName": "storageProfile", + "doc": "Specifies the storage settings for the virtual machine disks.", + "type": { + "$id": "757", + "kind": "model", + "name": "ComputeFleetVmssStorageProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set storage profile.", + "decorators": [], + "properties": [ + { + "$id": "758", + "kind": "property", + "name": "imageReference", + "serializedName": "imageReference", + "doc": "Specifies information about the image to use. You can specify information about\nplatform images, marketplace images, or virtual machine images. This element is\nrequired when you want to use a platform image, marketplace image, or virtual\nmachine image, but is not used in other creation operations.", + "type": { + "$id": "759", + "kind": "model", + "name": "ComputeFleetImageReference", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies information about the image to use. You can specify information about\nplatform images, marketplace images, or virtual machine images. This element is\nrequired when you want to use a platform image, marketplace image, or virtual\nmachine image, but is not used in other creation operations. NOTE: Image\nreference publisher and offer can only be set when you create the scale set.", + "decorators": [], + "properties": [ + { + "$id": "760", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource Id", + "type": { + "$id": "761", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "762", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.id", + "serializationOptions": { + "$id": "763", + "json": { + "$id": "764", + "name": "id" + } + } + }, + { + "$id": "765", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The image publisher.", + "type": { + "$id": "766", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.publisher", + "serializationOptions": { + "$id": "767", + "json": { + "$id": "768", + "name": "publisher" + } + } + }, + { + "$id": "769", + "kind": "property", + "name": "offer", + "serializedName": "offer", + "doc": "Specifies the offer of the platform image or marketplace image used to create\nthe virtual machine.", + "type": { + "$id": "770", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.offer", + "serializationOptions": { + "$id": "771", + "json": { + "$id": "772", + "name": "offer" + } + } + }, + { + "$id": "773", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "The image SKU.", + "type": { + "$id": "774", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.sku", + "serializationOptions": { + "$id": "775", + "json": { + "$id": "776", + "name": "sku" + } + } + }, + { + "$id": "777", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "Specifies the version of the platform image or marketplace image used to create\nthe virtual machine. The allowed formats are Major.Minor.Build or 'latest'.\nMajor, Minor, and Build are decimal numbers. Specify 'latest' to use the latest\nversion of an image available at deploy time. Even if you use 'latest', the VM\nimage will not automatically update after deploy time even if a new version\nbecomes available. Please do not use field 'version' for gallery image\ndeployment, gallery image should always use 'id' field for deployment, to use 'latest'\nversion of gallery image, just set\n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}'\nin the 'id' field without version input.", + "type": { + "$id": "778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.version", + "serializationOptions": { + "$id": "779", + "json": { + "$id": "780", + "name": "version" + } + } + }, + { + "$id": "781", + "kind": "property", + "name": "exactVersion", + "serializedName": "exactVersion", + "doc": "Specifies in decimal numbers, the version of platform image or marketplace\nimage used to create the virtual machine. This readonly field differs from 'version',\nonly if the value specified in 'version' field is 'latest'.", + "type": { + "$id": "782", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.exactVersion", + "serializationOptions": { + "$id": "783", + "json": { + "$id": "784", + "name": "exactVersion" + } + } + }, + { + "$id": "785", + "kind": "property", + "name": "sharedGalleryImageId", + "serializedName": "sharedGalleryImageId", + "doc": "Specified the shared gallery image unique id for vm deployment. This can be\nfetched from shared gallery image GET call.", + "type": { + "$id": "786", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.sharedGalleryImageId", + "serializationOptions": { + "$id": "787", + "json": { + "$id": "788", + "name": "sharedGalleryImageId" + } + } + }, + { + "$id": "789", + "kind": "property", + "name": "communityGalleryImageId", + "serializedName": "communityGalleryImageId", + "doc": "Specified the community gallery image unique id for vm deployment. This can be\nfetched from community gallery image GET call.", + "type": { + "$id": "790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.communityGalleryImageId", + "serializationOptions": { + "$id": "791", + "json": { + "$id": "792", + "name": "communityGalleryImageId" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile.imageReference", + "serializationOptions": { + "$id": "793", + "json": { + "$id": "794", + "name": "imageReference" + } + } + }, + { + "$id": "795", + "kind": "property", + "name": "osDisk", + "serializedName": "osDisk", + "doc": "Specifies information about the operating system disk used by the virtual\nmachines in the scale set. For more information about disks, see [About disks\nand VHDs for Azure virtual\nmachines](https://learn.microsoft.com/azure/virtual-machines/managed-disks-overview).", + "type": { + "$id": "796", + "kind": "model", + "name": "ComputeFleetVmssOSDisk", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set operating system disk.", + "decorators": [], + "properties": [ + { + "$id": "797", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The disk name.", + "type": { + "$id": "798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.name", + "serializationOptions": { + "$id": "799", + "json": { + "$id": "800", + "name": "name" + } + } + }, + { + "$id": "801", + "kind": "property", + "name": "caching", + "serializedName": "caching", + "doc": "Specifies the caching requirements. Possible values are: **None,**\n**ReadOnly,** **ReadWrite.** The default values are: **None for Standard\nstorage. ReadOnly for Premium storage.**", + "type": { + "$ref": "162" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.caching", + "serializationOptions": { + "$id": "802", + "json": { + "$id": "803", + "name": "caching" + } + } + }, + { + "$id": "804", + "kind": "property", + "name": "IsWriteAcceleratorEnabled", + "serializedName": "writeAcceleratorEnabled", + "doc": "Specifies whether writeAccelerator should be enabled or disabled on the disk.", + "type": { + "$id": "805", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.writeAcceleratorEnabled", + "serializationOptions": { + "$id": "806", + "json": { + "$id": "807", + "name": "writeAcceleratorEnabled" + } + } + }, + { + "$id": "808", + "kind": "property", + "name": "createOption", + "serializedName": "createOption", + "doc": "Specifies how the virtual machines in the scale set should be created. The only\nallowed value is: **FromImage.** This value is used when you are using an image\nto create the virtual machine. If you are using a platform image, you also use\nthe imageReference element described above. If you are using a marketplace\nimage, you also use the plan element previously described.", + "type": { + "$ref": "170" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.createOption", + "serializationOptions": { + "$id": "809", + "json": { + "$id": "810", + "name": "createOption" + } + } + }, + { + "$id": "811", + "kind": "property", + "name": "diffDiskSettings", + "serializedName": "diffDiskSettings", + "doc": "Specifies the ephemeral disk Settings for the operating system disk used by the\nvirtual machine scale set.", + "type": { + "$id": "812", + "kind": "model", + "name": "ComputeFleetDiffDiskSettings", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes the parameters of ephemeral disk settings that can be specified for\noperating system disk. **Note:** The ephemeral disk settings can only be\nspecified for managed disk.", + "decorators": [], + "properties": [ + { + "$id": "813", + "kind": "property", + "name": "option", + "serializedName": "option", + "doc": "Specifies the ephemeral disk settings for operating system disk.", + "type": { + "$ref": "182" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskSettings.option", + "serializationOptions": { + "$id": "814", + "json": { + "$id": "815", + "name": "option" + } + } + }, + { + "$id": "816", + "kind": "property", + "name": "placement", + "serializedName": "placement", + "doc": "Specifies the ephemeral disk placement for operating system disk. Possible\nvalues are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is:\n**CacheDisk** if one is configured for the VM size otherwise **ResourceDisk**\nis used. Refer to the VM size documentation for Windows VM at\nhttps://learn.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at\nhttps://learn.microsoft.com/azure/virtual-machines/linux/sizes to check which VM\nsizes exposes a cache disk.", + "type": { + "$ref": "186" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskSettings.placement", + "serializationOptions": { + "$id": "817", + "json": { + "$id": "818", + "name": "placement" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.diffDiskSettings", + "serializationOptions": { + "$id": "819", + "json": { + "$id": "820", + "name": "diffDiskSettings" + } + } + }, + { + "$id": "821", + "kind": "property", + "name": "diskSizeGB", + "serializedName": "diskSizeGB", + "doc": "Specifies the size of an empty data disk in gigabytes. This element can be used\nto overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB'\nis the number of bytes x 1024^3 for the disk and the value cannot\nbe larger than 1023.", + "type": { + "$id": "822", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.diskSizeGB", + "serializationOptions": { + "$id": "823", + "json": { + "$id": "824", + "name": "diskSizeGB" + } + } + }, + { + "$id": "825", + "kind": "property", + "name": "osType", + "serializedName": "osType", + "doc": "This property allows you to specify the type of the OS that is included in the\ndisk if creating a VM from user-image or a specialized VHD. Possible values\nare: **Windows,** **Linux.**", + "type": { + "$ref": "194" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.osType", + "serializationOptions": { + "$id": "826", + "json": { + "$id": "827", + "name": "osType" + } + } + }, + { + "$id": "828", + "kind": "property", + "name": "image", + "serializedName": "image", + "doc": "Specifies information about the unmanaged user image to base the scale set on.", + "type": { + "$id": "829", + "kind": "model", + "name": "ComputeFleetVirtualHardDisk", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualHardDisk", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes the uri of a disk.", + "decorators": [], + "properties": [ + { + "$id": "830", + "kind": "property", + "name": "uri", + "serializedName": "uri", + "doc": "Specifies the virtual hard disk's uri.", + "type": { + "$id": "831", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualHardDisk.uri", + "serializationOptions": { + "$id": "832", + "json": { + "$id": "833", + "name": "uri" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.image", + "serializationOptions": { + "$id": "834", + "json": { + "$id": "835", + "name": "image" + } + } + }, + { + "$id": "836", + "kind": "property", + "name": "vhdContainers", + "serializedName": "vhdContainers", + "doc": "Specifies the container urls that are used to store operating system disks for\nthe scale set.", + "type": { + "$id": "837", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "838", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.vhdContainers", + "serializationOptions": { + "$id": "839", + "json": { + "$id": "840", + "name": "vhdContainers" + } + } + }, + { + "$id": "841", + "kind": "property", + "name": "managedDisk", + "serializedName": "managedDisk", + "doc": "The managed disk parameters.", + "type": { + "$id": "842", + "kind": "model", + "name": "ComputeFleetVmssManagedDisk", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetManagedDiskParameters", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes the parameters of a ScaleSet managed disk.", + "decorators": [], + "properties": [ + { + "$id": "843", + "kind": "property", + "name": "storageAccountType", + "serializedName": "storageAccountType", + "doc": "Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can\nonly be used with data disks, it cannot be used with OS Disk.", + "type": { + "$ref": "200" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetManagedDiskParameters.storageAccountType", + "serializationOptions": { + "$id": "844", + "json": { + "$id": "845", + "name": "storageAccountType" + } + } + }, + { + "$id": "846", + "kind": "property", + "name": "diskEncryptionSet", + "serializedName": "diskEncryptionSet", + "doc": "Specifies the customer managed disk encryption set resource id for the managed\ndisk.", + "type": { + "$id": "847", + "kind": "model", + "name": "DiskEncryptionSetParameters", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskEncryptionSetParameters", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes the parameter of customer managed disk encryption set resource id\nthat can be specified for disk. **Note:** The disk encryption set resource id\ncan only be specified for managed disk. Please refer\nhttps://aka.ms/mdssewithcmkoverview for more details.", + "decorators": [], + "properties": [ + { + "$id": "848", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource Id", + "type": { + "$id": "849", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "850", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskEncryptionSetParameters.id", + "serializationOptions": { + "$id": "851", + "json": { + "$id": "852", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetManagedDiskParameters.diskEncryptionSet", + "serializationOptions": { + "$id": "853", + "json": { + "$id": "854", + "name": "diskEncryptionSet" + } + } + }, + { + "$id": "855", + "kind": "property", + "name": "securityProfile", + "serializedName": "securityProfile", + "doc": "Specifies the security profile for the managed disk.", + "type": { + "$id": "856", + "kind": "model", + "name": "ComputeFleetVMDiskSecurityProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMDiskSecurityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the security profile settings for the managed disk. **Note:** It can\nonly be set for Confidential VMs.", + "decorators": [], + "properties": [ + { + "$id": "857", + "kind": "property", + "name": "securityEncryptionType", + "serializedName": "securityEncryptionType", + "doc": "Specifies the EncryptionType of the managed disk. It is set to\nDiskWithVMGuestState for encryption of the managed disk along with VMGuestState\nblob, VMGuestStateOnly for encryption of just the VMGuestState blob, and\nNonPersistedTPM for not persisting firmware state in the VMGuestState blob..\n**Note:** It can be set for only Confidential VMs.", + "type": { + "$ref": "216" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMDiskSecurityProfile.securityEncryptionType", + "serializationOptions": { + "$id": "858", + "json": { + "$id": "859", + "name": "securityEncryptionType" + } + } + }, + { + "$id": "860", + "kind": "property", + "name": "diskEncryptionSet", + "serializedName": "diskEncryptionSet", + "doc": "Specifies the customer managed disk encryption set resource id for the managed\ndisk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and\nVMGuest blob.", + "type": { + "$ref": "847" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMDiskSecurityProfile.diskEncryptionSet", + "serializationOptions": { + "$id": "861", + "json": { + "$id": "862", + "name": "diskEncryptionSet" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetManagedDiskParameters.securityProfile", + "serializationOptions": { + "$id": "863", + "json": { + "$id": "864", + "name": "securityProfile" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.managedDisk", + "serializationOptions": { + "$id": "865", + "json": { + "$id": "866", + "name": "managedDisk" + } + } + }, + { + "$id": "867", + "kind": "property", + "name": "deleteOption", + "serializedName": "deleteOption", + "doc": "Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion\n(This feature is available for VMSS with Flexible OrchestrationMode only).\n

Possible values:

**Delete** If this value is used, the OS\ndisk is deleted when VMSS Flex VM is deleted.

**Detach** If this value\nis used, the OS disk is retained after VMSS Flex VM is deleted.

The\ndefault value is set to **Delete**. For an Ephemeral OS Disk, the default value\nis set to **Delete**. User cannot change the delete option for Ephemeral OS\nDisk.", + "type": { + "$ref": "224" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.deleteOption", + "serializationOptions": { + "$id": "868", + "json": { + "$id": "869", + "name": "deleteOption" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile.osDisk", + "serializationOptions": { + "$id": "870", + "json": { + "$id": "871", + "name": "osDisk" + } + } + }, + { + "$id": "872", + "kind": "property", + "name": "dataDisks", + "serializedName": "dataDisks", + "doc": "Specifies the parameters that are used to add data disks to the virtual\nmachines in the scale set. For more information about disks, see [About disks\nand VHDs for Azure virtual\nmachines](https://learn.microsoft.com/azure/virtual-machines/managed-disks-overview).", + "type": { + "$id": "873", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetDataDisk", + "valueType": { + "$id": "874", + "kind": "model", + "name": "ComputeFleetVmssDataDisk", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set data disk.", + "decorators": [], + "properties": [ + { + "$id": "875", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The disk name.", + "type": { + "$id": "876", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.name", + "serializationOptions": { + "$id": "877", + "json": { + "$id": "878", + "name": "name" + } + } + }, + { + "$id": "879", + "kind": "property", + "name": "lun", + "serializedName": "lun", + "doc": "Specifies the logical unit number of the data disk. This value is used to\nidentify data disks within the VM and therefore must be unique for each data\ndisk attached to a VM.", + "type": { + "$id": "880", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.lun", + "serializationOptions": { + "$id": "881", + "json": { + "$id": "882", + "name": "lun" + } + } + }, + { + "$id": "883", + "kind": "property", + "name": "caching", + "serializedName": "caching", + "doc": "Specifies the caching requirements. Possible values are: **None,**\n**ReadOnly,** **ReadWrite.** The default values are: **None for Standard\nstorage. ReadOnly for Premium storage.**", + "type": { + "$ref": "162" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.caching", + "serializationOptions": { + "$id": "884", + "json": { + "$id": "885", + "name": "caching" + } + } + }, + { + "$id": "886", + "kind": "property", + "name": "IsWriteAcceleratorEnabled", + "serializedName": "writeAcceleratorEnabled", + "doc": "Specifies whether writeAccelerator should be enabled or disabled on the disk.", + "type": { + "$id": "887", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.writeAcceleratorEnabled", + "serializationOptions": { + "$id": "888", + "json": { + "$id": "889", + "name": "writeAcceleratorEnabled" + } + } + }, + { + "$id": "890", + "kind": "property", + "name": "createOption", + "serializedName": "createOption", + "doc": "The create option.", + "type": { + "$ref": "170" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.createOption", + "serializationOptions": { + "$id": "891", + "json": { + "$id": "892", + "name": "createOption" + } + } + }, + { + "$id": "893", + "kind": "property", + "name": "diskSizeGB", + "serializedName": "diskSizeGB", + "doc": "Specifies the size of an empty data disk in gigabytes. This element can be used\nto overwrite the size of the disk in a virtual machine image. The property\ndiskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be\nlarger than 1023.", + "type": { + "$id": "894", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.diskSizeGB", + "serializationOptions": { + "$id": "895", + "json": { + "$id": "896", + "name": "diskSizeGB" + } + } + }, + { + "$id": "897", + "kind": "property", + "name": "managedDisk", + "serializedName": "managedDisk", + "doc": "The managed disk parameters.", + "type": { + "$ref": "842" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.managedDisk", + "serializationOptions": { + "$id": "898", + "json": { + "$id": "899", + "name": "managedDisk" + } + } + }, + { + "$id": "900", + "kind": "property", + "name": "DiskIopsReadWrite", + "serializedName": "diskIOPSReadWrite", + "doc": "Specifies the Read-Write IOPS for the managed disk. Should be used only when\nStorageAccountType is UltraSSD_LRS. If not specified, a default value would be\nassigned based on diskSizeGB.", + "type": { + "$id": "901", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.diskIOPSReadWrite", + "serializationOptions": { + "$id": "902", + "json": { + "$id": "903", + "name": "diskIOPSReadWrite" + } + } + }, + { + "$id": "904", + "kind": "property", + "name": "DiskMbpsReadWrite", + "serializedName": "diskMBpsReadWrite", + "doc": "Specifies the bandwidth in MB per second for the managed disk. Should be used\nonly when StorageAccountType is UltraSSD_LRS. If not specified, a default value\nwould be assigned based on diskSizeGB.", + "type": { + "$id": "905", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.diskMBpsReadWrite", + "serializationOptions": { + "$id": "906", + "json": { + "$id": "907", + "name": "diskMBpsReadWrite" + } + } + }, + { + "$id": "908", + "kind": "property", + "name": "deleteOption", + "serializedName": "deleteOption", + "doc": "Specifies whether data disk should be deleted or detached upon VMSS Flex\ndeletion (This feature is available for VMSS with Flexible OrchestrationMode\nonly).

Possible values:

**Delete** If this value is used, the\ndata disk is deleted when the VMSS Flex VM is deleted.

**Detach** If\nthis value is used, the data disk is retained after VMSS Flex VM is\ndeleted.

The default value is set to **Delete**.", + "type": { + "$ref": "224" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.deleteOption", + "serializationOptions": { + "$id": "909", + "json": { + "$id": "910", + "name": "deleteOption" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile.dataDisks", + "serializationOptions": { + "$id": "911", + "json": { + "$id": "912", + "name": "dataDisks" + } + } + }, + { + "$id": "913", + "kind": "property", + "name": "diskControllerType", + "serializedName": "diskControllerType", + "doc": "Specifies the disk controller type configured for the virtual machines in the scale set. Minimum api-version: 2022-08-01", + "type": { + "$ref": "230" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile.diskControllerType", + "serializationOptions": { + "$id": "914", + "json": { + "$id": "915", + "name": "diskControllerType" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.storageProfile", + "serializationOptions": { + "$id": "916", + "json": { + "$id": "917", + "name": "storageProfile" + } + } + }, + { + "$id": "918", + "kind": "property", + "name": "networkProfile", + "serializedName": "networkProfile", + "doc": "Specifies properties of the network interfaces of the virtual machines in the\nscale set.", + "type": { + "$id": "919", + "kind": "model", + "name": "ComputeFleetVmssNetworkProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set network profile.", + "decorators": [], + "properties": [ + { + "$id": "920", + "kind": "property", + "name": "healthProbe", + "serializedName": "healthProbe", + "doc": "A reference to a load balancer probe used to determine the health of an\ninstance in the virtual machine scale set. The reference will be in the form:\n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.", + "type": { + "$id": "921", + "kind": "model", + "name": "ApiEntityReference", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiEntityReference", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "The API entity reference.", + "decorators": [], + "properties": [ + { + "$id": "922", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The ARM resource id in the form of\n/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...", + "type": { + "$id": "923", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "924", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiEntityReference.id", + "serializationOptions": { + "$id": "925", + "json": { + "$id": "926", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkProfile.healthProbe", + "serializationOptions": { + "$id": "927", + "json": { + "$id": "928", + "name": "healthProbe" + } + } + }, + { + "$id": "929", + "kind": "property", + "name": "networkInterfaceConfigurations", + "serializedName": "networkInterfaceConfigurations", + "doc": "The list of network configurations.", + "type": { + "$id": "930", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetNetworkConfiguration", + "valueType": { + "$id": "931", + "kind": "model", + "name": "ComputeFleetVmssNetworkConfiguration", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set network profile's network configurations.", + "decorators": [], + "properties": [ + { + "$id": "932", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The network configuration name.", + "type": { + "$id": "933", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfiguration.name", + "serializationOptions": { + "$id": "934", + "json": { + "$id": "935", + "name": "name" + } + } + }, + { + "$id": "936", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Describes a virtual machine scale set network profile's IP configuration.", + "type": { + "$id": "937", + "kind": "model", + "name": "ComputeFleetVmssNetworkConfigurationProperties", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set network profile's IP configuration.", + "decorators": [], + "properties": [ + { + "$id": "938", + "kind": "property", + "name": "IsPrimary", + "serializedName": "primary", + "doc": "Specifies the primary network interface in case the virtual machine has more\nthan 1 network interface.", + "type": { + "$id": "939", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.primary", + "serializationOptions": { + "$id": "940", + "json": { + "$id": "941", + "name": "primary" + } + } + }, + { + "$id": "942", + "kind": "property", + "name": "IsAcceleratedNetworkingEnabled", + "serializedName": "enableAcceleratedNetworking", + "doc": "Specifies whether the network interface is accelerated networking-enabled.", + "type": { + "$id": "943", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.enableAcceleratedNetworking", + "serializationOptions": { + "$id": "944", + "json": { + "$id": "945", + "name": "enableAcceleratedNetworking" + } + } + }, + { + "$id": "946", + "kind": "property", + "name": "IsTcpStateTrackingDisabled", + "serializedName": "disableTcpStateTracking", + "doc": "Specifies whether the network interface is disabled for tcp state tracking.", + "type": { + "$id": "947", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.disableTcpStateTracking", + "serializationOptions": { + "$id": "948", + "json": { + "$id": "949", + "name": "disableTcpStateTracking" + } + } + }, + { + "$id": "950", + "kind": "property", + "name": "IsFpgaEnabled", + "serializedName": "enableFpga", + "doc": "Specifies whether the network interface is FPGA networking-enabled.", + "type": { + "$id": "951", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.enableFpga", + "serializationOptions": { + "$id": "952", + "json": { + "$id": "953", + "name": "enableFpga" + } + } + }, + { + "$id": "954", + "kind": "property", + "name": "networkSecurityGroup", + "serializedName": "networkSecurityGroup", + "doc": "The network security group.", + "type": { + "$ref": "723" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.networkSecurityGroup", + "serializationOptions": { + "$id": "955", + "json": { + "$id": "956", + "name": "networkSecurityGroup" + } + } + }, + { + "$id": "957", + "kind": "property", + "name": "dnsSettings", + "serializedName": "dnsSettings", + "doc": "The dns settings to be applied on the network interfaces.", + "type": { + "$id": "958", + "kind": "model", + "name": "ComputeFleetVmssNetworkDnsSettings", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationDnsSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machines scale sets network configuration's DNS settings.", + "decorators": [], + "properties": [ + { + "$id": "959", + "kind": "property", + "name": "dnsServers", + "serializedName": "dnsServers", + "doc": "List of DNS servers IP addresses", + "type": { + "$id": "960", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "961", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationDnsSettings.dnsServers", + "serializationOptions": { + "$id": "962", + "json": { + "$id": "963", + "name": "dnsServers" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.dnsSettings", + "serializationOptions": { + "$id": "964", + "json": { + "$id": "965", + "name": "dnsSettings" + } + } + }, + { + "$id": "966", + "kind": "property", + "name": "ipConfigurations", + "serializedName": "ipConfigurations", + "doc": "Specifies the IP configurations of the network interface.", + "type": { + "$id": "967", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetIpConfiguration", + "valueType": { + "$id": "968", + "kind": "model", + "name": "ComputeFleetVmssIPConfiguration", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set network profile's IP configuration.", + "decorators": [], + "properties": [ + { + "$id": "969", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The IP configuration name.", + "type": { + "$id": "970", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfiguration.name", + "serializationOptions": { + "$id": "971", + "json": { + "$id": "972", + "name": "name" + } + } + }, + { + "$id": "973", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Describes a virtual machine scale set network profile's IP configuration\nproperties.", + "type": { + "$id": "974", + "kind": "model", + "name": "ComputeFleetVmssIPConfigurationProperties", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set network profile's IP configuration\nproperties.", + "decorators": [], + "properties": [ + { + "$id": "975", + "kind": "property", + "name": "subnet", + "serializedName": "subnet", + "doc": "Specifies the identifier of the subnet.", + "type": { + "$ref": "921" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.subnet", + "serializationOptions": { + "$id": "976", + "json": { + "$id": "977", + "name": "subnet" + } + } + }, + { + "$id": "978", + "kind": "property", + "name": "IsPrimary", + "serializedName": "primary", + "doc": "Specifies the primary network interface in case the virtual machine has more\nthan 1 network interface.", + "type": { + "$id": "979", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.primary", + "serializationOptions": { + "$id": "980", + "json": { + "$id": "981", + "name": "primary" + } + } + }, + { + "$id": "982", + "kind": "property", + "name": "publicIPAddressConfiguration", + "serializedName": "publicIPAddressConfiguration", + "doc": "The publicIPAddressConfiguration.", + "type": { + "$id": "983", + "kind": "model", + "name": "ComputeFleetVmssPublicIPAddressConfiguration", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machines scale set IP Configuration's PublicIPAddress\nconfiguration", + "decorators": [], + "properties": [ + { + "$id": "984", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The publicIP address configuration name.", + "type": { + "$id": "985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfiguration.name", + "serializationOptions": { + "$id": "986", + "json": { + "$id": "987", + "name": "name" + } + } + }, + { + "$id": "988", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Describes a virtual machines scale set IP Configuration's PublicIPAddress\nconfiguration", + "type": { + "$id": "989", + "kind": "model", + "name": "ComputeFleetVmssPublicIPAddressConfigurationProperties", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machines scale set IP Configuration's PublicIPAddress\nconfiguration", + "decorators": [], + "properties": [ + { + "$id": "990", + "kind": "property", + "name": "idleTimeoutInMinutes", + "serializedName": "idleTimeoutInMinutes", + "doc": "The idle timeout of the public IP address.", + "type": { + "$id": "991", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.idleTimeoutInMinutes", + "serializationOptions": { + "$id": "992", + "json": { + "$id": "993", + "name": "idleTimeoutInMinutes" + } + } + }, + { + "$id": "994", + "kind": "property", + "name": "dnsSettings", + "serializedName": "dnsSettings", + "doc": "The dns settings to be applied on the publicIP addresses .", + "type": { + "$id": "995", + "kind": "model", + "name": "ComputeFleetVmssPublicIPAddressDnsSettings", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machines scale sets network configuration's DNS settings.", + "decorators": [], + "properties": [ + { + "$id": "996", + "kind": "property", + "name": "domainNameLabel", + "serializedName": "domainNameLabel", + "doc": "The Domain name label.The concatenation of the domain name label and vm index\nwill be the domain name labels of the PublicIPAddress resources that will be\ncreated", + "type": { + "$id": "997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.domainNameLabel", + "serializationOptions": { + "$id": "998", + "json": { + "$id": "999", + "name": "domainNameLabel" + } + } + }, + { + "$id": "1000", + "kind": "property", + "name": "domainNameLabelScope", + "serializedName": "domainNameLabelScope", + "doc": "The Domain name label scope.The concatenation of the hashed domain name label\nthat generated according to the policy from domain name label scope and vm\nindex will be the domain name labels of the PublicIPAddress resources that will\nbe created", + "type": { + "$ref": "236" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.domainNameLabelScope", + "serializationOptions": { + "$id": "1001", + "json": { + "$id": "1002", + "name": "domainNameLabelScope" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.dnsSettings", + "serializationOptions": { + "$id": "1003", + "json": { + "$id": "1004", + "name": "dnsSettings" + } + } + }, + { + "$id": "1005", + "kind": "property", + "name": "ipTags", + "serializedName": "ipTags", + "doc": "The list of IP tags associated with the public IP address.", + "type": { + "$id": "1006", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetIpTag", + "valueType": { + "$id": "1007", + "kind": "model", + "name": "ComputeFleetVmssIPTag", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIpTag", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Contains the IP tag associated with the public IP address.", + "decorators": [], + "properties": [ + { + "$id": "1008", + "kind": "property", + "name": "ipTagType", + "serializedName": "ipTagType", + "doc": "IP tag type. Example: FirstPartyUsage.", + "type": { + "$id": "1009", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIpTag.ipTagType", + "serializationOptions": { + "$id": "1010", + "json": { + "$id": "1011", + "name": "ipTagType" + } + } + }, + { + "$id": "1012", + "kind": "property", + "name": "tag", + "serializedName": "tag", + "doc": "IP tag associated with the public IP. Example: SQL, Storage etc.", + "type": { + "$id": "1013", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIpTag.tag", + "serializationOptions": { + "$id": "1014", + "json": { + "$id": "1015", + "name": "tag" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.ipTags", + "serializationOptions": { + "$id": "1016", + "json": { + "$id": "1017", + "name": "ipTags" + } + } + }, + { + "$id": "1018", + "kind": "property", + "name": "publicIPPrefix", + "serializedName": "publicIPPrefix", + "doc": "The PublicIPPrefix from which to allocate publicIP addresses.", + "type": { + "$ref": "723" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.publicIPPrefix", + "serializationOptions": { + "$id": "1019", + "json": { + "$id": "1020", + "name": "publicIPPrefix" + } + } + }, + { + "$id": "1021", + "kind": "property", + "name": "publicIPAddressVersion", + "serializedName": "publicIPAddressVersion", + "doc": "Available from Api-Version 2019-07-01 onwards, it represents whether the\nspecific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible\nvalues are: 'IPv4' and 'IPv6'.", + "type": { + "$ref": "246" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.publicIPAddressVersion", + "serializationOptions": { + "$id": "1022", + "json": { + "$id": "1023", + "name": "publicIPAddressVersion" + } + } + }, + { + "$id": "1024", + "kind": "property", + "name": "deleteOption", + "serializedName": "deleteOption", + "doc": "Specify what happens to the public IP when the VM is deleted", + "type": { + "$ref": "252" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.deleteOption", + "serializationOptions": { + "$id": "1025", + "json": { + "$id": "1026", + "name": "deleteOption" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfiguration.properties", + "serializationOptions": { + "$id": "1027", + "json": { + "$id": "1028", + "name": "properties" + } + } + }, + { + "$id": "1029", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "Describes the public IP Sku. It can only be set with OrchestrationMode as\nFlexible.", + "type": { + "$id": "1030", + "kind": "model", + "name": "ComputeFleetPublicIPAddressSku", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSku", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes the public IP Sku. It can only be set with OrchestrationMode as\nFlexible.", + "decorators": [], + "properties": [ + { + "$id": "1031", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Specify public IP sku name", + "type": { + "$ref": "258" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSku.name", + "serializationOptions": { + "$id": "1032", + "json": { + "$id": "1033", + "name": "name" + } + } + }, + { + "$id": "1034", + "kind": "property", + "name": "tier", + "serializedName": "tier", + "doc": "Specify public IP sku tier", + "type": { + "$ref": "264" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSku.tier", + "serializationOptions": { + "$id": "1035", + "json": { + "$id": "1036", + "name": "tier" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfiguration.sku", + "serializationOptions": { + "$id": "1037", + "json": { + "$id": "1038", + "name": "sku" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.publicIPAddressConfiguration", + "serializationOptions": { + "$id": "1039", + "json": { + "$id": "1040", + "name": "publicIPAddressConfiguration" + } + } + }, + { + "$id": "1041", + "kind": "property", + "name": "privateIPAddressVersion", + "serializedName": "privateIPAddressVersion", + "doc": "Available from Api-Version 2017-03-30 onwards, it represents whether the\nspecific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible\nvalues are: 'IPv4' and 'IPv6'.", + "type": { + "$ref": "246" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.privateIPAddressVersion", + "serializationOptions": { + "$id": "1042", + "json": { + "$id": "1043", + "name": "privateIPAddressVersion" + } + } + }, + { + "$id": "1044", + "kind": "property", + "name": "applicationGatewayBackendAddressPools", + "serializedName": "applicationGatewayBackendAddressPools", + "doc": "Specifies an array of references to backend address pools of application\ngateways. A scale set can reference backend address pools of multiple\napplication gateways. Multiple scale sets cannot use the same application\ngateway.", + "type": { + "$id": "1045", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "723" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.applicationGatewayBackendAddressPools", + "serializationOptions": { + "$id": "1046", + "json": { + "$id": "1047", + "name": "applicationGatewayBackendAddressPools" + } + } + }, + { + "$id": "1048", + "kind": "property", + "name": "applicationSecurityGroups", + "serializedName": "applicationSecurityGroups", + "doc": "Specifies an array of references to application security group.", + "type": { + "$id": "1049", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "723" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.applicationSecurityGroups", + "serializationOptions": { + "$id": "1050", + "json": { + "$id": "1051", + "name": "applicationSecurityGroups" + } + } + }, + { + "$id": "1052", + "kind": "property", + "name": "loadBalancerBackendAddressPools", + "serializedName": "loadBalancerBackendAddressPools", + "doc": "Specifies an array of references to backend address pools of load balancers. A\nscale set can reference backend address pools of one public and one internal\nload balancer. Multiple scale sets cannot use the same basic sku load balancer.", + "type": { + "$id": "1053", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "723" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.loadBalancerBackendAddressPools", + "serializationOptions": { + "$id": "1054", + "json": { + "$id": "1055", + "name": "loadBalancerBackendAddressPools" + } + } + }, + { + "$id": "1056", + "kind": "property", + "name": "loadBalancerInboundNatPools", + "serializedName": "loadBalancerInboundNatPools", + "doc": "Specifies an array of references to inbound Nat pools of the load balancers. A\nscale set can reference inbound nat pools of one public and one internal load\nbalancer. Multiple scale sets cannot use the same basic sku load balancer.", + "type": { + "$id": "1057", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "723" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.loadBalancerInboundNatPools", + "serializationOptions": { + "$id": "1058", + "json": { + "$id": "1059", + "name": "loadBalancerInboundNatPools" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfiguration.properties", + "serializationOptions": { + "$id": "1060", + "json": { + "$id": "1061", + "name": "properties" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.ipConfigurations", + "serializationOptions": { + "$id": "1062", + "json": { + "$id": "1063", + "name": "ipConfigurations" + } + } + }, + { + "$id": "1064", + "kind": "property", + "name": "IsIPForwardingEnabled", + "serializedName": "enableIPForwarding", + "doc": "Whether IP forwarding enabled on this NIC.", + "type": { + "$id": "1065", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.enableIPForwarding", + "serializationOptions": { + "$id": "1066", + "json": { + "$id": "1067", + "name": "enableIPForwarding" + } + } + }, + { + "$id": "1068", + "kind": "property", + "name": "deleteOption", + "serializedName": "deleteOption", + "doc": "Specify what happens to the network interface when the VM is deleted", + "type": { + "$ref": "252" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.deleteOption", + "serializationOptions": { + "$id": "1069", + "json": { + "$id": "1070", + "name": "deleteOption" + } + } + }, + { + "$id": "1071", + "kind": "property", + "name": "auxiliaryMode", + "serializedName": "auxiliaryMode", + "doc": "Specifies whether the Auxiliary mode is enabled for the Network Interface\nresource.", + "type": { + "$ref": "270" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.auxiliaryMode", + "serializationOptions": { + "$id": "1072", + "json": { + "$id": "1073", + "name": "auxiliaryMode" + } + } + }, + { + "$id": "1074", + "kind": "property", + "name": "auxiliarySku", + "serializedName": "auxiliarySku", + "doc": "Specifies whether the Auxiliary sku is enabled for the Network Interface\nresource.", + "type": { + "$ref": "278" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.auxiliarySku", + "serializationOptions": { + "$id": "1075", + "json": { + "$id": "1076", + "name": "auxiliarySku" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfiguration.properties", + "serializationOptions": { + "$id": "1077", + "json": { + "$id": "1078", + "name": "properties" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkProfile.networkInterfaceConfigurations", + "serializationOptions": { + "$id": "1079", + "json": { + "$id": "1080", + "name": "networkInterfaceConfigurations" + } + } + }, + { + "$id": "1081", + "kind": "property", + "name": "networkApiVersion", + "serializedName": "networkApiVersion", + "doc": "specifies the Microsoft.Network API version used when creating networking\nresources in the Network Interface Configurations for Virtual Machine Scale Set\nwith orchestration mode 'Flexible'", + "type": { + "$ref": "290" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkProfile.networkApiVersion", + "serializationOptions": { + "$id": "1082", + "json": { + "$id": "1083", + "name": "networkApiVersion" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.networkProfile", + "serializationOptions": { + "$id": "1084", + "json": { + "$id": "1085", + "name": "networkProfile" + } + } + }, + { + "$id": "1086", + "kind": "property", + "name": "securityProfile", + "serializedName": "securityProfile", + "doc": "Specifies the Security related profile settings for the virtual machines in the\nscale set.", + "type": { + "$id": "1087", + "kind": "model", + "name": "ComputeFleetSecurityProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the Security profile settings for the virtual machine or virtual\nmachine scale set.", + "decorators": [], + "properties": [ + { + "$id": "1088", + "kind": "property", + "name": "uefiSettings", + "serializedName": "uefiSettings", + "doc": "Specifies the security settings like secure boot and vTPM used while creating\nthe virtual machine. Minimum api-version: 2020-12-01.", + "type": { + "$id": "1089", + "kind": "model", + "name": "ComputeFleetUefiSettings", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.UefiSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the security settings like secure boot and vTPM used while creating\nthe virtual machine. Minimum api-version: 2020-12-01.", + "decorators": [], + "properties": [ + { + "$id": "1090", + "kind": "property", + "name": "IsSecureBootEnabled", + "serializedName": "secureBootEnabled", + "doc": "Specifies whether secure boot should be enabled on the virtual machine. Minimum\napi-version: 2020-12-01.", + "type": { + "$id": "1091", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.UefiSettings.secureBootEnabled", + "serializationOptions": { + "$id": "1092", + "json": { + "$id": "1093", + "name": "secureBootEnabled" + } + } + }, + { + "$id": "1094", + "kind": "property", + "name": "IsVTpmEnabled", + "serializedName": "vTpmEnabled", + "doc": "Specifies whether vTPM should be enabled on the virtual machine. Minimum\napi-version: 2020-12-01.", + "type": { + "$id": "1095", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.UefiSettings.vTpmEnabled", + "serializationOptions": { + "$id": "1096", + "json": { + "$id": "1097", + "name": "vTpmEnabled" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.uefiSettings", + "serializationOptions": { + "$id": "1098", + "json": { + "$id": "1099", + "name": "uefiSettings" + } + } + }, + { + "$id": "1100", + "kind": "property", + "name": "IsEncryptionAtHostEnabled", + "serializedName": "encryptionAtHost", + "doc": "This property can be used by user in the request to enable or disable the Host\nEncryption for the virtual machine or virtual machine scale set. This will\nenable the encryption for all the disks including Resource/Temp disk at host\nitself. The default behavior is: The Encryption at host will be disabled unless\nthis property is set to true for the resource.", + "type": { + "$id": "1101", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.encryptionAtHost", + "serializationOptions": { + "$id": "1102", + "json": { + "$id": "1103", + "name": "encryptionAtHost" + } + } + }, + { + "$id": "1104", + "kind": "property", + "name": "securityType", + "serializedName": "securityType", + "doc": "Specifies the SecurityType of the virtual machine. It has to be set to any\nspecified value to enable UefiSettings. The default behavior is: UefiSettings\nwill not be enabled unless this property is set.", + "type": { + "$ref": "294" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.securityType", + "serializationOptions": { + "$id": "1105", + "json": { + "$id": "1106", + "name": "securityType" + } + } + }, + { + "$id": "1107", + "kind": "property", + "name": "encryptionIdentity", + "serializedName": "encryptionIdentity", + "doc": "Specifies the Managed Identity used by ADE to get access token for keyvault\noperations.", + "type": { + "$id": "1108", + "kind": "model", + "name": "ComputeFleetEncryptionIdentity", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.EncryptionIdentity", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the Managed Identity used by ADE to get access token for keyvault\noperations.", + "decorators": [], + "properties": [ + { + "$id": "1109", + "kind": "property", + "name": "userAssignedIdentityResourceId", + "serializedName": "userAssignedIdentityResourceId", + "doc": "Specifies ARM Resource ID of one of the user identities associated with the VM.", + "type": { + "$id": "1110", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.EncryptionIdentity.userAssignedIdentityResourceId", + "serializationOptions": { + "$id": "1112", + "json": { + "$id": "1113", + "name": "userAssignedIdentityResourceId" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.encryptionIdentity", + "serializationOptions": { + "$id": "1114", + "json": { + "$id": "1115", + "name": "encryptionIdentity" + } + } + }, + { + "$id": "1116", + "kind": "property", + "name": "proxyAgentSettings", + "serializedName": "proxyAgentSettings", + "doc": "Specifies ProxyAgent settings while creating the virtual machine. Minimum\napi-version: 2023-09-01.", + "type": { + "$id": "1117", + "kind": "model", + "name": "ComputeFleetProxyAgentSettings", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProxyAgentSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies ProxyAgent settings while creating the virtual machine. Minimum\napi-version: 2023-09-01.", + "decorators": [], + "properties": [ + { + "$id": "1118", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enabled", + "doc": "Specifies whether ProxyAgent feature should be enabled on the virtual machine\nor virtual machine scale set.", + "type": { + "$id": "1119", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProxyAgentSettings.enabled", + "serializationOptions": { + "$id": "1120", + "json": { + "$id": "1121", + "name": "enabled" + } + } + }, + { + "$id": "1122", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "Specifies the mode that ProxyAgent will execute on if the feature is enabled.\nProxyAgent will start to audit or monitor but not enforce access control over\nrequests to host endpoints in Audit mode, while in Enforce mode it will enforce\naccess control. The default value is Enforce mode.", + "type": { + "$ref": "300" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProxyAgentSettings.mode", + "serializationOptions": { + "$id": "1123", + "json": { + "$id": "1124", + "name": "mode" + } + } + }, + { + "$id": "1125", + "kind": "property", + "name": "keyIncarnationId", + "serializedName": "keyIncarnationId", + "doc": "Increase the value of this property allows user to reset the key used for\nsecuring communication channel between guest and host.", + "type": { + "$id": "1126", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProxyAgentSettings.keyIncarnationId", + "serializationOptions": { + "$id": "1127", + "json": { + "$id": "1128", + "name": "keyIncarnationId" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.proxyAgentSettings", + "serializationOptions": { + "$id": "1129", + "json": { + "$id": "1130", + "name": "proxyAgentSettings" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.securityProfile", + "serializationOptions": { + "$id": "1131", + "json": { + "$id": "1132", + "name": "securityProfile" + } + } + }, + { + "$id": "1133", + "kind": "property", + "name": "diagnosticsProfile", + "serializedName": "diagnosticsProfile", + "doc": "Specifies the boot diagnostic settings state.", + "type": { + "$id": "1134", + "kind": "model", + "name": "ComputeFleetDiagnosticsProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiagnosticsProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.", + "decorators": [], + "properties": [ + { + "$id": "1135", + "kind": "property", + "name": "bootDiagnostics", + "serializedName": "bootDiagnostics", + "doc": "Boot Diagnostics is a debugging feature which allows you to view Console Output\nand Screenshot to diagnose VM status. **NOTE**: If storageUri is being\nspecified then ensure that the storage account is in the same region and\nsubscription as the VM. You can easily view the output of your console log.\nAzure also enables you to see a screenshot of the VM from the hypervisor.", + "type": { + "$id": "1136", + "kind": "model", + "name": "ComputeFleetBootDiagnostics", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BootDiagnostics", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Boot Diagnostics is a debugging feature which allows you to view Console Output\nand Screenshot to diagnose VM status. You can easily view the output of your\nconsole log. Azure also enables you to see a screenshot of the VM from the\nhypervisor.", + "decorators": [], + "properties": [ + { + "$id": "1137", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enabled", + "doc": "Whether boot diagnostics should be enabled on the Virtual Machine.", + "type": { + "$id": "1138", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BootDiagnostics.enabled", + "serializationOptions": { + "$id": "1139", + "json": { + "$id": "1140", + "name": "enabled" + } + } + }, + { + "$id": "1141", + "kind": "property", + "name": "storageUri", + "serializedName": "storageUri", + "doc": "Uri of the storage account to use for placing the console output and\nscreenshot. If storageUri is not specified while enabling boot diagnostics,\nmanaged storage will be used.", + "type": { + "$id": "1142", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BootDiagnostics.storageUri", + "serializationOptions": { + "$id": "1143", + "json": { + "$id": "1144", + "name": "storageUri" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiagnosticsProfile.bootDiagnostics", + "serializationOptions": { + "$id": "1145", + "json": { + "$id": "1146", + "name": "bootDiagnostics" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.diagnosticsProfile", + "serializationOptions": { + "$id": "1147", + "json": { + "$id": "1148", + "name": "diagnosticsProfile" + } + } + }, + { + "$id": "1149", + "kind": "property", + "name": "extensionProfile", + "serializedName": "extensionProfile", + "doc": "Specifies a collection of settings for extensions installed on virtual machines\nin the scale set.", + "type": { + "$id": "1150", + "kind": "model", + "name": "ComputeFleetVmssExtensionProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set extension profile.", + "decorators": [], + "properties": [ + { + "$id": "1151", + "kind": "property", + "name": "extensions", + "serializedName": "extensions", + "doc": "The virtual machine scale set child extension resources.", + "type": { + "$id": "1152", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetExtension", + "valueType": { + "$id": "1153", + "kind": "model", + "name": "ComputeFleetVmssExtension", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a Virtual Machine Scale Set Extension.", + "decorators": [], + "properties": [ + { + "$id": "1154", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource Id", + "type": { + "$id": "1155", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1156", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension.id", + "serializationOptions": { + "$id": "1157", + "json": { + "$id": "1158", + "name": "id" + } + } + }, + { + "$id": "1159", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the extension.", + "type": { + "$id": "1160", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension.name", + "serializationOptions": { + "$id": "1161", + "json": { + "$id": "1162", + "name": "name" + } + } + }, + { + "$id": "1163", + "kind": "property", + "name": "ExtensionType", + "serializedName": "type", + "doc": "Resource type", + "type": { + "$id": "1164", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension.type", + "serializationOptions": { + "$id": "1165", + "json": { + "$id": "1166", + "name": "type" + } + } + }, + { + "$id": "1167", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Describes the properties of a Virtual Machine Scale Set Extension.", + "type": { + "$id": "1168", + "kind": "model", + "name": "ComputeFleetVmssExtensionProperties", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes the properties of a Virtual Machine Scale Set Extension.", + "decorators": [], + "properties": [ + { + "$id": "1169", + "kind": "property", + "name": "forceUpdateTag", + "serializedName": "forceUpdateTag", + "doc": "If a value is provided and is different from the previous value, the extension\nhandler will be forced to update even if the extension configuration has not\nchanged.", + "type": { + "$id": "1170", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.forceUpdateTag", + "serializationOptions": { + "$id": "1171", + "json": { + "$id": "1172", + "name": "forceUpdateTag" + } + } + }, + { + "$id": "1173", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The name of the extension handler publisher.", + "type": { + "$id": "1174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.publisher", + "serializationOptions": { + "$id": "1175", + "json": { + "$id": "1176", + "name": "publisher" + } + } + }, + { + "$id": "1177", + "kind": "property", + "name": "ExtensionType", + "serializedName": "type", + "doc": "Specifies the type of the extension; an example is \"CustomScriptExtension\".", + "type": { + "$id": "1178", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.type", + "serializationOptions": { + "$id": "1179", + "json": { + "$id": "1180", + "name": "type" + } + } + }, + { + "$id": "1181", + "kind": "property", + "name": "typeHandlerVersion", + "serializedName": "typeHandlerVersion", + "doc": "Specifies the version of the script handler.", + "type": { + "$id": "1182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.typeHandlerVersion", + "serializationOptions": { + "$id": "1183", + "json": { + "$id": "1184", + "name": "typeHandlerVersion" + } + } + }, + { + "$id": "1185", + "kind": "property", + "name": "ShouldAutoUpgradeMinorVersion", + "serializedName": "autoUpgradeMinorVersion", + "doc": "Indicates whether the extension should use a newer minor version if one is\navailable at deployment time. Once deployed, however, the extension will not\nupgrade minor versions unless redeployed, even with this property set to true.", + "type": { + "$id": "1186", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.autoUpgradeMinorVersion", + "serializationOptions": { + "$id": "1187", + "json": { + "$id": "1188", + "name": "autoUpgradeMinorVersion" + } + } + }, + { + "$id": "1189", + "kind": "property", + "name": "IsAutomaticUpgradeEnabled", + "serializedName": "enableAutomaticUpgrade", + "doc": "Indicates whether the extension should be automatically upgraded by the\nplatform if there is a newer version of the extension available.", + "type": { + "$id": "1190", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.enableAutomaticUpgrade", + "serializationOptions": { + "$id": "1191", + "json": { + "$id": "1192", + "name": "enableAutomaticUpgrade" + } + } + }, + { + "$id": "1193", + "kind": "property", + "name": "settings", + "serializedName": "settings", + "doc": "Json formatted public settings for the extension.", + "type": { + "$id": "1194", + "kind": "dict", + "keyType": { + "$id": "1195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1196", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.settings", + "serializationOptions": { + "$id": "1197", + "json": { + "$id": "1198", + "name": "settings" + } + } + }, + { + "$id": "1199", + "kind": "property", + "name": "protectedSettings", + "serializedName": "protectedSettings", + "doc": "The extension can contain either protectedSettings or\nprotectedSettingsFromKeyVault or no protected settings at all.", + "type": { + "$id": "1200", + "kind": "dict", + "keyType": { + "$id": "1201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1202", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.protectedSettings", + "serializationOptions": { + "$id": "1203", + "json": { + "$id": "1204", + "name": "protectedSettings" + } + } + }, + { + "$id": "1205", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The provisioning state, which only appears in the response.", + "type": { + "$id": "1206", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.provisioningState", + "serializationOptions": { + "$id": "1207", + "json": { + "$id": "1208", + "name": "provisioningState" + } + } + }, + { + "$id": "1209", + "kind": "property", + "name": "provisionAfterExtensions", + "serializedName": "provisionAfterExtensions", + "doc": "Collection of extension names after which this extension needs to be\nprovisioned.", + "type": { + "$id": "1210", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.provisionAfterExtensions", + "serializationOptions": { + "$id": "1212", + "json": { + "$id": "1213", + "name": "provisionAfterExtensions" + } + } + }, + { + "$id": "1214", + "kind": "property", + "name": "IsSuppressFailuresEnabled", + "serializedName": "suppressFailures", + "doc": "Indicates whether failures stemming from the extension will be suppressed\n(Operational failures such as not connecting to the VM will not be suppressed\nregardless of this value). The default is false.", + "type": { + "$id": "1215", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.suppressFailures", + "serializationOptions": { + "$id": "1216", + "json": { + "$id": "1217", + "name": "suppressFailures" + } + } + }, + { + "$id": "1218", + "kind": "property", + "name": "protectedSettingsFromKeyVault", + "serializedName": "protectedSettingsFromKeyVault", + "doc": "The extensions protected settings that are passed by reference, and consumed\nfrom key vault", + "type": { + "$id": "1219", + "kind": "model", + "name": "ComputeFleetKeyVaultSecretReference", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.KeyVaultSecretReference", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a reference to Key Vault Secret", + "decorators": [], + "properties": [ + { + "$id": "1220", + "kind": "property", + "name": "secretUrl", + "serializedName": "secretUrl", + "doc": "The URL referencing a secret in a Key Vault.", + "type": { + "$id": "1221", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.KeyVaultSecretReference.secretUrl", + "serializationOptions": { + "$id": "1222", + "json": { + "$id": "1223", + "name": "secretUrl" + } + } + }, + { + "$id": "1224", + "kind": "property", + "name": "sourceVault", + "serializedName": "sourceVault", + "doc": "The relative URL of the Key Vault containing the secret.", + "type": { + "$ref": "723" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.KeyVaultSecretReference.sourceVault", + "serializationOptions": { + "$id": "1225", + "json": { + "$id": "1226", + "name": "sourceVault" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.protectedSettingsFromKeyVault", + "serializationOptions": { + "$id": "1227", + "json": { + "$id": "1228", + "name": "protectedSettingsFromKeyVault" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension.properties", + "serializationOptions": { + "$id": "1229", + "json": { + "$id": "1230", + "name": "properties" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProfile.extensions", + "serializationOptions": { + "$id": "1231", + "json": { + "$id": "1232", + "name": "extensions" + } + } + }, + { + "$id": "1233", + "kind": "property", + "name": "extensionsTimeBudget", + "serializedName": "extensionsTimeBudget", + "doc": "Specifies the time alloted for all extensions to start. The time duration\nshould be between 15 minutes and 120 minutes (inclusive) and should be\nspecified in ISO 8601 format. The default value is 90 minutes (PT1H30M).\nMinimum api-version: 2020-06-01.", + "type": { + "$id": "1234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProfile.extensionsTimeBudget", + "serializationOptions": { + "$id": "1235", + "json": { + "$id": "1236", + "name": "extensionsTimeBudget" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.extensionProfile", + "serializationOptions": { + "$id": "1237", + "json": { + "$id": "1238", + "name": "extensionProfile" + } + } + }, + { + "$id": "1239", + "kind": "property", + "name": "licenseType", + "serializedName": "licenseType", + "doc": "Specifies that the image or disk that is being used was licensed on-premises.\n

Possible values for Windows Server operating system are:

\nWindows_Client

Windows_Server

Possible values for Linux\nServer operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS\n(for SUSE)

For more information, see [Azure Hybrid Use Benefit for\nWindows\nServer](https://learn.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)\n

[Azure Hybrid Use Benefit for Linux\nServer](https://learn.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)\n

Minimum api-version: 2015-06-15", + "type": { + "$id": "1240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.licenseType", + "serializationOptions": { + "$id": "1241", + "json": { + "$id": "1242", + "name": "licenseType" + } + } + }, + { + "$id": "1243", + "kind": "property", + "name": "scheduledEventsProfile", + "serializedName": "scheduledEventsProfile", + "doc": "Specifies Scheduled Event related configurations.", + "type": { + "$id": "1244", + "kind": "model", + "name": "ComputeFleetScheduledEventsProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ScheduledEventsProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies Scheduled Event related configurations.", + "decorators": [], + "properties": [ + { + "$id": "1245", + "kind": "property", + "name": "terminateNotificationProfile", + "serializedName": "terminateNotificationProfile", + "doc": "Specifies Terminate Scheduled Event related configurations.", + "type": { + "$id": "1246", + "kind": "model", + "name": "ComputeFleetTerminateNotificationProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.TerminateNotificationProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies Terminate Scheduled Event related configurations.", + "decorators": [], + "properties": [ + { + "$id": "1247", + "kind": "property", + "name": "notBeforeTimeout", + "serializedName": "notBeforeTimeout", + "doc": "Configurable length of time a Virtual Machine being deleted will have to\npotentially approve the Terminate Scheduled Event before the event is auto\napproved (timed out). The configuration must be specified in ISO 8601 format,\nthe default value is 5 minutes (PT5M)", + "type": { + "$id": "1248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.TerminateNotificationProfile.notBeforeTimeout", + "serializationOptions": { + "$id": "1249", + "json": { + "$id": "1250", + "name": "notBeforeTimeout" + } + } + }, + { + "$id": "1251", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enable", + "doc": "Specifies whether the Terminate Scheduled event is enabled or disabled.", + "type": { + "$id": "1252", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.TerminateNotificationProfile.enable", + "serializationOptions": { + "$id": "1253", + "json": { + "$id": "1254", + "name": "enable" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ScheduledEventsProfile.terminateNotificationProfile", + "serializationOptions": { + "$id": "1255", + "json": { + "$id": "1256", + "name": "terminateNotificationProfile" + } + } + }, + { + "$id": "1257", + "kind": "property", + "name": "osImageNotificationProfile", + "serializedName": "osImageNotificationProfile", + "doc": "Specifies OS Image Scheduled Event related configurations.", + "type": { + "$id": "1258", + "kind": "model", + "name": "ComputeFleetOSImageNotificationProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.OSImageNotificationProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies OS Image Scheduled Event related configurations.", + "decorators": [], + "properties": [ + { + "$id": "1259", + "kind": "property", + "name": "notBeforeTimeout", + "serializedName": "notBeforeTimeout", + "doc": "Length of time a Virtual Machine being reimaged or having its OS upgraded will\nhave to potentially approve the OS Image Scheduled Event before the event is\nauto approved (timed out). The configuration is specified in ISO 8601 format,\nand the value must not exceed 15 minutes (PT15M)", + "type": { + "$id": "1260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.OSImageNotificationProfile.notBeforeTimeout", + "serializationOptions": { + "$id": "1261", + "json": { + "$id": "1262", + "name": "notBeforeTimeout" + } + } + }, + { + "$id": "1263", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enable", + "doc": "Specifies whether the OS Image Scheduled event is enabled or disabled.", + "type": { + "$id": "1264", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.OSImageNotificationProfile.enable", + "serializationOptions": { + "$id": "1265", + "json": { + "$id": "1266", + "name": "enable" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ScheduledEventsProfile.osImageNotificationProfile", + "serializationOptions": { + "$id": "1267", + "json": { + "$id": "1268", + "name": "osImageNotificationProfile" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.scheduledEventsProfile", + "serializationOptions": { + "$id": "1269", + "json": { + "$id": "1270", + "name": "scheduledEventsProfile" + } + } + }, + { + "$id": "1271", + "kind": "property", + "name": "userData", + "serializedName": "userData", + "doc": "UserData for the virtual machines in the scale set, which must be base-64\nencoded. Customer should not pass any secrets in here. Minimum api-version:\n2021-03-01.", + "type": { + "$id": "1272", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.userData", + "serializationOptions": { + "$id": "1273", + "json": { + "$id": "1274", + "name": "userData" + } + } + }, + { + "$id": "1275", + "kind": "property", + "name": "capacityReservation", + "serializedName": "capacityReservation", + "doc": "Specifies the capacity reservation related details of a scale set. Minimum\napi-version: 2021-04-01.", + "type": { + "$id": "1276", + "kind": "model", + "name": "CapacityReservationProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.CapacityReservationProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "The parameters of a capacity reservation Profile.", + "decorators": [], + "properties": [ + { + "$id": "1277", + "kind": "property", + "name": "capacityReservationGroup", + "serializedName": "capacityReservationGroup", + "doc": "Specifies the capacity reservation group resource id that should be used for\nallocating the virtual machine or scaleset vm instances provided enough\ncapacity has been reserved. Please refer to https://aka.ms/CapacityReservation\nfor more details.", + "type": { + "$ref": "723" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.CapacityReservationProfile.capacityReservationGroup", + "serializationOptions": { + "$id": "1278", + "json": { + "$id": "1279", + "name": "capacityReservationGroup" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.capacityReservation", + "serializationOptions": { + "$id": "1280", + "json": { + "$id": "1281", + "name": "capacityReservation" + } + } + }, + { + "$id": "1282", + "kind": "property", + "name": "applicationProfile", + "serializedName": "applicationProfile", + "doc": "Specifies the gallery applications that should be made available to the VM/VMSS", + "type": { + "$id": "1283", + "kind": "model", + "name": "ComputeFleetApplicationProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApplicationProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Contains the list of gallery applications that should be made available to the\nVM/VMSS", + "decorators": [], + "properties": [ + { + "$id": "1284", + "kind": "property", + "name": "galleryApplications", + "serializedName": "galleryApplications", + "doc": "Specifies the gallery applications that should be made available to the VM/VMSS", + "type": { + "$id": "1285", + "kind": "array", + "name": "ArrayVmGalleryApplication", + "valueType": { + "$id": "1286", + "kind": "model", + "name": "ComputeFleetVMGalleryApplication", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the required information to reference a compute gallery application\nversion", + "decorators": [], + "properties": [ + { + "$id": "1287", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Optional, Specifies a passthrough value for more generic context.", + "type": { + "$id": "1288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.tags", + "serializationOptions": { + "$id": "1289", + "json": { + "$id": "1290", + "name": "tags" + } + } + }, + { + "$id": "1291", + "kind": "property", + "name": "order", + "serializedName": "order", + "doc": "Optional, Specifies the order in which the packages have to be installed", + "type": { + "$id": "1292", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.order", + "serializationOptions": { + "$id": "1293", + "json": { + "$id": "1294", + "name": "order" + } + } + }, + { + "$id": "1295", + "kind": "property", + "name": "packageReferenceId", + "serializedName": "packageReferenceId", + "doc": "Specifies the GalleryApplicationVersion resource id on the form of\n/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}", + "type": { + "$id": "1296", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.packageReferenceId", + "serializationOptions": { + "$id": "1298", + "json": { + "$id": "1299", + "name": "packageReferenceId" + } + } + }, + { + "$id": "1300", + "kind": "property", + "name": "configurationReference", + "serializedName": "configurationReference", + "doc": "Optional, Specifies the uri to an azure blob that will replace the default\nconfiguration for the package if provided", + "type": { + "$id": "1301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.configurationReference", + "serializationOptions": { + "$id": "1302", + "json": { + "$id": "1303", + "name": "configurationReference" + } + } + }, + { + "$id": "1304", + "kind": "property", + "name": "IsTreatFailureAsDeploymentFailureEnabled", + "serializedName": "treatFailureAsDeploymentFailure", + "doc": "Optional, If true, any failure for any operation in the VmApplication will fail\nthe deployment", + "type": { + "$id": "1305", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.treatFailureAsDeploymentFailure", + "serializationOptions": { + "$id": "1306", + "json": { + "$id": "1307", + "name": "treatFailureAsDeploymentFailure" + } + } + }, + { + "$id": "1308", + "kind": "property", + "name": "IsAutomaticUpgradeEnabled", + "serializedName": "enableAutomaticUpgrade", + "doc": "If set to true, when a new Gallery Application version is available in PIR/SIG,\nit will be automatically updated for the VM/VMSS", + "type": { + "$id": "1309", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.enableAutomaticUpgrade", + "serializationOptions": { + "$id": "1310", + "json": { + "$id": "1311", + "name": "enableAutomaticUpgrade" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApplicationProfile.galleryApplications", + "serializationOptions": { + "$id": "1312", + "json": { + "$id": "1313", + "name": "galleryApplications" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.applicationProfile", + "serializationOptions": { + "$id": "1314", + "json": { + "$id": "1315", + "name": "applicationProfile" + } + } + }, + { + "$id": "1316", + "kind": "property", + "name": "hardwareProfile", + "serializedName": "hardwareProfile", + "doc": "Specifies the hardware profile related details of a scale set. Minimum\napi-version: 2021-11-01.", + "type": { + "$id": "1317", + "kind": "model", + "name": "ComputeFleetVmssHardwareProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetHardwareProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the hardware settings for the virtual machine scale set.", + "decorators": [], + "properties": [ + { + "$id": "1318", + "kind": "property", + "name": "vmSizeProperties", + "serializedName": "vmSizeProperties", + "doc": "Specifies the properties for customizing the size of the virtual machine.\nMinimum api-version: 2021-11-01. Please follow the instructions in [VM\nCustomization](https://aka.ms/vmcustomization) for more details.", + "type": { + "$id": "1319", + "kind": "model", + "name": "ComputeFleetVMSizeProperties", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMSizeProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies VM Size Property settings on the virtual machine.", + "decorators": [], + "properties": [ + { + "$id": "1320", + "kind": "property", + "name": "vCPUsAvailable", + "serializedName": "vCPUsAvailable", + "doc": "Specifies the number of vCPUs available for the VM. When this property is not\nspecified in the request body the default behavior is to set it to the value of\nvCPUs available for that VM size exposed in api response of [List all available\nvirtual machine sizes in a\nregion](https://learn.microsoft.com/en-us/rest/api/compute/resource-skus/list).", + "type": { + "$id": "1321", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMSizeProperties.vCPUsAvailable", + "serializationOptions": { + "$id": "1322", + "json": { + "$id": "1323", + "name": "vCPUsAvailable" + } + } + }, + { + "$id": "1324", + "kind": "property", + "name": "vCPUsPerCore", + "serializedName": "vCPUsPerCore", + "doc": "Specifies the vCPU to physical core ratio. When this property is not specified\nin the request body the default behavior is set to the value of vCPUsPerCore\nfor the VM Size exposed in api response of [List all available virtual machine\nsizes in a\nregion](https://learn.microsoft.com/en-us/rest/api/compute/resource-skus/list).\n**Setting this property to 1 also means that hyper-threading is disabled.**", + "type": { + "$id": "1325", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMSizeProperties.vCPUsPerCore", + "serializationOptions": { + "$id": "1326", + "json": { + "$id": "1327", + "name": "vCPUsPerCore" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetHardwareProfile.vmSizeProperties", + "serializationOptions": { + "$id": "1328", + "json": { + "$id": "1329", + "name": "vmSizeProperties" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.hardwareProfile", + "serializationOptions": { + "$id": "1330", + "json": { + "$id": "1331", + "name": "hardwareProfile" + } + } + }, + { + "$id": "1332", + "kind": "property", + "name": "serviceArtifactReference", + "serializedName": "serviceArtifactReference", + "doc": "Specifies the service artifact reference id used to set same image version for\nall virtual machines in the scale set when using 'latest' image version.\nMinimum api-version: 2022-11-01", + "type": { + "$id": "1333", + "kind": "model", + "name": "ServiceArtifactReference", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ServiceArtifactReference", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the service artifact reference id used to set same image version for\nall virtual machines in the scale set when using 'latest' image version.\nMinimum api-version: 2022-11-01", + "decorators": [], + "properties": [ + { + "$id": "1334", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The service artifact reference id in the form of\n/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}", + "type": { + "$id": "1335", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1336", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ServiceArtifactReference.id", + "serializationOptions": { + "$id": "1337", + "json": { + "$id": "1338", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.serviceArtifactReference", + "serializationOptions": { + "$id": "1339", + "json": { + "$id": "1340", + "name": "serviceArtifactReference" + } + } + }, + { + "$id": "1341", + "kind": "property", + "name": "securityPostureReference", + "serializedName": "securityPostureReference", + "doc": "Specifies the security posture to be used for all virtual machines in the scale\nset. Minimum api-version: 2023-03-01", + "type": { + "$id": "1342", + "kind": "model", + "name": "ComputeFleetSecurityPostureReference", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityPostureReference", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the security posture to be used for all virtual machines in the scale\nset. Minimum api-version: 2023-03-01", + "decorators": [], + "properties": [ + { + "$id": "1343", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The security posture reference id in the form of\n/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest", + "type": { + "$id": "1344", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityPostureReference.id", + "serializationOptions": { + "$id": "1345", + "json": { + "$id": "1346", + "name": "id" + } + } + }, + { + "$id": "1347", + "kind": "property", + "name": "excludeExtensions", + "serializedName": "excludeExtensions", + "doc": "List of virtual machine extension names to exclude when applying the security\nposture.", + "type": { + "$id": "1348", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityPostureReference.excludeExtensions", + "serializationOptions": { + "$id": "1350", + "json": { + "$id": "1351", + "name": "excludeExtensions" + } + } + }, + { + "$id": "1352", + "kind": "property", + "name": "isOverridable", + "serializedName": "isOverridable", + "doc": "Whether the security posture can be overridden by the user.", + "type": { + "$id": "1353", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityPostureReference.isOverridable", + "serializationOptions": { + "$id": "1354", + "json": { + "$id": "1355", + "name": "isOverridable" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.securityPostureReference", + "serializationOptions": { + "$id": "1356", + "json": { + "$id": "1357", + "name": "securityPostureReference" + } + } + }, + { + "$id": "1358", + "kind": "property", + "name": "CreatedOn", + "serializedName": "timeCreated", + "doc": "Specifies the time in which this VM profile for the Virtual Machine Scale Set\nwas created. Minimum API version for this property is 2023-09-01. This value\nwill be added to VMSS Flex VM tags when creating/updating the VMSS VM Profile\nwith minimum api-version 2023-09-01. Examples: \"2024-07-01T00:00:01.1234567+00:00\"", + "type": { + "$id": "1359", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1360", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.timeCreated", + "serializationOptions": { + "$id": "1361", + "json": { + "$id": "1362", + "name": "timeCreated" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LocationProfile.virtualMachineProfileOverride", + "serializationOptions": { + "$id": "1363", + "json": { + "$id": "1364", + "name": "virtualMachineProfileOverride" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalLocationsProfile.locationProfiles", + "serializationOptions": { + "$id": "1365", + "json": { + "$id": "1366", + "name": "locationProfiles" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.additionalLocationsProfile", + "serializationOptions": { + "$id": "1367", + "json": { + "$id": "1368", + "name": "additionalLocationsProfile" + } + } + }, + { + "$id": "1369", + "kind": "property", + "name": "computeProfile", + "serializedName": "computeProfile", + "doc": "Compute Profile to use for running user's workloads.", + "type": { + "$id": "1370", + "kind": "model", + "name": "ComputeFleetComputeProfile", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Compute Profile to use for running user's workloads.", + "decorators": [], + "properties": [ + { + "$id": "1371", + "kind": "property", + "name": "baseVirtualMachineProfile", + "serializedName": "baseVirtualMachineProfile", + "doc": "Base Virtual Machine Profile Properties to be specified according to \"specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachineScaleSet.json#/definitions/VirtualMachineScaleSetVMProfile\"", + "type": { + "$ref": "565" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile.baseVirtualMachineProfile", + "serializationOptions": { + "$id": "1372", + "json": { + "$id": "1373", + "name": "baseVirtualMachineProfile" + } + } + }, + { + "$id": "1374", + "kind": "property", + "name": "computeApiVersion", + "serializedName": "computeApiVersion", + "doc": "Specifies the Microsoft.Compute API version to use when creating underlying Virtual Machine scale sets and Virtual Machines.\nThe default value will be the latest supported computeApiVersion by Compute Fleet.", + "type": { + "$id": "1375", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile.computeApiVersion", + "serializationOptions": { + "$id": "1376", + "json": { + "$id": "1377", + "name": "computeApiVersion" + } + } + }, + { + "$id": "1378", + "kind": "property", + "name": "platformFaultDomainCount", + "serializedName": "platformFaultDomainCount", + "doc": "Specifies the number of fault domains to use when creating the underlying VMSS.\nA fault domain is a logical group of hardware within an Azure datacenter.\nVMs in the same fault domain share a common power source and network switch.\nIf not specified, defaults to 1, which represents \"Max Spreading\" (using as many fault domains as possible).\nThis property cannot be updated.", + "type": { + "$id": "1379", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile.platformFaultDomainCount", + "serializationOptions": { + "$id": "1380", + "json": { + "$id": "1381", + "name": "platformFaultDomainCount" + } + } + }, + { + "$id": "1382", + "kind": "property", + "name": "additionalVirtualMachineCapabilities", + "serializedName": "additionalVirtualMachineCapabilities", + "doc": "Specifies VMSS and VM API entity models support two additional capabilities as of today: ultraSSDEnabled and hibernationEnabled.\nultraSSDEnabled: Enables UltraSSD_LRS storage account type on the VMSS VMs.\nhibernationEnabled: Enables the hibernation capability on the VMSS VMs.\nDefault value is null if not specified. This property cannot be updated once set.", + "type": { + "$id": "1383", + "kind": "model", + "name": "AdditionalCapabilities", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalCapabilities", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "AdditionalCapabilities for VM.", + "decorators": [], + "properties": [ + { + "$id": "1384", + "kind": "property", + "name": "isUltraSSDEnabled", + "serializedName": "ultraSSDEnabled", + "doc": "The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS.\nManaged disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.", + "type": { + "$id": "1385", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalCapabilities.ultraSSDEnabled", + "serializationOptions": { + "$id": "1386", + "json": { + "$id": "1387", + "name": "ultraSSDEnabled" + } + } + }, + { + "$id": "1388", + "kind": "property", + "name": "isHibernationEnabled", + "serializedName": "hibernationEnabled", + "doc": "The flag that enables or disables hibernation capability on the VM.", + "type": { + "$id": "1389", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalCapabilities.hibernationEnabled", + "serializationOptions": { + "$id": "1390", + "json": { + "$id": "1391", + "name": "hibernationEnabled" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile.additionalVirtualMachineCapabilities", + "serializationOptions": { + "$id": "1392", + "json": { + "$id": "1393", + "name": "additionalVirtualMachineCapabilities" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.computeProfile", + "serializationOptions": { + "$id": "1394", + "json": { + "$id": "1395", + "name": "computeProfile" + } + } + }, + { + "$id": "1396", + "kind": "property", + "name": "CreatedOn", + "serializedName": "timeCreated", + "doc": "Specifies the time at which the Compute Fleet is created.", + "type": { + "$id": "1397", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1398", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.timeCreated", + "serializationOptions": { + "$id": "1399", + "json": { + "$id": "1400", + "name": "timeCreated" + } + } + }, + { + "$id": "1401", + "kind": "property", + "name": "uniqueId", + "serializedName": "uniqueId", + "doc": "Specifies the ID which uniquely identifies a Compute Fleet.", + "type": { + "$id": "1402", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.uniqueId", + "serializationOptions": { + "$id": "1403", + "json": { + "$id": "1404", + "name": "uniqueId" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet.properties", + "serializationOptions": { + "$id": "1405", + "json": { + "$id": "1406", + "name": "properties" + } + } + }, + { + "$id": "1407", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "Zones in which the Compute Fleet is available", + "type": { + "$id": "1408", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet.zones", + "serializationOptions": { + "$id": "1410", + "json": { + "$id": "1411", + "name": "zones" + } + } + }, + { + "$id": "1412", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$id": "1413", + "kind": "model", + "name": "ManagedServiceIdentity", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Managed service identity (system assigned and/or user assigned identities)", + "decorators": [], + "properties": [ + { + "$id": "1414", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "1415", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1416", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.principalId", + "serializationOptions": { + "$id": "1417", + "json": { + "$id": "1418", + "name": "principalId" + } + } + }, + { + "$id": "1419", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "1420", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1421", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.tenantId", + "serializationOptions": { + "$id": "1422", + "json": { + "$id": "1423", + "name": "tenantId" + } + } + }, + { + "$id": "1424", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "306" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.type", + "serializationOptions": { + "$id": "1425", + "json": { + "$id": "1426", + "name": "type" + } + } + }, + { + "$id": "1427", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "1428", + "kind": "dict", + "keyType": { + "$id": "1429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1430", + "kind": "nullable", + "type": { + "$id": "1431", + "kind": "model", + "name": "UserAssignedIdentity", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "User assigned identity properties", + "decorators": [], + "properties": [ + { + "$id": "1432", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client ID of the assigned identity.", + "type": { + "$id": "1433", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1434", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.clientId", + "serializationOptions": { + "$id": "1435", + "json": { + "$id": "1436", + "name": "clientId" + } + } + }, + { + "$id": "1437", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal ID of the assigned identity.", + "type": { + "$id": "1438", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1439", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.principalId", + "serializationOptions": { + "$id": "1440", + "json": { + "$id": "1441", + "name": "principalId" + } + } + } + ] + }, + "namespace": "" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "1442", + "json": { + "$id": "1443", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet.identity", + "serializationOptions": { + "$id": "1444", + "json": { + "$id": "1445", + "name": "identity" + } + } + }, + { + "$id": "1446", + "kind": "property", + "name": "plan", + "serializedName": "plan", + "doc": "Details of the resource plan.", + "type": { + "$id": "1447", + "kind": "model", + "name": "Plan", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Plan for the resource.", + "decorators": [], + "properties": [ + { + "$id": "1448", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "A user defined name of the 3rd Party Artifact that is being procured.", + "type": { + "$id": "1449", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.name", + "serializationOptions": { + "$id": "1450", + "json": { + "$id": "1451", + "name": "name" + } + } + }, + { + "$id": "1452", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + "type": { + "$id": "1453", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.publisher", + "serializationOptions": { + "$id": "1454", + "json": { + "$id": "1455", + "name": "publisher" + } + } + }, + { + "$id": "1456", + "kind": "property", + "name": "product", + "serializedName": "product", + "doc": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding.", + "type": { + "$id": "1457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.product", + "serializationOptions": { + "$id": "1458", + "json": { + "$id": "1459", + "name": "product" + } + } + }, + { + "$id": "1460", + "kind": "property", + "name": "promotionCode", + "serializedName": "promotionCode", + "doc": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + "type": { + "$id": "1461", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.promotionCode", + "serializationOptions": { + "$id": "1462", + "json": { + "$id": "1463", + "name": "promotionCode" + } + } + }, + { + "$id": "1464", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "The version of the desired product/artifact.", + "type": { + "$id": "1465", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.version", + "serializationOptions": { + "$id": "1466", + "json": { + "$id": "1467", + "name": "version" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet.plan", + "serializationOptions": { + "$id": "1468", + "json": { + "$id": "1469", + "name": "plan" + } + } + } + ] + }, + { + "$ref": "406" + }, + { + "$ref": "411" + }, + { + "$ref": "437" + }, + { + "$ref": "453" + }, + { + "$ref": "465" + }, + { + "$ref": "467" + }, + { + "$ref": "479" + }, + { + "$ref": "555" + }, + { + "$ref": "558" + }, + { + "$ref": "565" + }, + { + "$ref": "567" + }, + { + "$ref": "585" + }, + { + "$ref": "600" + }, + { + "$ref": "619" + }, + { + "$ref": "631" + }, + { + "$ref": "644" + }, + { + "$ref": "647" + }, + { + "$ref": "666" + }, + { + "$ref": "672" + }, + { + "$ref": "675" + }, + { + "$ref": "693" + }, + { + "$ref": "701" + }, + { + "$ref": "721" + }, + { + "$ref": "723" + }, + { + "$ref": "733" + }, + { + "$ref": "757" + }, + { + "$ref": "759" + }, + { + "$ref": "796" + }, + { + "$ref": "812" + }, + { + "$ref": "829" + }, + { + "$ref": "842" + }, + { + "$ref": "847" + }, + { + "$ref": "856" + }, + { + "$ref": "874" + }, + { + "$ref": "919" + }, + { + "$ref": "921" + }, + { + "$ref": "931" + }, + { + "$ref": "937" + }, + { + "$ref": "958" + }, + { + "$ref": "968" + }, + { + "$ref": "974" + }, + { + "$ref": "983" + }, + { + "$ref": "989" + }, + { + "$ref": "995" + }, + { + "$ref": "1007" + }, + { + "$ref": "1030" + }, + { + "$ref": "1087" + }, + { + "$ref": "1089" + }, + { + "$ref": "1108" + }, + { + "$ref": "1117" + }, + { + "$ref": "1134" + }, + { + "$ref": "1136" + }, + { + "$ref": "1150" + }, + { + "$ref": "1153" + }, + { + "$ref": "1168" + }, + { + "$ref": "1219" + }, + { + "$ref": "1244" + }, + { + "$ref": "1246" + }, + { + "$ref": "1258" + }, + { + "$ref": "1276" + }, + { + "$ref": "1283" + }, + { + "$ref": "1286" + }, + { + "$ref": "1317" + }, + { + "$ref": "1319" + }, + { + "$ref": "1333" + }, + { + "$ref": "1342" + }, + { + "$ref": "1370" + }, + { + "$ref": "1383" + }, + { + "$ref": "1413" + }, + { + "$ref": "1431" + }, + { + "$ref": "1447" + }, + { + "$ref": "351" + }, + { + "$ref": "352" + }, + { + "$ref": "368" + }, + { + "$id": "1470", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Error,Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "1471", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "1472", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "1473", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "1474", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", + "serializationOptions": { + "$id": "1475", + "json": { + "$id": "1476", + "name": "code" + } + } + }, + { + "$id": "1477", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "1478", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", + "serializationOptions": { + "$id": "1479", + "json": { + "$id": "1480", + "name": "message" + } + } + }, + { + "$id": "1481", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "1482", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", + "serializationOptions": { + "$id": "1483", + "json": { + "$id": "1484", + "name": "target" + } + } + }, + { + "$id": "1485", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "1486", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "1472" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "1487", + "json": { + "$id": "1488", + "name": "details" + } + } + }, + { + "$id": "1489", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "1490", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "1491", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "1492", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "1493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", + "serializationOptions": { + "$id": "1494", + "json": { + "$id": "1495", + "name": "type" + } + } + }, + { + "$id": "1496", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "1497", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Json,Exception,LroPolling", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", + "serializationOptions": { + "$id": "1498", + "json": { + "$id": "1499", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "1500", + "json": { + "$id": "1501", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "1502", + "json": { + "$id": "1503", + "name": "error" + } + } + } + ] + }, + { + "$ref": "1472" + }, + { + "$ref": "1491" + }, + { + "$ref": "1497" + }, + { + "$id": "1504", + "kind": "model", + "name": "FleetUpdate", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate", + "usage": "Input,Json", + "doc": "Fleet Update Model", + "decorators": [], + "properties": [ + { + "$id": "1505", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "1506", + "kind": "dict", + "keyType": { + "$id": "1507", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1508", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.tags", + "serializationOptions": { + "$id": "1509", + "json": { + "$id": "1510", + "name": "tags" + } + } + }, + { + "$id": "1511", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "Updatable managed service identity", + "type": { + "$id": "1512", + "kind": "model", + "name": "ManagedServiceIdentityUpdate", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ManagedServiceIdentityUpdate", + "usage": "Input,Json", + "doc": "The template for adding optional properties.", + "decorators": [], + "properties": [ + { + "$id": "1513", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "306" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ManagedServiceIdentityUpdate.type", + "serializationOptions": { + "$id": "1514", + "json": { + "$id": "1515", + "name": "type" + } + } + }, + { + "$id": "1516", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "1517", + "kind": "dict", + "keyType": { + "$id": "1518", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "1430" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ManagedServiceIdentityUpdate.userAssignedIdentities", + "serializationOptions": { + "$id": "1519", + "json": { + "$id": "1520", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.identity", + "serializationOptions": { + "$id": "1521", + "json": { + "$id": "1522", + "name": "identity" + } + } + }, + { + "$id": "1523", + "kind": "property", + "name": "plan", + "serializedName": "plan", + "doc": "Updatable resource plan", + "type": { + "$id": "1524", + "kind": "model", + "name": "ResourcePlanUpdate", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate", + "usage": "Input,Json", + "doc": "The template for adding optional properties.", + "decorators": [], + "properties": [ + { + "$id": "1525", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "A user defined name of the 3rd Party Artifact that is being procured.", + "type": { + "$id": "1526", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.name", + "serializationOptions": { + "$id": "1527", + "json": { + "$id": "1528", + "name": "name" + } + } + }, + { + "$id": "1529", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + "type": { + "$id": "1530", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.publisher", + "serializationOptions": { + "$id": "1531", + "json": { + "$id": "1532", + "name": "publisher" + } + } + }, + { + "$id": "1533", + "kind": "property", + "name": "product", + "serializedName": "product", + "doc": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding.", + "type": { + "$id": "1534", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.product", + "serializationOptions": { + "$id": "1535", + "json": { + "$id": "1536", + "name": "product" + } + } + }, + { + "$id": "1537", + "kind": "property", + "name": "promotionCode", + "serializedName": "promotionCode", + "doc": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + "type": { + "$id": "1538", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.promotionCode", + "serializationOptions": { + "$id": "1539", + "json": { + "$id": "1540", + "name": "promotionCode" + } + } + }, + { + "$id": "1541", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "The version of the desired product/artifact.", + "type": { + "$id": "1542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.version", + "serializationOptions": { + "$id": "1543", + "json": { + "$id": "1544", + "name": "version" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.plan", + "serializationOptions": { + "$id": "1545", + "json": { + "$id": "1546", + "name": "plan" + } + } + }, + { + "$id": "1547", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "RP-specific updatable properties", + "type": { + "$ref": "406" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.properties", + "serializationOptions": { + "$id": "1548", + "json": { + "$id": "1549", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "1512" + }, + { + "$ref": "1524" + }, + { + "$id": "1550", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "1551", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "326" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "1552", + "json": { + "$id": "1553", + "name": "status" + } + } + }, + { + "$id": "1554", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "1555", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "1556", + "json": { + "$id": "1557", + "name": "name" + } + } + }, + { + "$id": "1558", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "1559", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1560", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", + "serializationOptions": { + "$id": "1561", + "json": { + "$id": "1562", + "name": "startTime" + } + } + }, + { + "$id": "1563", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "1564", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1565", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", + "serializationOptions": { + "$id": "1566", + "json": { + "$id": "1567", + "name": "endTime" + } + } + }, + { + "$id": "1568", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "1569", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "1570", + "json": { + "$id": "1571", + "name": "percentComplete" + } + } + }, + { + "$id": "1572", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "1472" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "1573", + "json": { + "$id": "1574", + "name": "error" + } + } + } + ] + }, + { + "$id": "1575", + "kind": "model", + "name": "FleetListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a Fleet list operation.", + "decorators": [], + "properties": [ + { + "$id": "1576", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Fleet items on this page", + "type": { + "$id": "1577", + "kind": "array", + "name": "ArrayFleet", + "valueType": { + "$ref": "350" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1578", + "json": { + "$id": "1579", + "name": "value" + } + } + }, + { + "$id": "1580", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1581", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1582", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "1583", + "json": { + "$id": "1584", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1585", + "kind": "model", + "name": "VirtualMachineScaleSetListResult", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetListResult", + "usage": "Output,Json", + "doc": "The response of a VirtualMachineScaleSet list operation.", + "decorators": [], + "properties": [ + { + "$id": "1586", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The VirtualMachineScaleSet items on this page", + "type": { + "$id": "1587", + "kind": "array", + "name": "ArrayVirtualMachineScaleSet", + "valueType": { + "$id": "1588", + "kind": "model", + "name": "ComputeFleetVmss", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet", + "usage": "Output,Json", + "doc": "An AzureFleet's virtualMachineScaleSet", + "decorators": [], + "properties": [ + { + "$id": "1589", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The compute RP resource id of the virtualMachineScaleSet \n\"subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}\"", + "type": { + "$id": "1590", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1591", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.id", + "serializationOptions": { + "$id": "1592", + "json": { + "$id": "1593", + "name": "id" + } + } + }, + { + "$id": "1594", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Type of the virtualMachineScaleSet", + "type": { + "$id": "1595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.type", + "serializationOptions": { + "$id": "1596", + "json": { + "$id": "1597", + "name": "type" + } + } + }, + { + "$id": "1598", + "kind": "property", + "name": "operationStatus", + "serializedName": "operationStatus", + "doc": "This represents the operationStatus of the VMSS in response to the last operation that was performed on it by Azure Fleet resource.", + "type": { + "$ref": "2" + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.operationStatus", + "serializationOptions": { + "$id": "1599", + "json": { + "$id": "1600", + "name": "operationStatus" + } + } + }, + { + "$id": "1601", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Error Information when `operationStatus` is `Failed`", + "type": { + "$id": "1602", + "kind": "model", + "name": "ComputeFleetApiError", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError", + "usage": "Output,Json", + "doc": "ApiError for Fleet", + "decorators": [], + "properties": [ + { + "$id": "1603", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "1604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.code", + "serializationOptions": { + "$id": "1605", + "json": { + "$id": "1606", + "name": "code" + } + } + }, + { + "$id": "1607", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The target of the particular error.", + "type": { + "$id": "1608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.target", + "serializationOptions": { + "$id": "1609", + "json": { + "$id": "1610", + "name": "target" + } + } + }, + { + "$id": "1611", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "1612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.message", + "serializationOptions": { + "$id": "1613", + "json": { + "$id": "1614", + "name": "message" + } + } + }, + { + "$id": "1615", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The API error details", + "type": { + "$id": "1616", + "kind": "array", + "name": "ArrayApiErrorBase", + "valueType": { + "$id": "1617", + "kind": "model", + "name": "ComputeFleetApiErrorInfo", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase", + "usage": "Output,Json", + "doc": "API error base.", + "decorators": [], + "properties": [ + { + "$id": "1618", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "1619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase.code", + "serializationOptions": { + "$id": "1620", + "json": { + "$id": "1621", + "name": "code" + } + } + }, + { + "$id": "1622", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The target of the particular error.", + "type": { + "$id": "1623", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase.target", + "serializationOptions": { + "$id": "1624", + "json": { + "$id": "1625", + "name": "target" + } + } + }, + { + "$id": "1626", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "1627", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase.message", + "serializationOptions": { + "$id": "1628", + "json": { + "$id": "1629", + "name": "message" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.details", + "serializationOptions": { + "$id": "1630", + "json": { + "$id": "1631", + "name": "details" + } + } + }, + { + "$id": "1632", + "kind": "property", + "name": "innererror", + "serializedName": "innererror", + "doc": "The API inner error", + "type": { + "$id": "1633", + "kind": "model", + "name": "ComputeFleetInnerError", + "namespace": "Microsoft.AzureFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.InnerError", + "usage": "Output,Json", + "doc": "Inner error details.", + "decorators": [], + "properties": [ + { + "$id": "1634", + "kind": "property", + "name": "exceptionType", + "serializedName": "exceptionType", + "doc": "The exception type.", + "type": { + "$id": "1635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.InnerError.exceptionType", + "serializationOptions": { + "$id": "1636", + "json": { + "$id": "1637", + "name": "exceptionType" + } + } + }, + { + "$id": "1638", + "kind": "property", + "name": "errorDetail", + "serializedName": "errorDetail", + "doc": "The internal error message or exception dump.", + "type": { + "$id": "1639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.InnerError.errorDetail", + "serializationOptions": { + "$id": "1640", + "json": { + "$id": "1641", + "name": "errorDetail" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.innererror", + "serializationOptions": { + "$id": "1642", + "json": { + "$id": "1643", + "name": "innererror" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.error", + "serializationOptions": { + "$id": "1644", + "json": { + "$id": "1645", + "name": "error" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetListResult.value", + "serializationOptions": { + "$id": "1646", + "json": { + "$id": "1647", + "name": "value" + } + } + }, + { + "$id": "1648", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1649", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetListResult.nextLink", + "serializationOptions": { + "$id": "1650", + "json": { + "$id": "1651", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "1588" + }, + { + "$ref": "1602" + }, + { + "$ref": "1617" + }, + { + "$ref": "1633" + }, + { + "$id": "1652", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult", + "usage": "Output,Json", + "doc": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "decorators": [], + "properties": [ + { + "$id": "1653", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "1654", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "1655", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation", + "usage": "Output,Json", + "doc": "Details of a REST API operation, returned from the Resource Provider Operations API", + "decorators": [], + "properties": [ + { + "$id": "1656", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": { + "$id": "1657", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name", + "serializationOptions": { + "$id": "1658", + "json": { + "$id": "1659", + "name": "name" + } + } + }, + { + "$id": "1660", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.", + "type": { + "$id": "1661", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction", + "serializationOptions": { + "$id": "1662", + "json": { + "$id": "1663", + "name": "isDataAction" + } + } + }, + { + "$id": "1664", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "1665", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "1666", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": { + "$id": "1667", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider", + "serializationOptions": { + "$id": "1668", + "json": { + "$id": "1669", + "name": "provider" + } + } + }, + { + "$id": "1670", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": { + "$id": "1671", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource", + "serializationOptions": { + "$id": "1672", + "json": { + "$id": "1673", + "name": "resource" + } + } + }, + { + "$id": "1674", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": { + "$id": "1675", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation", + "serializationOptions": { + "$id": "1676", + "json": { + "$id": "1677", + "name": "operation" + } + } + }, + { + "$id": "1678", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "1679", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description", + "serializationOptions": { + "$id": "1680", + "json": { + "$id": "1681", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "1682", + "json": { + "$id": "1683", + "name": "display" + } + } + }, + { + "$id": "1684", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": { + "$ref": "334" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin", + "serializationOptions": { + "$id": "1685", + "json": { + "$id": "1686", + "name": "origin" + } + } + }, + { + "$id": "1687", + "kind": "property", + "name": "actionType", + "serializedName": "actionType", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": { + "$ref": "342" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType", + "serializationOptions": { + "$id": "1688", + "json": { + "$id": "1689", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "1690", + "json": { + "$id": "1691", + "name": "value" + } + } + }, + { + "$id": "1692", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1693", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1694", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.nextLink", + "serializationOptions": { + "$id": "1695", + "json": { + "$id": "1696", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "1655" + }, + { + "$ref": "1665" + } + ], + "Clients": [ + { + "$id": "1697", + "Name": "AzureFleetClient", + "Namespace": "Microsoft.AzureFleet", + "Operations": [], + "Protocol": { + "$id": "1698" + }, + "Parameters": [ + { + "$id": "1699", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "1700", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "1701", + "Type": { + "$id": "1702", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.AzureFleet" + }, + { + "$id": "1703", + "Name": "Operations", + "Namespace": "Microsoft.AzureFleet", + "Operations": [ + { + "$id": "1704", + "Name": "list", + "ResourceName": "Operations", + "Doc": "List the operations for the provider", + "Accessibility": "internal", + "Parameters": [ + { + "$id": "1705", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1707", + "Type": { + "$id": "1708", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1709", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1710", + "kind": "constant", + "valueType": { + "$id": "1711", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1712", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1652" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/providers/Microsoft.AzureFleet/operations", + "BufferResponse": true, + "Paging": { + "$id": "1713", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "1714", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "Decorators": [], + "Examples": [ + { + "$id": "1715", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2024-11-01/Operations_List.json", + "parameters": [ + { + "$id": "1716", + "parameter": { + "$ref": "1705" + }, + "value": { + "$id": "1717", + "kind": "string", + "type": { + "$ref": "1706" + }, + "value": "2024-11-01" + } + } + ], + "responses": [ + { + "$id": "1718", + "response": { + "$ref": "1712" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1719", + "kind": "model", + "type": { + "$ref": "1652" + }, + "value": { + "$id": "1720", + "value": { + "$id": "1721", + "kind": "array", + "type": { + "$ref": "1654" + }, + "value": [ + { + "$id": "1722", + "kind": "model", + "type": { + "$ref": "1655" + }, + "value": { + "$id": "1723", + "origin": { + "$id": "1724", + "kind": "string", + "type": { + "$ref": "334" + }, + "value": "user,system" + }, + "name": { + "$id": "1725", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "Microsoft.AzureFleet/fleets/read" + }, + "isDataAction": { + "$id": "1726", + "kind": "boolean", + "type": { + "$ref": "1661" + }, + "value": false + }, + "display": { + "$id": "1727", + "kind": "model", + "type": { + "$ref": "1665" + }, + "value": { + "$id": "1728", + "provider": { + "$id": "1729", + "kind": "string", + "type": { + "$ref": "1667" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1730", + "kind": "string", + "type": { + "$ref": "1671" + }, + "value": "Fleets" + }, + "operation": { + "$id": "1731", + "kind": "string", + "type": { + "$ref": "1675" + }, + "value": "Get Azure Fleet" + }, + "description": { + "$id": "1732", + "kind": "string", + "type": { + "$ref": "1679" + }, + "value": "Get properties of Azure Fleet resource" + } + } + } + } + }, + { + "$id": "1733", + "kind": "model", + "type": { + "$ref": "1655" + }, + "value": { + "$id": "1734", + "origin": { + "$id": "1735", + "kind": "string", + "type": { + "$ref": "334" + }, + "value": "user,system" + }, + "name": { + "$id": "1736", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "Microsoft.AzureFleet/fleets/write" + }, + "isDataAction": { + "$id": "1737", + "kind": "boolean", + "type": { + "$ref": "1661" + }, + "value": false + }, + "display": { + "$id": "1738", + "kind": "model", + "type": { + "$ref": "1665" + }, + "value": { + "$id": "1739", + "provider": { + "$id": "1740", + "kind": "string", + "type": { + "$ref": "1667" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1741", + "kind": "string", + "type": { + "$ref": "1671" + }, + "value": "Fleets" + }, + "operation": { + "$id": "1742", + "kind": "string", + "type": { + "$ref": "1675" + }, + "value": "Create or Update Azure Fleet" + }, + "description": { + "$id": "1743", + "kind": "string", + "type": { + "$ref": "1679" + }, + "value": "Creates a new Azure Fleet resource or updates an existing one" + } + } + } + } + }, + { + "$id": "1744", + "kind": "model", + "type": { + "$ref": "1655" + }, + "value": { + "$id": "1745", + "origin": { + "$id": "1746", + "kind": "string", + "type": { + "$ref": "334" + }, + "value": "user,system" + }, + "name": { + "$id": "1747", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "Microsoft.AzureFleet/fleets/delete" + }, + "isDataAction": { + "$id": "1748", + "kind": "boolean", + "type": { + "$ref": "1661" + }, + "value": false + }, + "display": { + "$id": "1749", + "kind": "model", + "type": { + "$ref": "1665" + }, + "value": { + "$id": "1750", + "provider": { + "$id": "1751", + "kind": "string", + "type": { + "$ref": "1667" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1752", + "kind": "string", + "type": { + "$ref": "1671" + }, + "value": "Fleets" + }, + "operation": { + "$id": "1753", + "kind": "string", + "type": { + "$ref": "1675" + }, + "value": "Delete Virtual Machine and Virtual Machine scale sets in a Azure Fleet resource" + }, + "description": { + "$id": "1754", + "kind": "string", + "type": { + "$ref": "1679" + }, + "value": "Deletes all compute resources of Azure Fleet resource" + } + } + } + } + }, + { + "$id": "1755", + "kind": "model", + "type": { + "$ref": "1655" + }, + "value": { + "$id": "1756", + "origin": { + "$id": "1757", + "kind": "string", + "type": { + "$ref": "334" + }, + "value": "user,system" + }, + "name": { + "$id": "1758", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "Microsoft.AzureFleet/register/action" + }, + "isDataAction": { + "$id": "1759", + "kind": "boolean", + "type": { + "$ref": "1661" + }, + "value": false + }, + "display": { + "$id": "1760", + "kind": "model", + "type": { + "$ref": "1665" + }, + "value": { + "$id": "1761", + "provider": { + "$id": "1762", + "kind": "string", + "type": { + "$ref": "1667" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1763", + "kind": "string", + "type": { + "$ref": "1671" + }, + "value": "Subscription" + }, + "operation": { + "$id": "1764", + "kind": "string", + "type": { + "$ref": "1675" + }, + "value": "Register subscription for Microsoft.AzureFleet" + }, + "description": { + "$id": "1765", + "kind": "string", + "type": { + "$ref": "1679" + }, + "value": "Registers Subscription with Microsoft.AzureFleet resource provider" + } + } + } + } + }, + { + "$id": "1766", + "kind": "model", + "type": { + "$ref": "1655" + }, + "value": { + "$id": "1767", + "origin": { + "$id": "1768", + "kind": "string", + "type": { + "$ref": "334" + }, + "value": "user,system" + }, + "name": { + "$id": "1769", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "Microsoft.AzureFleet/unregister/action" + }, + "isDataAction": { + "$id": "1770", + "kind": "boolean", + "type": { + "$ref": "1661" + }, + "value": false + }, + "display": { + "$id": "1771", + "kind": "model", + "type": { + "$ref": "1665" + }, + "value": { + "$id": "1772", + "provider": { + "$id": "1773", + "kind": "string", + "type": { + "$ref": "1667" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1774", + "kind": "string", + "type": { + "$ref": "1671" + }, + "value": "Subscription" + }, + "operation": { + "$id": "1775", + "kind": "string", + "type": { + "$ref": "1675" + }, + "value": "Unregister Subscription for Microsoft.AzureFleet" + }, + "description": { + "$id": "1776", + "kind": "string", + "type": { + "$ref": "1679" + }, + "value": "Unregisters Subscription with Microsoft.AzureFleet resource provider" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "1777" + }, + "Parent": "AzureFleetClient", + "Parameters": [ + { + "$id": "1778", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "1779", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "1780", + "Type": { + "$id": "1781", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Operations" + }, + { + "$id": "1782", + "Name": "Fleets", + "Namespace": "Microsoft.AzureFleet", + "Operations": [ + { + "$id": "1783", + "Name": "get", + "ResourceName": "Fleet", + "Doc": "Get a Fleet", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1784", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1785", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1786", + "Type": { + "$id": "1787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1788", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1789", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1791", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1792", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1793", + "Name": "fleetName", + "NameInRequest": "fleetName", + "Doc": "The name of the Compute Fleet", + "Type": { + "$id": "1794", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1795", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1796", + "kind": "constant", + "valueType": { + "$id": "1797", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1798", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "350" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.get", + "Decorators": [], + "Examples": [ + { + "$id": "1799", + "kind": "http", + "name": "Fleets_Get", + "description": "Fleets_Get", + "filePath": "2024-11-01/Fleets_Get.json", + "parameters": [ + { + "$id": "1800", + "parameter": { + "$ref": "1784" + }, + "value": { + "$id": "1801", + "kind": "string", + "type": { + "$ref": "1785" + }, + "value": "2024-11-01" + } + }, + { + "$id": "1802", + "parameter": { + "$ref": "1788" + }, + "value": { + "$id": "1803", + "kind": "string", + "type": { + "$ref": "1789" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "1804", + "parameter": { + "$ref": "1791" + }, + "value": { + "$id": "1805", + "kind": "string", + "type": { + "$ref": "1792" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "1806", + "parameter": { + "$ref": "1793" + }, + "value": { + "$id": "1807", + "kind": "string", + "type": { + "$ref": "1794" + }, + "value": "testFleet" + } + } + ], + "responses": [ + { + "$id": "1808", + "response": { + "$ref": "1798" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1809", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "1810", + "properties": { + "$id": "1811", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "1812", + "provisioningState": { + "$id": "1813", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "1814", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "1815", + "capacity": { + "$id": "1816", + "kind": "number", + "type": { + "$ref": "413" + }, + "value": 20 + }, + "minCapacity": { + "$id": "1817", + "kind": "number", + "type": { + "$ref": "417" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "1818", + "kind": "number", + "type": { + "$ref": "421" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "1819", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "1820", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "1821", + "kind": "boolean", + "type": { + "$ref": "431" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "1822", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "1823", + "capacity": { + "$id": "1824", + "kind": "number", + "type": { + "$ref": "439" + }, + "value": 20 + }, + "minCapacity": { + "$id": "1825", + "kind": "number", + "type": { + "$ref": "443" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "1826", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "1827", + "kind": "array", + "type": { + "$ref": "452" + }, + "value": [ + { + "$id": "1828", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "1829", + "name": { + "$id": "1830", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "1831", + "kind": "number", + "type": { + "$ref": "459" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "1832", + "kind": "model", + "type": { + "$ref": "1370" + }, + "value": { + "$id": "1833", + "baseVirtualMachineProfile": { + "$id": "1834", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "1835", + "osProfile": { + "$id": "1836", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "1837", + "computerNamePrefix": { + "$id": "1838", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "o" + }, + "adminUsername": { + "$id": "1839", + "kind": "string", + "type": { + "$ref": "573" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "1840", + "kind": "model", + "type": { + "$ref": "585" + }, + "value": { + "$id": "1841", + "provisionVMAgent": { + "$id": "1842", + "kind": "boolean", + "type": { + "$ref": "587" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "1843", + "kind": "boolean", + "type": { + "$ref": "591" + }, + "value": true + }, + "timeZone": { + "$id": "1844", + "kind": "string", + "type": { + "$ref": "595" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "1845", + "kind": "array", + "type": { + "$ref": "599" + }, + "value": [ + { + "$id": "1846", + "kind": "model", + "type": { + "$ref": "600" + }, + "value": { + "$id": "1847", + "passName": { + "$id": "1848", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "1849", + "kind": "string", + "type": { + "$ref": "606" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "1850", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "1851", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "$id": "1852", + "patchMode": { + "$id": "1853", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "1854", + "kind": "boolean", + "type": { + "$ref": "624" + }, + "value": true + }, + "assessmentMode": { + "$id": "1855", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1856", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "1857", + "rebootSetting": { + "$id": "1858", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1859", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "1860", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "1861", + "listeners": { + "$id": "1862", + "kind": "array", + "type": { + "$ref": "646" + }, + "value": [ + { + "$id": "1863", + "kind": "model", + "type": { + "$ref": "647" + }, + "value": { + "$id": "1864", + "protocol": { + "$id": "1865", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "1866", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1867", + "kind": "boolean", + "type": { + "$ref": "660" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "1868", + "kind": "model", + "type": { + "$ref": "666" + }, + "value": { + "$id": "1869", + "disablePasswordAuthentication": { + "$id": "1870", + "kind": "boolean", + "type": { + "$ref": "668" + }, + "value": true + }, + "ssh": { + "$id": "1871", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "1872", + "publicKeys": { + "$id": "1873", + "kind": "array", + "type": { + "$ref": "674" + }, + "value": [ + { + "$id": "1874", + "kind": "model", + "type": { + "$ref": "675" + }, + "value": { + "$id": "1875", + "path": { + "$id": "1876", + "kind": "string", + "type": { + "$ref": "677" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "1877", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "1878", + "kind": "boolean", + "type": { + "$ref": "689" + }, + "value": true + }, + "patchSettings": { + "$id": "1879", + "kind": "model", + "type": { + "$ref": "693" + }, + "value": { + "$id": "1880", + "patchMode": { + "$id": "1881", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "1882", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1883", + "kind": "model", + "type": { + "$ref": "701" + }, + "value": { + "$id": "1884", + "rebootSetting": { + "$id": "1885", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1886", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1887", + "kind": "boolean", + "type": { + "$ref": "714" + }, + "value": true + } + } + }, + "secrets": { + "$id": "1888", + "kind": "array", + "type": { + "$ref": "720" + }, + "value": [ + { + "$id": "1889", + "kind": "model", + "type": { + "$ref": "721" + }, + "value": { + "$id": "1890", + "sourceVault": { + "$id": "1891", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "1892", + "id": { + "$id": "1893", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "1894", + "kind": "array", + "type": { + "$ref": "732" + }, + "value": [ + { + "$id": "1895", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "1896", + "certificateUrl": { + "$id": "1897", + "kind": "string", + "type": { + "$ref": "735" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "1898", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "1899", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "1900", + "kind": "boolean", + "type": { + "$ref": "751" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "1901", + "kind": "model", + "type": { + "$ref": "757" + }, + "value": { + "$id": "1902", + "imageReference": { + "$id": "1903", + "kind": "model", + "type": { + "$ref": "759" + }, + "value": { + "$id": "1904", + "publisher": { + "$id": "1905", + "kind": "string", + "type": { + "$ref": "766" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "1906", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "1907", + "kind": "string", + "type": { + "$ref": "774" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "1908", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "1909", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "1910", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "1911", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "vlqe" + }, + "id": { + "$id": "1912", + "kind": "string", + "type": { + "$ref": "761" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "1913", + "kind": "model", + "type": { + "$ref": "796" + }, + "value": { + "$id": "1914", + "name": { + "$id": "1915", + "kind": "string", + "type": { + "$ref": "798" + }, + "value": "wfttw" + }, + "caching": { + "$id": "1916", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "1917", + "kind": "boolean", + "type": { + "$ref": "805" + }, + "value": true + }, + "createOption": { + "$id": "1918", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "1919", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "1920", + "option": { + "$id": "1921", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "1922", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "1923", + "kind": "number", + "type": { + "$ref": "822" + }, + "value": 14 + }, + "osType": { + "$id": "1924", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "1925", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "1926", + "uri": { + "$id": "1927", + "kind": "string", + "type": { + "$ref": "831" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "1928", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "1929", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "1930", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "1931", + "storageAccountType": { + "$id": "1932", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "1933", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "1934", + "id": { + "$id": "1935", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "1936", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "1937", + "securityEncryptionType": { + "$id": "1938", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "1939", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "1940", + "id": { + "$id": "1941", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "1942", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "1943", + "kind": "array", + "type": { + "$ref": "873" + }, + "value": [ + { + "$id": "1944", + "kind": "model", + "type": { + "$ref": "874" + }, + "value": { + "$id": "1945", + "name": { + "$id": "1946", + "kind": "string", + "type": { + "$ref": "876" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "1947", + "kind": "number", + "type": { + "$ref": "880" + }, + "value": 14 + }, + "caching": { + "$id": "1948", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "1949", + "kind": "boolean", + "type": { + "$ref": "887" + }, + "value": true + }, + "createOption": { + "$id": "1950", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "1951", + "kind": "number", + "type": { + "$ref": "894" + }, + "value": 6 + }, + "managedDisk": { + "$id": "1952", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "1953", + "storageAccountType": { + "$id": "1954", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "1955", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "1956", + "id": { + "$id": "1957", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "1958", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "1959", + "securityEncryptionType": { + "$id": "1960", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "1961", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "1962", + "id": { + "$id": "1963", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "1964", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "1965", + "kind": "number", + "type": { + "$ref": "905" + }, + "value": 2 + }, + "deleteOption": { + "$id": "1966", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "1967", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "1968", + "healthProbe": { + "$id": "1969", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "1970", + "id": { + "$id": "1971", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "1972", + "kind": "array", + "type": { + "$ref": "930" + }, + "value": [ + { + "$id": "1973", + "kind": "model", + "type": { + "$ref": "931" + }, + "value": { + "$id": "1974", + "name": { + "$id": "1975", + "kind": "string", + "type": { + "$ref": "933" + }, + "value": "i" + }, + "properties": { + "$id": "1976", + "kind": "model", + "type": { + "$ref": "937" + }, + "value": { + "$id": "1977", + "primary": { + "$id": "1978", + "kind": "boolean", + "type": { + "$ref": "939" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "1979", + "kind": "boolean", + "type": { + "$ref": "943" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "1980", + "kind": "boolean", + "type": { + "$ref": "947" + }, + "value": true + }, + "enableFpga": { + "$id": "1981", + "kind": "boolean", + "type": { + "$ref": "951" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "1982", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "1983", + "id": { + "$id": "1984", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "1985", + "kind": "model", + "type": { + "$ref": "958" + }, + "value": { + "$id": "1986", + "dnsServers": { + "$id": "1987", + "kind": "array", + "type": { + "$ref": "960" + }, + "value": [ + { + "$id": "1988", + "kind": "string", + "type": { + "$ref": "961" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "1989", + "kind": "array", + "type": { + "$ref": "967" + }, + "value": [ + { + "$id": "1990", + "kind": "model", + "type": { + "$ref": "968" + }, + "value": { + "$id": "1991", + "name": { + "$id": "1992", + "kind": "string", + "type": { + "$ref": "970" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "1993", + "kind": "model", + "type": { + "$ref": "974" + }, + "value": { + "$id": "1994", + "subnet": { + "$id": "1995", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "1996", + "id": { + "$id": "1997", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "1998", + "kind": "boolean", + "type": { + "$ref": "979" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "1999", + "kind": "model", + "type": { + "$ref": "983" + }, + "value": { + "$id": "2000", + "name": { + "$id": "2001", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "2002", + "kind": "model", + "type": { + "$ref": "989" + }, + "value": { + "$id": "2003", + "idleTimeoutInMinutes": { + "$id": "2004", + "kind": "number", + "type": { + "$ref": "991" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "2005", + "kind": "model", + "type": { + "$ref": "995" + }, + "value": { + "$id": "2006", + "domainNameLabel": { + "$id": "2007", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "2008", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "2009", + "kind": "array", + "type": { + "$ref": "1006" + }, + "value": [ + { + "$id": "2010", + "kind": "model", + "type": { + "$ref": "1007" + }, + "value": { + "$id": "2011", + "ipTagType": { + "$id": "2012", + "kind": "string", + "type": { + "$ref": "1009" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "2013", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "2014", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2015", + "id": { + "$id": "2016", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "2017", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "2018", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "2019", + "kind": "model", + "type": { + "$ref": "1030" + }, + "value": { + "$id": "2020", + "name": { + "$id": "2021", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "2022", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "2023", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "2024", + "kind": "array", + "type": { + "$ref": "1045" + }, + "value": [ + { + "$id": "2025", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2026", + "id": { + "$id": "2027", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "2028", + "kind": "array", + "type": { + "$ref": "1049" + }, + "value": [ + { + "$id": "2029", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2030", + "id": { + "$id": "2031", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "2032", + "kind": "array", + "type": { + "$ref": "1053" + }, + "value": [ + { + "$id": "2033", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2034", + "id": { + "$id": "2035", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "2036", + "kind": "array", + "type": { + "$ref": "1057" + }, + "value": [ + { + "$id": "2037", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2038", + "id": { + "$id": "2039", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2040", + "kind": "boolean", + "type": { + "$ref": "1065" + }, + "value": true + }, + "deleteOption": { + "$id": "2041", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "2042", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "2043", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "2044", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "2045", + "kind": "model", + "type": { + "$ref": "1087" + }, + "value": { + "$id": "2046", + "uefiSettings": { + "$id": "2047", + "kind": "model", + "type": { + "$ref": "1089" + }, + "value": { + "$id": "2048", + "secureBootEnabled": { + "$id": "2049", + "kind": "boolean", + "type": { + "$ref": "1091" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "2050", + "kind": "boolean", + "type": { + "$ref": "1095" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "2051", + "kind": "boolean", + "type": { + "$ref": "1101" + }, + "value": true + }, + "securityType": { + "$id": "2052", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "2053", + "kind": "model", + "type": { + "$ref": "1108" + }, + "value": { + "$id": "2054", + "userAssignedIdentityResourceId": { + "$id": "2055", + "kind": "string", + "type": { + "$ref": "1110" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "2056", + "kind": "model", + "type": { + "$ref": "1117" + }, + "value": { + "$id": "2057", + "enabled": { + "$id": "2058", + "kind": "boolean", + "type": { + "$ref": "1119" + }, + "value": true + }, + "mode": { + "$id": "2059", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "2060", + "kind": "number", + "type": { + "$ref": "1126" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "2061", + "kind": "model", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "2062", + "bootDiagnostics": { + "$id": "2063", + "kind": "model", + "type": { + "$ref": "1136" + }, + "value": { + "$id": "2064", + "enabled": { + "$id": "2065", + "kind": "boolean", + "type": { + "$ref": "1138" + }, + "value": true + }, + "storageUri": { + "$id": "2066", + "kind": "string", + "type": { + "$ref": "1142" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "2067", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "2068", + "extensions": { + "$id": "2069", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "2070", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "2071", + "name": { + "$id": "2072", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "2073", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "cmeam" + }, + "properties": { + "$id": "2074", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "2075", + "forceUpdateTag": { + "$id": "2076", + "kind": "string", + "type": { + "$ref": "1170" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "2077", + "kind": "string", + "type": { + "$ref": "1174" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "2078", + "kind": "string", + "type": { + "$ref": "1178" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "2079", + "kind": "string", + "type": { + "$ref": "1182" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "2080", + "kind": "boolean", + "type": { + "$ref": "1186" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2081", + "kind": "boolean", + "type": { + "$ref": "1190" + }, + "value": true + }, + "settings": { + "$id": "2082", + "kind": "dict", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "2083" + } + }, + "provisioningState": { + "$id": "2084", + "kind": "string", + "type": { + "$ref": "1206" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "2085", + "kind": "array", + "type": { + "$ref": "1210" + }, + "value": [ + { + "$id": "2086", + "kind": "string", + "type": { + "$ref": "1211" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "2087", + "kind": "boolean", + "type": { + "$ref": "1215" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "2088", + "kind": "model", + "type": { + "$ref": "1219" + }, + "value": { + "$id": "2089", + "secretUrl": { + "$id": "2090", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "2091", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2092", + "id": { + "$id": "2093", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "2094", + "kind": "string", + "type": { + "$ref": "1155" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "2095", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "2096", + "kind": "string", + "type": { + "$ref": "1240" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "2097", + "kind": "model", + "type": { + "$ref": "1244" + }, + "value": { + "$id": "2098", + "terminateNotificationProfile": { + "$id": "2099", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "2100", + "notBeforeTimeout": { + "$id": "2101", + "kind": "string", + "type": { + "$ref": "1248" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "2102", + "kind": "boolean", + "type": { + "$ref": "1252" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "2103", + "kind": "model", + "type": { + "$ref": "1258" + }, + "value": { + "$id": "2104", + "notBeforeTimeout": { + "$id": "2105", + "kind": "string", + "type": { + "$ref": "1260" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "2106", + "kind": "boolean", + "type": { + "$ref": "1264" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "2107", + "kind": "string", + "type": { + "$ref": "1272" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "2108", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "2109", + "capacityReservationGroup": { + "$id": "2110", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2111", + "id": { + "$id": "2112", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "2113", + "kind": "model", + "type": { + "$ref": "1283" + }, + "value": { + "$id": "2114", + "galleryApplications": { + "$id": "2115", + "kind": "array", + "type": { + "$ref": "1285" + }, + "value": [ + { + "$id": "2116", + "kind": "model", + "type": { + "$ref": "1286" + }, + "value": { + "$id": "2117", + "tags": { + "$id": "2118", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "2119", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "2120", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "2121", + "kind": "boolean", + "type": { + "$ref": "1305" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2122", + "kind": "boolean", + "type": { + "$ref": "1309" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "2123", + "kind": "model", + "type": { + "$ref": "1317" + }, + "value": { + "$id": "2124", + "vmSizeProperties": { + "$id": "2125", + "kind": "model", + "type": { + "$ref": "1319" + }, + "value": { + "$id": "2126", + "vCPUsAvailable": { + "$id": "2127", + "kind": "number", + "type": { + "$ref": "1321" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "2128", + "kind": "number", + "type": { + "$ref": "1325" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "2129", + "kind": "model", + "type": { + "$ref": "1333" + }, + "value": { + "$id": "2130", + "id": { + "$id": "2131", + "kind": "string", + "type": { + "$ref": "1335" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "2132", + "kind": "model", + "type": { + "$ref": "1342" + }, + "value": { + "$id": "2133", + "id": { + "$id": "2134", + "kind": "string", + "type": { + "$ref": "1344" + }, + "value": "mubredelfbshboaxrsxiajihahaa" + }, + "excludeExtensions": { + "$id": "2135", + "kind": "array", + "type": { + "$ref": "1348" + }, + "value": [ + { + "$id": "2136", + "kind": "string", + "type": { + "$ref": "1349" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "2137", + "kind": "boolean", + "type": { + "$ref": "1353" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "2138", + "kind": "string", + "type": { + "$ref": "1359" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "2139", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "2140", + "kind": "number", + "type": { + "$ref": "1379" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "2141", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "2142", + "kind": "string", + "type": { + "$ref": "1402" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "2143", + "kind": "array", + "type": { + "$ref": "1408" + }, + "value": [ + { + "$id": "2144", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zone1" + }, + { + "$id": "2145", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "2146", + "kind": "model", + "type": { + "$ref": "1413" + }, + "value": { + "$id": "2147", + "principalId": { + "$id": "2148", + "kind": "string", + "type": { + "$ref": "1415" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "2149", + "kind": "string", + "type": { + "$ref": "1420" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "2150", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "2151", + "kind": "dict", + "type": { + "$ref": "1428" + }, + "value": { + "$id": "2152", + "key9851": { + "$id": "2153", + "kind": "model", + "type": { + "$ref": "1431" + }, + "value": { + "$id": "2154", + "principalId": { + "$id": "2155", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "2156", + "kind": "string", + "type": { + "$ref": "1433" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "tags": { + "$id": "2157", + "kind": "dict", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2158", + "key3518": { + "$id": "2159", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "plan": { + "$id": "2160", + "kind": "model", + "type": { + "$ref": "1447" + }, + "value": { + "$id": "2161", + "name": { + "$id": "2162", + "kind": "string", + "type": { + "$ref": "1449" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "2163", + "kind": "string", + "type": { + "$ref": "1453" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "2164", + "kind": "string", + "type": { + "$ref": "1457" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "2165", + "kind": "string", + "type": { + "$ref": "1461" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "2166", + "kind": "string", + "type": { + "$ref": "1465" + }, + "value": "wa" + } + } + }, + "location": { + "$id": "2167", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "westus" + }, + "id": { + "$id": "2168", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "2169", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "testFleet" + }, + "type": { + "$id": "2170", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "2171", + "kind": "model", + "type": { + "$ref": "368" + }, + "value": { + "$id": "2172", + "createdBy": { + "$id": "2173", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "2174", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "2175", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "2176", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "2177", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2178", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2179", + "Name": "createOrUpdate", + "ResourceName": "Fleet", + "Doc": "Create a Fleet", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2180", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2182", + "Type": { + "$id": "2183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2184", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2185", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2187", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2189", + "Name": "fleetName", + "NameInRequest": "fleetName", + "Doc": "The name of the Compute Fleet", + "Type": { + "$id": "2190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2191", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "2192", + "kind": "constant", + "valueType": { + "$id": "2193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2194", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2195", + "kind": "constant", + "valueType": { + "$id": "2196", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2197", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "350" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2198", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "350" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "2199", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "350" + }, + "Headers": [ + { + "$id": "2200", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "2201", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "2202", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "2203", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "350" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.createOrUpdate", + "Decorators": [ + { + "$id": "2204", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "2205", + "finalState": "azure-async-operation" + } + } + ], + "Examples": [ + { + "$id": "2206", + "kind": "http", + "name": "Fleets_CreateOrUpdate", + "description": "Fleets_CreateOrUpdate", + "filePath": "2024-11-01/Fleets_CreateOrUpdate.json", + "parameters": [ + { + "$id": "2207", + "parameter": { + "$ref": "2180" + }, + "value": { + "$id": "2208", + "kind": "string", + "type": { + "$ref": "2181" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2209", + "parameter": { + "$ref": "2184" + }, + "value": { + "$id": "2210", + "kind": "string", + "type": { + "$ref": "2185" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "2211", + "parameter": { + "$ref": "2187" + }, + "value": { + "$id": "2212", + "kind": "string", + "type": { + "$ref": "2188" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "2213", + "parameter": { + "$ref": "2189" + }, + "value": { + "$id": "2214", + "kind": "string", + "type": { + "$ref": "2190" + }, + "value": "testFleet" + } + }, + { + "$id": "2215", + "parameter": { + "$ref": "2197" + }, + "value": { + "$id": "2216", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "2217", + "properties": { + "$id": "2218", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "2219", + "spotPriorityProfile": { + "$id": "2220", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "2221", + "capacity": { + "$id": "2222", + "kind": "number", + "type": { + "$ref": "413" + }, + "value": 20 + }, + "minCapacity": { + "$id": "2223", + "kind": "number", + "type": { + "$ref": "417" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "2224", + "kind": "number", + "type": { + "$ref": "421" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "2225", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2226", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2227", + "kind": "boolean", + "type": { + "$ref": "431" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2228", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "2229", + "capacity": { + "$id": "2230", + "kind": "number", + "type": { + "$ref": "439" + }, + "value": 20 + }, + "minCapacity": { + "$id": "2231", + "kind": "number", + "type": { + "$ref": "443" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "2232", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2233", + "kind": "array", + "type": { + "$ref": "452" + }, + "value": [ + { + "$id": "2234", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "2235", + "name": { + "$id": "2236", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "2237", + "kind": "number", + "type": { + "$ref": "459" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "2238", + "kind": "model", + "type": { + "$ref": "1370" + }, + "value": { + "$id": "2239", + "baseVirtualMachineProfile": { + "$id": "2240", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "2241", + "osProfile": { + "$id": "2242", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "2243", + "computerNamePrefix": { + "$id": "2244", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "o" + }, + "adminUsername": { + "$id": "2245", + "kind": "string", + "type": { + "$ref": "573" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "adminPassword": { + "$id": "2246", + "kind": "string", + "type": { + "$ref": "577" + }, + "value": "adfbrdxpv" + }, + "customData": { + "$id": "2247", + "kind": "string", + "type": { + "$ref": "581" + }, + "value": "xjjib" + }, + "windowsConfiguration": { + "$id": "2248", + "kind": "model", + "type": { + "$ref": "585" + }, + "value": { + "$id": "2249", + "provisionVMAgent": { + "$id": "2250", + "kind": "boolean", + "type": { + "$ref": "587" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "2251", + "kind": "boolean", + "type": { + "$ref": "591" + }, + "value": true + }, + "timeZone": { + "$id": "2252", + "kind": "string", + "type": { + "$ref": "595" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "2253", + "kind": "array", + "type": { + "$ref": "599" + }, + "value": [ + { + "$id": "2254", + "kind": "model", + "type": { + "$ref": "600" + }, + "value": { + "$id": "2255", + "passName": { + "$id": "2256", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "2257", + "kind": "string", + "type": { + "$ref": "606" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "2258", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + }, + "content": { + "$id": "2259", + "kind": "string", + "type": { + "$ref": "613" + }, + "value": "bubmqbxjkj" + } + } + } + ] + }, + "patchSettings": { + "$id": "2260", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "$id": "2261", + "patchMode": { + "$id": "2262", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "2263", + "kind": "boolean", + "type": { + "$ref": "624" + }, + "value": true + }, + "assessmentMode": { + "$id": "2264", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2265", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "2266", + "rebootSetting": { + "$id": "2267", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2268", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "2269", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "2270", + "listeners": { + "$id": "2271", + "kind": "array", + "type": { + "$ref": "646" + }, + "value": [ + { + "$id": "2272", + "kind": "model", + "type": { + "$ref": "647" + }, + "value": { + "$id": "2273", + "protocol": { + "$id": "2274", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Https" + }, + "certificateUrl": { + "$id": "2275", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2276", + "kind": "boolean", + "type": { + "$ref": "660" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "2277", + "kind": "model", + "type": { + "$ref": "666" + }, + "value": { + "$id": "2278", + "disablePasswordAuthentication": { + "$id": "2279", + "kind": "boolean", + "type": { + "$ref": "668" + }, + "value": true + }, + "ssh": { + "$id": "2280", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "2281", + "publicKeys": { + "$id": "2282", + "kind": "array", + "type": { + "$ref": "674" + }, + "value": [ + { + "$id": "2283", + "kind": "model", + "type": { + "$ref": "675" + }, + "value": { + "$id": "2284", + "path": { + "$id": "2285", + "kind": "string", + "type": { + "$ref": "677" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "2286", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "2287", + "kind": "boolean", + "type": { + "$ref": "689" + }, + "value": true + }, + "patchSettings": { + "$id": "2288", + "kind": "model", + "type": { + "$ref": "693" + }, + "value": { + "$id": "2289", + "patchMode": { + "$id": "2290", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "2291", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2292", + "kind": "model", + "type": { + "$ref": "701" + }, + "value": { + "$id": "2293", + "rebootSetting": { + "$id": "2294", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2295", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2296", + "kind": "boolean", + "type": { + "$ref": "714" + }, + "value": true + } + } + }, + "secrets": { + "$id": "2297", + "kind": "array", + "type": { + "$ref": "720" + }, + "value": [ + { + "$id": "2298", + "kind": "model", + "type": { + "$ref": "721" + }, + "value": { + "$id": "2299", + "sourceVault": { + "$id": "2300", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2301", + "id": { + "$id": "2302", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "2303", + "kind": "array", + "type": { + "$ref": "732" + }, + "value": [ + { + "$id": "2304", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "2305", + "certificateUrl": { + "$id": "2306", + "kind": "string", + "type": { + "$ref": "735" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "2307", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "2308", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "2309", + "kind": "boolean", + "type": { + "$ref": "751" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "2310", + "kind": "model", + "type": { + "$ref": "757" + }, + "value": { + "$id": "2311", + "imageReference": { + "$id": "2312", + "kind": "model", + "type": { + "$ref": "759" + }, + "value": { + "$id": "2313", + "publisher": { + "$id": "2314", + "kind": "string", + "type": { + "$ref": "766" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "2315", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "2316", + "kind": "string", + "type": { + "$ref": "774" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "2317", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "sharedGalleryImageId": { + "$id": "2318", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "2319", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "vlqe" + }, + "id": { + "$id": "2320", + "kind": "string", + "type": { + "$ref": "761" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "2321", + "kind": "model", + "type": { + "$ref": "796" + }, + "value": { + "$id": "2322", + "name": { + "$id": "2323", + "kind": "string", + "type": { + "$ref": "798" + }, + "value": "wfttw" + }, + "caching": { + "$id": "2324", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2325", + "kind": "boolean", + "type": { + "$ref": "805" + }, + "value": true + }, + "createOption": { + "$id": "2326", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "2327", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "2328", + "option": { + "$id": "2329", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "2330", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "2331", + "kind": "number", + "type": { + "$ref": "822" + }, + "value": 14 + }, + "osType": { + "$id": "2332", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "2333", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "2334", + "uri": { + "$id": "2335", + "kind": "string", + "type": { + "$ref": "831" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "2336", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "2337", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "2338", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "2339", + "storageAccountType": { + "$id": "2340", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2341", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "2342", + "id": { + "$id": "2343", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2344", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "2345", + "securityEncryptionType": { + "$id": "2346", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2347", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "2348", + "id": { + "$id": "2349", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "2350", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "2351", + "kind": "array", + "type": { + "$ref": "873" + }, + "value": [ + { + "$id": "2352", + "kind": "model", + "type": { + "$ref": "874" + }, + "value": { + "$id": "2353", + "name": { + "$id": "2354", + "kind": "string", + "type": { + "$ref": "876" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "2355", + "kind": "number", + "type": { + "$ref": "880" + }, + "value": 14 + }, + "caching": { + "$id": "2356", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2357", + "kind": "boolean", + "type": { + "$ref": "887" + }, + "value": true + }, + "createOption": { + "$id": "2358", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "2359", + "kind": "number", + "type": { + "$ref": "894" + }, + "value": 6 + }, + "managedDisk": { + "$id": "2360", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "2361", + "storageAccountType": { + "$id": "2362", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2363", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "2364", + "id": { + "$id": "2365", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2366", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "2367", + "securityEncryptionType": { + "$id": "2368", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2369", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "2370", + "id": { + "$id": "2371", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "2372", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "2373", + "kind": "number", + "type": { + "$ref": "905" + }, + "value": 2 + }, + "deleteOption": { + "$id": "2374", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "2375", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "2376", + "healthProbe": { + "$id": "2377", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2378", + "id": { + "$id": "2379", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "2380", + "kind": "array", + "type": { + "$ref": "930" + }, + "value": [ + { + "$id": "2381", + "kind": "model", + "type": { + "$ref": "931" + }, + "value": { + "$id": "2382", + "name": { + "$id": "2383", + "kind": "string", + "type": { + "$ref": "933" + }, + "value": "i" + }, + "properties": { + "$id": "2384", + "kind": "model", + "type": { + "$ref": "937" + }, + "value": { + "$id": "2385", + "primary": { + "$id": "2386", + "kind": "boolean", + "type": { + "$ref": "939" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2387", + "kind": "boolean", + "type": { + "$ref": "943" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "2388", + "kind": "boolean", + "type": { + "$ref": "947" + }, + "value": true + }, + "enableFpga": { + "$id": "2389", + "kind": "boolean", + "type": { + "$ref": "951" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "2390", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2391", + "id": { + "$id": "2392", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "2393", + "kind": "model", + "type": { + "$ref": "958" + }, + "value": { + "$id": "2394", + "dnsServers": { + "$id": "2395", + "kind": "array", + "type": { + "$ref": "960" + }, + "value": [ + { + "$id": "2396", + "kind": "string", + "type": { + "$ref": "961" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "2397", + "kind": "array", + "type": { + "$ref": "967" + }, + "value": [ + { + "$id": "2398", + "kind": "model", + "type": { + "$ref": "968" + }, + "value": { + "$id": "2399", + "name": { + "$id": "2400", + "kind": "string", + "type": { + "$ref": "970" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "2401", + "kind": "model", + "type": { + "$ref": "974" + }, + "value": { + "$id": "2402", + "subnet": { + "$id": "2403", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2404", + "id": { + "$id": "2405", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2406", + "kind": "boolean", + "type": { + "$ref": "979" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "2407", + "kind": "model", + "type": { + "$ref": "983" + }, + "value": { + "$id": "2408", + "name": { + "$id": "2409", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "2410", + "kind": "model", + "type": { + "$ref": "989" + }, + "value": { + "$id": "2411", + "idleTimeoutInMinutes": { + "$id": "2412", + "kind": "number", + "type": { + "$ref": "991" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "2413", + "kind": "model", + "type": { + "$ref": "995" + }, + "value": { + "$id": "2414", + "domainNameLabel": { + "$id": "2415", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "2416", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "2417", + "kind": "array", + "type": { + "$ref": "1006" + }, + "value": [ + { + "$id": "2418", + "kind": "model", + "type": { + "$ref": "1007" + }, + "value": { + "$id": "2419", + "ipTagType": { + "$id": "2420", + "kind": "string", + "type": { + "$ref": "1009" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "2421", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "2422", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2423", + "id": { + "$id": "2424", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "2425", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "2426", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "2427", + "kind": "model", + "type": { + "$ref": "1030" + }, + "value": { + "$id": "2428", + "name": { + "$id": "2429", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "2430", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "2431", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "2432", + "kind": "array", + "type": { + "$ref": "1045" + }, + "value": [ + { + "$id": "2433", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2434", + "id": { + "$id": "2435", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "2436", + "kind": "array", + "type": { + "$ref": "1049" + }, + "value": [ + { + "$id": "2437", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2438", + "id": { + "$id": "2439", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "2440", + "kind": "array", + "type": { + "$ref": "1053" + }, + "value": [ + { + "$id": "2441", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2442", + "id": { + "$id": "2443", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "2444", + "kind": "array", + "type": { + "$ref": "1057" + }, + "value": [ + { + "$id": "2445", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2446", + "id": { + "$id": "2447", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2448", + "kind": "boolean", + "type": { + "$ref": "1065" + }, + "value": true + }, + "deleteOption": { + "$id": "2449", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "2450", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "2451", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "2452", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "2453", + "kind": "model", + "type": { + "$ref": "1087" + }, + "value": { + "$id": "2454", + "uefiSettings": { + "$id": "2455", + "kind": "model", + "type": { + "$ref": "1089" + }, + "value": { + "$id": "2456", + "secureBootEnabled": { + "$id": "2457", + "kind": "boolean", + "type": { + "$ref": "1091" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "2458", + "kind": "boolean", + "type": { + "$ref": "1095" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "2459", + "kind": "boolean", + "type": { + "$ref": "1101" + }, + "value": true + }, + "securityType": { + "$id": "2460", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "2461", + "kind": "model", + "type": { + "$ref": "1108" + }, + "value": { + "$id": "2462", + "userAssignedIdentityResourceId": { + "$id": "2463", + "kind": "string", + "type": { + "$ref": "1110" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "2464", + "kind": "model", + "type": { + "$ref": "1117" + }, + "value": { + "$id": "2465", + "enabled": { + "$id": "2466", + "kind": "boolean", + "type": { + "$ref": "1119" + }, + "value": true + }, + "mode": { + "$id": "2467", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "2468", + "kind": "number", + "type": { + "$ref": "1126" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "2469", + "kind": "model", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "2470", + "bootDiagnostics": { + "$id": "2471", + "kind": "model", + "type": { + "$ref": "1136" + }, + "value": { + "$id": "2472", + "enabled": { + "$id": "2473", + "kind": "boolean", + "type": { + "$ref": "1138" + }, + "value": true + }, + "storageUri": { + "$id": "2474", + "kind": "string", + "type": { + "$ref": "1142" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "2475", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "2476", + "extensions": { + "$id": "2477", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "2478", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "2479", + "name": { + "$id": "2480", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "bndxuxx" + }, + "properties": { + "$id": "2481", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "2482", + "forceUpdateTag": { + "$id": "2483", + "kind": "string", + "type": { + "$ref": "1170" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "2484", + "kind": "string", + "type": { + "$ref": "1174" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "2485", + "kind": "string", + "type": { + "$ref": "1178" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "2486", + "kind": "string", + "type": { + "$ref": "1182" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "2487", + "kind": "boolean", + "type": { + "$ref": "1186" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2488", + "kind": "boolean", + "type": { + "$ref": "1190" + }, + "value": true + }, + "settings": { + "$id": "2489", + "kind": "dict", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "2490" + } + }, + "protectedSettings": { + "$id": "2491", + "kind": "dict", + "type": { + "$ref": "1200" + }, + "value": { + "$id": "2492" + } + }, + "provisionAfterExtensions": { + "$id": "2493", + "kind": "array", + "type": { + "$ref": "1210" + }, + "value": [ + { + "$id": "2494", + "kind": "string", + "type": { + "$ref": "1211" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "2495", + "kind": "boolean", + "type": { + "$ref": "1215" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "2496", + "kind": "model", + "type": { + "$ref": "1219" + }, + "value": { + "$id": "2497", + "secretUrl": { + "$id": "2498", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "https://myvaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "2499", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2500", + "id": { + "$id": "2501", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "2502", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "2503", + "kind": "string", + "type": { + "$ref": "1240" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "2504", + "kind": "model", + "type": { + "$ref": "1244" + }, + "value": { + "$id": "2505", + "terminateNotificationProfile": { + "$id": "2506", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "2507", + "notBeforeTimeout": { + "$id": "2508", + "kind": "string", + "type": { + "$ref": "1248" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "2509", + "kind": "boolean", + "type": { + "$ref": "1252" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "2510", + "kind": "model", + "type": { + "$ref": "1258" + }, + "value": { + "$id": "2511", + "notBeforeTimeout": { + "$id": "2512", + "kind": "string", + "type": { + "$ref": "1260" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "2513", + "kind": "boolean", + "type": { + "$ref": "1264" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "2514", + "kind": "string", + "type": { + "$ref": "1272" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "2515", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "2516", + "capacityReservationGroup": { + "$id": "2517", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2518", + "id": { + "$id": "2519", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "2520", + "kind": "model", + "type": { + "$ref": "1283" + }, + "value": { + "$id": "2521", + "galleryApplications": { + "$id": "2522", + "kind": "array", + "type": { + "$ref": "1285" + }, + "value": [ + { + "$id": "2523", + "kind": "model", + "type": { + "$ref": "1286" + }, + "value": { + "$id": "2524", + "tags": { + "$id": "2525", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "2526", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "2527", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "configurationReference": { + "$id": "2528", + "kind": "string", + "type": { + "$ref": "1301" + }, + "value": "ulztmiavpojpbpbddgnuuiimxcpau" + }, + "treatFailureAsDeploymentFailure": { + "$id": "2529", + "kind": "boolean", + "type": { + "$ref": "1305" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2530", + "kind": "boolean", + "type": { + "$ref": "1309" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "2531", + "kind": "model", + "type": { + "$ref": "1317" + }, + "value": { + "$id": "2532", + "vmSizeProperties": { + "$id": "2533", + "kind": "model", + "type": { + "$ref": "1319" + }, + "value": { + "$id": "2534", + "vCPUsAvailable": { + "$id": "2535", + "kind": "number", + "type": { + "$ref": "1321" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "2536", + "kind": "number", + "type": { + "$ref": "1325" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "2537", + "kind": "model", + "type": { + "$ref": "1333" + }, + "value": { + "$id": "2538", + "id": { + "$id": "2539", + "kind": "string", + "type": { + "$ref": "1335" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "2540", + "kind": "model", + "type": { + "$ref": "1342" + }, + "value": { + "$id": "2541", + "id": { + "$id": "2542", + "kind": "string", + "type": { + "$ref": "1344" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "2543", + "kind": "array", + "type": { + "$ref": "1348" + }, + "value": [ + { + "$id": "2544", + "kind": "string", + "type": { + "$ref": "1349" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "2545", + "kind": "boolean", + "type": { + "$ref": "1353" + }, + "value": true + } + } + } + } + }, + "computeApiVersion": { + "$id": "2546", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "2547", + "kind": "number", + "type": { + "$ref": "1379" + }, + "value": 1 + } + } + } + } + }, + "zones": { + "$id": "2548", + "kind": "array", + "type": { + "$ref": "1408" + }, + "value": [ + { + "$id": "2549", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zone1" + }, + { + "$id": "2550", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "2551", + "kind": "model", + "type": { + "$ref": "1413" + }, + "value": { + "$id": "2552", + "type": { + "$id": "2553", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "2554", + "kind": "dict", + "type": { + "$ref": "1428" + }, + "value": { + "$id": "2555", + "key9851": { + "$id": "2556", + "kind": "model", + "type": { + "$ref": "1431" + }, + "value": { + "$id": "2557" + } + } + } + } + } + }, + "tags": { + "$id": "2558", + "kind": "dict", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2559", + "key3518": { + "$id": "2560", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "2561", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "westus" + }, + "plan": { + "$id": "2562", + "kind": "model", + "type": { + "$ref": "1447" + }, + "value": { + "$id": "2563", + "name": { + "$id": "2564", + "kind": "string", + "type": { + "$ref": "1449" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "2565", + "kind": "string", + "type": { + "$ref": "1453" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "2566", + "kind": "string", + "type": { + "$ref": "1457" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "2567", + "kind": "string", + "type": { + "$ref": "1461" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "2568", + "kind": "string", + "type": { + "$ref": "1465" + }, + "value": "wa" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2569", + "response": { + "$ref": "2198" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2570", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "2571", + "properties": { + "$id": "2572", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "2573", + "provisioningState": { + "$id": "2574", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + }, + "spotPriorityProfile": { + "$id": "2575", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "2576", + "capacity": { + "$id": "2577", + "kind": "number", + "type": { + "$ref": "413" + }, + "value": 10 + }, + "minCapacity": { + "$id": "2578", + "kind": "number", + "type": { + "$ref": "417" + }, + "value": 20 + }, + "maxPricePerVM": { + "$id": "2579", + "kind": "number", + "type": { + "$ref": "421" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "2580", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2581", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2582", + "kind": "boolean", + "type": { + "$ref": "431" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2583", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "2584", + "capacity": { + "$id": "2585", + "kind": "number", + "type": { + "$ref": "439" + }, + "value": 10 + }, + "minCapacity": { + "$id": "2586", + "kind": "number", + "type": { + "$ref": "443" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "2587", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2588", + "kind": "array", + "type": { + "$ref": "452" + }, + "value": [ + { + "$id": "2589", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "2590", + "name": { + "$id": "2591", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "2592", + "kind": "number", + "type": { + "$ref": "459" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "2593", + "kind": "model", + "type": { + "$ref": "1370" + }, + "value": { + "$id": "2594", + "baseVirtualMachineProfile": { + "$id": "2595", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "2596", + "osProfile": { + "$id": "2597", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "2598", + "computerNamePrefix": { + "$id": "2599", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "o" + }, + "adminUsername": { + "$id": "2600", + "kind": "string", + "type": { + "$ref": "573" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "2601", + "kind": "model", + "type": { + "$ref": "585" + }, + "value": { + "$id": "2602", + "provisionVMAgent": { + "$id": "2603", + "kind": "boolean", + "type": { + "$ref": "587" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "2604", + "kind": "boolean", + "type": { + "$ref": "591" + }, + "value": true + }, + "timeZone": { + "$id": "2605", + "kind": "string", + "type": { + "$ref": "595" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "2606", + "kind": "array", + "type": { + "$ref": "599" + }, + "value": [ + { + "$id": "2607", + "kind": "model", + "type": { + "$ref": "600" + }, + "value": { + "$id": "2608", + "passName": { + "$id": "2609", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "2610", + "kind": "string", + "type": { + "$ref": "606" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "2611", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "2612", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "$id": "2613", + "patchMode": { + "$id": "2614", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "2615", + "kind": "boolean", + "type": { + "$ref": "624" + }, + "value": true + }, + "assessmentMode": { + "$id": "2616", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2617", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "2618", + "rebootSetting": { + "$id": "2619", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2620", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "2621", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "2622", + "listeners": { + "$id": "2623", + "kind": "array", + "type": { + "$ref": "646" + }, + "value": [ + { + "$id": "2624", + "kind": "model", + "type": { + "$ref": "647" + }, + "value": { + "$id": "2625", + "protocol": { + "$id": "2626", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Https" + }, + "certificateUrl": { + "$id": "2627", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2628", + "kind": "boolean", + "type": { + "$ref": "660" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "2629", + "kind": "model", + "type": { + "$ref": "666" + }, + "value": { + "$id": "2630", + "disablePasswordAuthentication": { + "$id": "2631", + "kind": "boolean", + "type": { + "$ref": "668" + }, + "value": true + }, + "ssh": { + "$id": "2632", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "2633", + "publicKeys": { + "$id": "2634", + "kind": "array", + "type": { + "$ref": "674" + }, + "value": [ + { + "$id": "2635", + "kind": "model", + "type": { + "$ref": "675" + }, + "value": { + "$id": "2636", + "path": { + "$id": "2637", + "kind": "string", + "type": { + "$ref": "677" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "2638", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "2639", + "kind": "boolean", + "type": { + "$ref": "689" + }, + "value": true + }, + "patchSettings": { + "$id": "2640", + "kind": "model", + "type": { + "$ref": "693" + }, + "value": { + "$id": "2641", + "patchMode": { + "$id": "2642", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "2643", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2644", + "kind": "model", + "type": { + "$ref": "701" + }, + "value": { + "$id": "2645", + "rebootSetting": { + "$id": "2646", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2647", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2648", + "kind": "boolean", + "type": { + "$ref": "714" + }, + "value": true + } + } + }, + "secrets": { + "$id": "2649", + "kind": "array", + "type": { + "$ref": "720" + }, + "value": [ + { + "$id": "2650", + "kind": "model", + "type": { + "$ref": "721" + }, + "value": { + "$id": "2651", + "sourceVault": { + "$id": "2652", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2653", + "id": { + "$id": "2654", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "2655", + "kind": "array", + "type": { + "$ref": "732" + }, + "value": [ + { + "$id": "2656", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "2657", + "certificateUrl": { + "$id": "2658", + "kind": "string", + "type": { + "$ref": "735" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "2659", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "2660", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "2661", + "kind": "boolean", + "type": { + "$ref": "751" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "2662", + "kind": "model", + "type": { + "$ref": "757" + }, + "value": { + "$id": "2663", + "imageReference": { + "$id": "2664", + "kind": "model", + "type": { + "$ref": "759" + }, + "value": { + "$id": "2665", + "publisher": { + "$id": "2666", + "kind": "string", + "type": { + "$ref": "766" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "2667", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "2668", + "kind": "string", + "type": { + "$ref": "774" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "2669", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "2670", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "2671", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "2672", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "vlqe" + }, + "id": { + "$id": "2673", + "kind": "string", + "type": { + "$ref": "761" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "2674", + "kind": "model", + "type": { + "$ref": "796" + }, + "value": { + "$id": "2675", + "name": { + "$id": "2676", + "kind": "string", + "type": { + "$ref": "798" + }, + "value": "wfttw" + }, + "caching": { + "$id": "2677", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2678", + "kind": "boolean", + "type": { + "$ref": "805" + }, + "value": true + }, + "createOption": { + "$id": "2679", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "2680", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "2681", + "option": { + "$id": "2682", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "2683", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "2684", + "kind": "number", + "type": { + "$ref": "822" + }, + "value": 14 + }, + "osType": { + "$id": "2685", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "2686", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "2687", + "uri": { + "$id": "2688", + "kind": "string", + "type": { + "$ref": "831" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "2689", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "2690", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "2691", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "2692", + "storageAccountType": { + "$id": "2693", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2694", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "2695", + "id": { + "$id": "2696", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2697", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "2698", + "securityEncryptionType": { + "$id": "2699", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2700", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "2701", + "id": { + "$id": "2702", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "2703", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "2704", + "kind": "array", + "type": { + "$ref": "873" + }, + "value": [ + { + "$id": "2705", + "kind": "model", + "type": { + "$ref": "874" + }, + "value": { + "$id": "2706", + "name": { + "$id": "2707", + "kind": "string", + "type": { + "$ref": "876" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "2708", + "kind": "number", + "type": { + "$ref": "880" + }, + "value": 14 + }, + "caching": { + "$id": "2709", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2710", + "kind": "boolean", + "type": { + "$ref": "887" + }, + "value": true + }, + "createOption": { + "$id": "2711", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "2712", + "kind": "number", + "type": { + "$ref": "894" + }, + "value": 6 + }, + "managedDisk": { + "$id": "2713", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "2714", + "storageAccountType": { + "$id": "2715", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2716", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "2717", + "id": { + "$id": "2718", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2719", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "2720", + "securityEncryptionType": { + "$id": "2721", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2722", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "2723", + "id": { + "$id": "2724", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "2725", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "2726", + "kind": "number", + "type": { + "$ref": "905" + }, + "value": 2 + }, + "deleteOption": { + "$id": "2727", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "2728", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "2729", + "healthProbe": { + "$id": "2730", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2731", + "id": { + "$id": "2732", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "2733", + "kind": "array", + "type": { + "$ref": "930" + }, + "value": [ + { + "$id": "2734", + "kind": "model", + "type": { + "$ref": "931" + }, + "value": { + "$id": "2735", + "name": { + "$id": "2736", + "kind": "string", + "type": { + "$ref": "933" + }, + "value": "i" + }, + "properties": { + "$id": "2737", + "kind": "model", + "type": { + "$ref": "937" + }, + "value": { + "$id": "2738", + "primary": { + "$id": "2739", + "kind": "boolean", + "type": { + "$ref": "939" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2740", + "kind": "boolean", + "type": { + "$ref": "943" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "2741", + "kind": "boolean", + "type": { + "$ref": "947" + }, + "value": true + }, + "enableFpga": { + "$id": "2742", + "kind": "boolean", + "type": { + "$ref": "951" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "2743", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2744", + "id": { + "$id": "2745", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "2746", + "kind": "model", + "type": { + "$ref": "958" + }, + "value": { + "$id": "2747", + "dnsServers": { + "$id": "2748", + "kind": "array", + "type": { + "$ref": "960" + }, + "value": [ + { + "$id": "2749", + "kind": "string", + "type": { + "$ref": "961" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "2750", + "kind": "array", + "type": { + "$ref": "967" + }, + "value": [ + { + "$id": "2751", + "kind": "model", + "type": { + "$ref": "968" + }, + "value": { + "$id": "2752", + "name": { + "$id": "2753", + "kind": "string", + "type": { + "$ref": "970" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "2754", + "kind": "model", + "type": { + "$ref": "974" + }, + "value": { + "$id": "2755", + "subnet": { + "$id": "2756", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2757", + "id": { + "$id": "2758", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2759", + "kind": "boolean", + "type": { + "$ref": "979" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "2760", + "kind": "model", + "type": { + "$ref": "983" + }, + "value": { + "$id": "2761", + "name": { + "$id": "2762", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "2763", + "kind": "model", + "type": { + "$ref": "989" + }, + "value": { + "$id": "2764", + "idleTimeoutInMinutes": { + "$id": "2765", + "kind": "number", + "type": { + "$ref": "991" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "2766", + "kind": "model", + "type": { + "$ref": "995" + }, + "value": { + "$id": "2767", + "domainNameLabel": { + "$id": "2768", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "2769", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "2770", + "kind": "array", + "type": { + "$ref": "1006" + }, + "value": [ + { + "$id": "2771", + "kind": "model", + "type": { + "$ref": "1007" + }, + "value": { + "$id": "2772", + "ipTagType": { + "$id": "2773", + "kind": "string", + "type": { + "$ref": "1009" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "2774", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "2775", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2776", + "id": { + "$id": "2777", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "2778", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "2779", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "2780", + "kind": "model", + "type": { + "$ref": "1030" + }, + "value": { + "$id": "2781", + "name": { + "$id": "2782", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "2783", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "2784", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "2785", + "kind": "array", + "type": { + "$ref": "1045" + }, + "value": [ + { + "$id": "2786", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2787", + "id": { + "$id": "2788", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "2789", + "kind": "array", + "type": { + "$ref": "1049" + }, + "value": [ + { + "$id": "2790", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2791", + "id": { + "$id": "2792", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "2793", + "kind": "array", + "type": { + "$ref": "1053" + }, + "value": [ + { + "$id": "2794", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2795", + "id": { + "$id": "2796", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "2797", + "kind": "array", + "type": { + "$ref": "1057" + }, + "value": [ + { + "$id": "2798", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2799", + "id": { + "$id": "2800", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2801", + "kind": "boolean", + "type": { + "$ref": "1065" + }, + "value": true + }, + "deleteOption": { + "$id": "2802", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "2803", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "2804", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "2805", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "2806", + "kind": "model", + "type": { + "$ref": "1087" + }, + "value": { + "$id": "2807", + "uefiSettings": { + "$id": "2808", + "kind": "model", + "type": { + "$ref": "1089" + }, + "value": { + "$id": "2809", + "secureBootEnabled": { + "$id": "2810", + "kind": "boolean", + "type": { + "$ref": "1091" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "2811", + "kind": "boolean", + "type": { + "$ref": "1095" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "2812", + "kind": "boolean", + "type": { + "$ref": "1101" + }, + "value": true + }, + "securityType": { + "$id": "2813", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "2814", + "kind": "model", + "type": { + "$ref": "1108" + }, + "value": { + "$id": "2815", + "userAssignedIdentityResourceId": { + "$id": "2816", + "kind": "string", + "type": { + "$ref": "1110" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "2817", + "kind": "model", + "type": { + "$ref": "1117" + }, + "value": { + "$id": "2818", + "enabled": { + "$id": "2819", + "kind": "boolean", + "type": { + "$ref": "1119" + }, + "value": true + }, + "mode": { + "$id": "2820", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "2821", + "kind": "number", + "type": { + "$ref": "1126" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "2822", + "kind": "model", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "2823", + "bootDiagnostics": { + "$id": "2824", + "kind": "model", + "type": { + "$ref": "1136" + }, + "value": { + "$id": "2825", + "enabled": { + "$id": "2826", + "kind": "boolean", + "type": { + "$ref": "1138" + }, + "value": true + }, + "storageUri": { + "$id": "2827", + "kind": "string", + "type": { + "$ref": "1142" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "2828", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "2829", + "extensions": { + "$id": "2830", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "2831", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "2832", + "name": { + "$id": "2833", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "2834", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "cmeam" + }, + "properties": { + "$id": "2835", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "2836", + "forceUpdateTag": { + "$id": "2837", + "kind": "string", + "type": { + "$ref": "1170" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "2838", + "kind": "string", + "type": { + "$ref": "1174" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "2839", + "kind": "string", + "type": { + "$ref": "1178" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "2840", + "kind": "string", + "type": { + "$ref": "1182" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "2841", + "kind": "boolean", + "type": { + "$ref": "1186" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2842", + "kind": "boolean", + "type": { + "$ref": "1190" + }, + "value": true + }, + "settings": { + "$id": "2843", + "kind": "dict", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "2844" + } + }, + "provisioningState": { + "$id": "2845", + "kind": "string", + "type": { + "$ref": "1206" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "2846", + "kind": "array", + "type": { + "$ref": "1210" + }, + "value": [ + { + "$id": "2847", + "kind": "string", + "type": { + "$ref": "1211" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "2848", + "kind": "boolean", + "type": { + "$ref": "1215" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "2849", + "kind": "model", + "type": { + "$ref": "1219" + }, + "value": { + "$id": "2850", + "secretUrl": { + "$id": "2851", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "2852", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2853", + "id": { + "$id": "2854", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "2855", + "kind": "string", + "type": { + "$ref": "1155" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "2856", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "2857", + "kind": "string", + "type": { + "$ref": "1240" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "2858", + "kind": "model", + "type": { + "$ref": "1244" + }, + "value": { + "$id": "2859", + "terminateNotificationProfile": { + "$id": "2860", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "2861", + "notBeforeTimeout": { + "$id": "2862", + "kind": "string", + "type": { + "$ref": "1248" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "2863", + "kind": "boolean", + "type": { + "$ref": "1252" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "2864", + "kind": "model", + "type": { + "$ref": "1258" + }, + "value": { + "$id": "2865", + "notBeforeTimeout": { + "$id": "2866", + "kind": "string", + "type": { + "$ref": "1260" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "2867", + "kind": "boolean", + "type": { + "$ref": "1264" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "2868", + "kind": "string", + "type": { + "$ref": "1272" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "2869", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "2870", + "capacityReservationGroup": { + "$id": "2871", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2872", + "id": { + "$id": "2873", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "2874", + "kind": "model", + "type": { + "$ref": "1283" + }, + "value": { + "$id": "2875", + "galleryApplications": { + "$id": "2876", + "kind": "array", + "type": { + "$ref": "1285" + }, + "value": [ + { + "$id": "2877", + "kind": "model", + "type": { + "$ref": "1286" + }, + "value": { + "$id": "2878", + "tags": { + "$id": "2879", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "2880", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "2881", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "2882", + "kind": "boolean", + "type": { + "$ref": "1305" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2883", + "kind": "boolean", + "type": { + "$ref": "1309" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "2884", + "kind": "model", + "type": { + "$ref": "1317" + }, + "value": { + "$id": "2885", + "vmSizeProperties": { + "$id": "2886", + "kind": "model", + "type": { + "$ref": "1319" + }, + "value": { + "$id": "2887", + "vCPUsAvailable": { + "$id": "2888", + "kind": "number", + "type": { + "$ref": "1321" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "2889", + "kind": "number", + "type": { + "$ref": "1325" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "2890", + "kind": "model", + "type": { + "$ref": "1333" + }, + "value": { + "$id": "2891", + "id": { + "$id": "2892", + "kind": "string", + "type": { + "$ref": "1335" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "2893", + "kind": "model", + "type": { + "$ref": "1342" + }, + "value": { + "$id": "2894", + "id": { + "$id": "2895", + "kind": "string", + "type": { + "$ref": "1344" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "2896", + "kind": "array", + "type": { + "$ref": "1348" + }, + "value": [ + { + "$id": "2897", + "kind": "string", + "type": { + "$ref": "1349" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "2898", + "kind": "boolean", + "type": { + "$ref": "1353" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "2899", + "kind": "string", + "type": { + "$ref": "1359" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "2900", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "2901", + "kind": "number", + "type": { + "$ref": "1379" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "2902", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "2903", + "kind": "string", + "type": { + "$ref": "1402" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "2904", + "kind": "array", + "type": { + "$ref": "1408" + }, + "value": [ + { + "$id": "2905", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zone1" + }, + { + "$id": "2906", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "2907", + "kind": "model", + "type": { + "$ref": "1413" + }, + "value": { + "$id": "2908", + "principalId": { + "$id": "2909", + "kind": "string", + "type": { + "$ref": "1415" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "2910", + "kind": "string", + "type": { + "$ref": "1420" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "2911", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "2912", + "kind": "dict", + "type": { + "$ref": "1428" + }, + "value": { + "$id": "2913", + "key9851": { + "$id": "2914", + "kind": "model", + "type": { + "$ref": "1431" + }, + "value": { + "$id": "2915", + "principalId": { + "$id": "2916", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "2917", + "kind": "string", + "type": { + "$ref": "1433" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "plan": { + "$id": "2918", + "kind": "model", + "type": { + "$ref": "1447" + }, + "value": { + "$id": "2919", + "name": { + "$id": "2920", + "kind": "string", + "type": { + "$ref": "1449" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "2921", + "kind": "string", + "type": { + "$ref": "1453" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "2922", + "kind": "string", + "type": { + "$ref": "1457" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "2923", + "kind": "string", + "type": { + "$ref": "1461" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "2924", + "kind": "string", + "type": { + "$ref": "1465" + }, + "value": "wa" + } + } + }, + "tags": { + "$id": "2925", + "kind": "dict", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2926", + "key3518": { + "$id": "2927", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "2928", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "westus" + }, + "id": { + "$id": "2929", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "2930", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "testFleet" + }, + "type": { + "$id": "2931", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "2932", + "kind": "model", + "type": { + "$ref": "368" + }, + "value": { + "$id": "2933", + "createdBy": { + "$id": "2934", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "2935", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "2936", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "2937", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "2938", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2939", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + }, + { + "$id": "2940", + "response": { + "$ref": "2199" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2941", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "2942", + "properties": { + "$id": "2943", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "2944", + "provisioningState": { + "$id": "2945", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "2946", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "2947", + "capacity": { + "$id": "2948", + "kind": "number", + "type": { + "$ref": "413" + }, + "value": 0 + }, + "minCapacity": { + "$id": "2949", + "kind": "number", + "type": { + "$ref": "417" + }, + "value": 0 + }, + "maxPricePerVM": { + "$id": "2950", + "kind": "number", + "type": { + "$ref": "421" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "2951", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2952", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2953", + "kind": "boolean", + "type": { + "$ref": "431" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2954", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "2955", + "capacity": { + "$id": "2956", + "kind": "number", + "type": { + "$ref": "439" + }, + "value": 20 + }, + "minCapacity": { + "$id": "2957", + "kind": "number", + "type": { + "$ref": "443" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "2958", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2959", + "kind": "array", + "type": { + "$ref": "452" + }, + "value": [ + { + "$id": "2960", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "2961", + "name": { + "$id": "2962", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "2963", + "kind": "number", + "type": { + "$ref": "459" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "2964", + "kind": "model", + "type": { + "$ref": "1370" + }, + "value": { + "$id": "2965", + "baseVirtualMachineProfile": { + "$id": "2966", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "2967", + "osProfile": { + "$id": "2968", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "2969", + "computerNamePrefix": { + "$id": "2970", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "o" + }, + "adminUsername": { + "$id": "2971", + "kind": "string", + "type": { + "$ref": "573" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "2972", + "kind": "model", + "type": { + "$ref": "585" + }, + "value": { + "$id": "2973", + "provisionVMAgent": { + "$id": "2974", + "kind": "boolean", + "type": { + "$ref": "587" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "2975", + "kind": "boolean", + "type": { + "$ref": "591" + }, + "value": true + }, + "timeZone": { + "$id": "2976", + "kind": "string", + "type": { + "$ref": "595" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "2977", + "kind": "array", + "type": { + "$ref": "599" + }, + "value": [ + { + "$id": "2978", + "kind": "model", + "type": { + "$ref": "600" + }, + "value": { + "$id": "2979", + "passName": { + "$id": "2980", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "2981", + "kind": "string", + "type": { + "$ref": "606" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "2982", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "2983", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "$id": "2984", + "patchMode": { + "$id": "2985", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "2986", + "kind": "boolean", + "type": { + "$ref": "624" + }, + "value": true + }, + "assessmentMode": { + "$id": "2987", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2988", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "2989", + "rebootSetting": { + "$id": "2990", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2991", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "2992", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "2993", + "listeners": { + "$id": "2994", + "kind": "array", + "type": { + "$ref": "646" + }, + "value": [ + { + "$id": "2995", + "kind": "model", + "type": { + "$ref": "647" + }, + "value": { + "$id": "2996", + "protocol": { + "$id": "2997", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Https" + }, + "certificateUrl": { + "$id": "2998", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2999", + "kind": "boolean", + "type": { + "$ref": "660" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "3000", + "kind": "model", + "type": { + "$ref": "666" + }, + "value": { + "$id": "3001", + "disablePasswordAuthentication": { + "$id": "3002", + "kind": "boolean", + "type": { + "$ref": "668" + }, + "value": true + }, + "ssh": { + "$id": "3003", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "3004", + "publicKeys": { + "$id": "3005", + "kind": "array", + "type": { + "$ref": "674" + }, + "value": [ + { + "$id": "3006", + "kind": "model", + "type": { + "$ref": "675" + }, + "value": { + "$id": "3007", + "path": { + "$id": "3008", + "kind": "string", + "type": { + "$ref": "677" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "3009", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "3010", + "kind": "boolean", + "type": { + "$ref": "689" + }, + "value": true + }, + "patchSettings": { + "$id": "3011", + "kind": "model", + "type": { + "$ref": "693" + }, + "value": { + "$id": "3012", + "patchMode": { + "$id": "3013", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "3014", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3015", + "kind": "model", + "type": { + "$ref": "701" + }, + "value": { + "$id": "3016", + "rebootSetting": { + "$id": "3017", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3018", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3019", + "kind": "boolean", + "type": { + "$ref": "714" + }, + "value": true + } + } + }, + "secrets": { + "$id": "3020", + "kind": "array", + "type": { + "$ref": "720" + }, + "value": [ + { + "$id": "3021", + "kind": "model", + "type": { + "$ref": "721" + }, + "value": { + "$id": "3022", + "sourceVault": { + "$id": "3023", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3024", + "id": { + "$id": "3025", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "3026", + "kind": "array", + "type": { + "$ref": "732" + }, + "value": [ + { + "$id": "3027", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "3028", + "certificateUrl": { + "$id": "3029", + "kind": "string", + "type": { + "$ref": "735" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "3030", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "3031", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "3032", + "kind": "boolean", + "type": { + "$ref": "751" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "3033", + "kind": "model", + "type": { + "$ref": "757" + }, + "value": { + "$id": "3034", + "imageReference": { + "$id": "3035", + "kind": "model", + "type": { + "$ref": "759" + }, + "value": { + "$id": "3036", + "publisher": { + "$id": "3037", + "kind": "string", + "type": { + "$ref": "766" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "3038", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "3039", + "kind": "string", + "type": { + "$ref": "774" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "3040", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "3041", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "3042", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "3043", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "vlqe" + }, + "id": { + "$id": "3044", + "kind": "string", + "type": { + "$ref": "761" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "3045", + "kind": "model", + "type": { + "$ref": "796" + }, + "value": { + "$id": "3046", + "name": { + "$id": "3047", + "kind": "string", + "type": { + "$ref": "798" + }, + "value": "wfttw" + }, + "caching": { + "$id": "3048", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3049", + "kind": "boolean", + "type": { + "$ref": "805" + }, + "value": true + }, + "createOption": { + "$id": "3050", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "3051", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "3052", + "option": { + "$id": "3053", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "3054", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "3055", + "kind": "number", + "type": { + "$ref": "822" + }, + "value": 14 + }, + "osType": { + "$id": "3056", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "3057", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "3058", + "uri": { + "$id": "3059", + "kind": "string", + "type": { + "$ref": "831" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "3060", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "3061", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "3062", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3063", + "storageAccountType": { + "$id": "3064", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3065", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "3066", + "id": { + "$id": "3067", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3068", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "3069", + "securityEncryptionType": { + "$id": "3070", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3071", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "3072", + "id": { + "$id": "3073", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "3074", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "3075", + "kind": "array", + "type": { + "$ref": "873" + }, + "value": [ + { + "$id": "3076", + "kind": "model", + "type": { + "$ref": "874" + }, + "value": { + "$id": "3077", + "name": { + "$id": "3078", + "kind": "string", + "type": { + "$ref": "876" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "3079", + "kind": "number", + "type": { + "$ref": "880" + }, + "value": 14 + }, + "caching": { + "$id": "3080", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3081", + "kind": "boolean", + "type": { + "$ref": "887" + }, + "value": true + }, + "createOption": { + "$id": "3082", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "3083", + "kind": "number", + "type": { + "$ref": "894" + }, + "value": 6 + }, + "managedDisk": { + "$id": "3084", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3085", + "storageAccountType": { + "$id": "3086", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3087", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "3088", + "id": { + "$id": "3089", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3090", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "3091", + "securityEncryptionType": { + "$id": "3092", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3093", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "3094", + "id": { + "$id": "3095", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "3096", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "3097", + "kind": "number", + "type": { + "$ref": "905" + }, + "value": 2 + }, + "deleteOption": { + "$id": "3098", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "3099", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "3100", + "healthProbe": { + "$id": "3101", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3102", + "id": { + "$id": "3103", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "3104", + "kind": "array", + "type": { + "$ref": "930" + }, + "value": [ + { + "$id": "3105", + "kind": "model", + "type": { + "$ref": "931" + }, + "value": { + "$id": "3106", + "name": { + "$id": "3107", + "kind": "string", + "type": { + "$ref": "933" + }, + "value": "i" + }, + "properties": { + "$id": "3108", + "kind": "model", + "type": { + "$ref": "937" + }, + "value": { + "$id": "3109", + "primary": { + "$id": "3110", + "kind": "boolean", + "type": { + "$ref": "939" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3111", + "kind": "boolean", + "type": { + "$ref": "943" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "3112", + "kind": "boolean", + "type": { + "$ref": "947" + }, + "value": true + }, + "enableFpga": { + "$id": "3113", + "kind": "boolean", + "type": { + "$ref": "951" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "3114", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3115", + "id": { + "$id": "3116", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "3117", + "kind": "model", + "type": { + "$ref": "958" + }, + "value": { + "$id": "3118", + "dnsServers": { + "$id": "3119", + "kind": "array", + "type": { + "$ref": "960" + }, + "value": [ + { + "$id": "3120", + "kind": "string", + "type": { + "$ref": "961" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "3121", + "kind": "array", + "type": { + "$ref": "967" + }, + "value": [ + { + "$id": "3122", + "kind": "model", + "type": { + "$ref": "968" + }, + "value": { + "$id": "3123", + "name": { + "$id": "3124", + "kind": "string", + "type": { + "$ref": "970" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "3125", + "kind": "model", + "type": { + "$ref": "974" + }, + "value": { + "$id": "3126", + "subnet": { + "$id": "3127", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3128", + "id": { + "$id": "3129", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3130", + "kind": "boolean", + "type": { + "$ref": "979" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "3131", + "kind": "model", + "type": { + "$ref": "983" + }, + "value": { + "$id": "3132", + "name": { + "$id": "3133", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "3134", + "kind": "model", + "type": { + "$ref": "989" + }, + "value": { + "$id": "3135", + "idleTimeoutInMinutes": { + "$id": "3136", + "kind": "number", + "type": { + "$ref": "991" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "3137", + "kind": "model", + "type": { + "$ref": "995" + }, + "value": { + "$id": "3138", + "domainNameLabel": { + "$id": "3139", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "3140", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "3141", + "kind": "array", + "type": { + "$ref": "1006" + }, + "value": [ + { + "$id": "3142", + "kind": "model", + "type": { + "$ref": "1007" + }, + "value": { + "$id": "3143", + "ipTagType": { + "$id": "3144", + "kind": "string", + "type": { + "$ref": "1009" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "3145", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "3146", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3147", + "id": { + "$id": "3148", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "3149", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "3150", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "3151", + "kind": "model", + "type": { + "$ref": "1030" + }, + "value": { + "$id": "3152", + "name": { + "$id": "3153", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "3154", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "3155", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "3156", + "kind": "array", + "type": { + "$ref": "1045" + }, + "value": [ + { + "$id": "3157", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3158", + "id": { + "$id": "3159", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "3160", + "kind": "array", + "type": { + "$ref": "1049" + }, + "value": [ + { + "$id": "3161", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3162", + "id": { + "$id": "3163", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "3164", + "kind": "array", + "type": { + "$ref": "1053" + }, + "value": [ + { + "$id": "3165", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3166", + "id": { + "$id": "3167", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "3168", + "kind": "array", + "type": { + "$ref": "1057" + }, + "value": [ + { + "$id": "3169", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3170", + "id": { + "$id": "3171", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3172", + "kind": "boolean", + "type": { + "$ref": "1065" + }, + "value": true + }, + "deleteOption": { + "$id": "3173", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "3174", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "3175", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3176", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "3177", + "kind": "model", + "type": { + "$ref": "1087" + }, + "value": { + "$id": "3178", + "uefiSettings": { + "$id": "3179", + "kind": "model", + "type": { + "$ref": "1089" + }, + "value": { + "$id": "3180", + "secureBootEnabled": { + "$id": "3181", + "kind": "boolean", + "type": { + "$ref": "1091" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "3182", + "kind": "boolean", + "type": { + "$ref": "1095" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "3183", + "kind": "boolean", + "type": { + "$ref": "1101" + }, + "value": true + }, + "securityType": { + "$id": "3184", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "3185", + "kind": "model", + "type": { + "$ref": "1108" + }, + "value": { + "$id": "3186", + "userAssignedIdentityResourceId": { + "$id": "3187", + "kind": "string", + "type": { + "$ref": "1110" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "3188", + "kind": "model", + "type": { + "$ref": "1117" + }, + "value": { + "$id": "3189", + "enabled": { + "$id": "3190", + "kind": "boolean", + "type": { + "$ref": "1119" + }, + "value": true + }, + "mode": { + "$id": "3191", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "3192", + "kind": "number", + "type": { + "$ref": "1126" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "3193", + "kind": "model", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "3194", + "bootDiagnostics": { + "$id": "3195", + "kind": "model", + "type": { + "$ref": "1136" + }, + "value": { + "$id": "3196", + "enabled": { + "$id": "3197", + "kind": "boolean", + "type": { + "$ref": "1138" + }, + "value": true + }, + "storageUri": { + "$id": "3198", + "kind": "string", + "type": { + "$ref": "1142" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "3199", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "3200", + "extensions": { + "$id": "3201", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "3202", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "3203", + "name": { + "$id": "3204", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "3205", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "cmeam" + }, + "properties": { + "$id": "3206", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "3207", + "forceUpdateTag": { + "$id": "3208", + "kind": "string", + "type": { + "$ref": "1170" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "3209", + "kind": "string", + "type": { + "$ref": "1174" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "3210", + "kind": "string", + "type": { + "$ref": "1178" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "3211", + "kind": "string", + "type": { + "$ref": "1182" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "3212", + "kind": "boolean", + "type": { + "$ref": "1186" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3213", + "kind": "boolean", + "type": { + "$ref": "1190" + }, + "value": true + }, + "settings": { + "$id": "3214", + "kind": "dict", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "3215" + } + }, + "provisioningState": { + "$id": "3216", + "kind": "string", + "type": { + "$ref": "1206" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "3217", + "kind": "array", + "type": { + "$ref": "1210" + }, + "value": [ + { + "$id": "3218", + "kind": "string", + "type": { + "$ref": "1211" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "3219", + "kind": "boolean", + "type": { + "$ref": "1215" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "3220", + "kind": "model", + "type": { + "$ref": "1219" + }, + "value": { + "$id": "3221", + "secretUrl": { + "$id": "3222", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "3223", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3224", + "id": { + "$id": "3225", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "3226", + "kind": "string", + "type": { + "$ref": "1155" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "3227", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "3228", + "kind": "string", + "type": { + "$ref": "1240" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "3229", + "kind": "model", + "type": { + "$ref": "1244" + }, + "value": { + "$id": "3230", + "terminateNotificationProfile": { + "$id": "3231", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "3232", + "notBeforeTimeout": { + "$id": "3233", + "kind": "string", + "type": { + "$ref": "1248" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "3234", + "kind": "boolean", + "type": { + "$ref": "1252" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "3235", + "kind": "model", + "type": { + "$ref": "1258" + }, + "value": { + "$id": "3236", + "notBeforeTimeout": { + "$id": "3237", + "kind": "string", + "type": { + "$ref": "1260" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "3238", + "kind": "boolean", + "type": { + "$ref": "1264" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "3239", + "kind": "string", + "type": { + "$ref": "1272" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "3240", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "3241", + "capacityReservationGroup": { + "$id": "3242", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3243", + "id": { + "$id": "3244", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "3245", + "kind": "model", + "type": { + "$ref": "1283" + }, + "value": { + "$id": "3246", + "galleryApplications": { + "$id": "3247", + "kind": "array", + "type": { + "$ref": "1285" + }, + "value": [ + { + "$id": "3248", + "kind": "model", + "type": { + "$ref": "1286" + }, + "value": { + "$id": "3249", + "tags": { + "$id": "3250", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "3251", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "3252", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "3253", + "kind": "boolean", + "type": { + "$ref": "1305" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3254", + "kind": "boolean", + "type": { + "$ref": "1309" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "3255", + "kind": "model", + "type": { + "$ref": "1317" + }, + "value": { + "$id": "3256", + "vmSizeProperties": { + "$id": "3257", + "kind": "model", + "type": { + "$ref": "1319" + }, + "value": { + "$id": "3258", + "vCPUsAvailable": { + "$id": "3259", + "kind": "number", + "type": { + "$ref": "1321" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "3260", + "kind": "number", + "type": { + "$ref": "1325" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "3261", + "kind": "model", + "type": { + "$ref": "1333" + }, + "value": { + "$id": "3262", + "id": { + "$id": "3263", + "kind": "string", + "type": { + "$ref": "1335" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "3264", + "kind": "model", + "type": { + "$ref": "1342" + }, + "value": { + "$id": "3265", + "id": { + "$id": "3266", + "kind": "string", + "type": { + "$ref": "1344" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "3267", + "kind": "array", + "type": { + "$ref": "1348" + }, + "value": [ + { + "$id": "3268", + "kind": "string", + "type": { + "$ref": "1349" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "3269", + "kind": "boolean", + "type": { + "$ref": "1353" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "3270", + "kind": "string", + "type": { + "$ref": "1359" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "3271", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "3272", + "kind": "number", + "type": { + "$ref": "1379" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "3273", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "3274", + "kind": "string", + "type": { + "$ref": "1402" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "3275", + "kind": "array", + "type": { + "$ref": "1408" + }, + "value": [ + { + "$id": "3276", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zone1" + }, + { + "$id": "3277", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "3278", + "kind": "model", + "type": { + "$ref": "1413" + }, + "value": { + "$id": "3279", + "principalId": { + "$id": "3280", + "kind": "string", + "type": { + "$ref": "1415" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "3281", + "kind": "string", + "type": { + "$ref": "1420" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "3282", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "3283", + "kind": "dict", + "type": { + "$ref": "1428" + }, + "value": { + "$id": "3284", + "key9851": { + "$id": "3285", + "kind": "model", + "type": { + "$ref": "1431" + }, + "value": { + "$id": "3286", + "principalId": { + "$id": "3287", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "3288", + "kind": "string", + "type": { + "$ref": "1433" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "tags": { + "$id": "3289", + "kind": "dict", + "type": { + "$ref": "396" + }, + "value": { + "$id": "3290", + "key3518": { + "$id": "3291", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "plan": { + "$id": "3292", + "kind": "model", + "type": { + "$ref": "1447" + }, + "value": { + "$id": "3293", + "name": { + "$id": "3294", + "kind": "string", + "type": { + "$ref": "1449" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "3295", + "kind": "string", + "type": { + "$ref": "1453" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "3296", + "kind": "string", + "type": { + "$ref": "1457" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "3297", + "kind": "string", + "type": { + "$ref": "1461" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "3298", + "kind": "string", + "type": { + "$ref": "1465" + }, + "value": "wa" + } + } + }, + "location": { + "$id": "3299", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "westus" + }, + "id": { + "$id": "3300", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "3301", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "testFleet" + }, + "type": { + "$id": "3302", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "3303", + "kind": "model", + "type": { + "$ref": "368" + }, + "value": { + "$id": "3304", + "createdBy": { + "$id": "3305", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "3306", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "3307", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "3308", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "3309", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3310", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + } + ] + }, + { + "$id": "3311", + "kind": "http", + "name": "Fleets_CreateOrUpdate_MinimumSet", + "description": "Fleets_CreateOrUpdate_MinimumSet", + "filePath": "2024-11-01/Fleets_CreateOrUpdate_MinimumSet.json", + "parameters": [ + { + "$id": "3312", + "parameter": { + "$ref": "2180" + }, + "value": { + "$id": "3313", + "kind": "string", + "type": { + "$ref": "2181" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3314", + "parameter": { + "$ref": "2184" + }, + "value": { + "$id": "3315", + "kind": "string", + "type": { + "$ref": "2185" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "3316", + "parameter": { + "$ref": "2187" + }, + "value": { + "$id": "3317", + "kind": "string", + "type": { + "$ref": "2188" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "3318", + "parameter": { + "$ref": "2189" + }, + "value": { + "$id": "3319", + "kind": "string", + "type": { + "$ref": "2190" + }, + "value": "testFleet" + } + }, + { + "$id": "3320", + "parameter": { + "$ref": "2197" + }, + "value": { + "$id": "3321", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "3322", + "properties": { + "$id": "3323", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "3324", + "spotPriorityProfile": { + "$id": "3325", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "3326", + "capacity": { + "$id": "3327", + "kind": "number", + "type": { + "$ref": "413" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3328", + "kind": "number", + "type": { + "$ref": "417" + }, + "value": 1 + }, + "evictionPolicy": { + "$id": "3329", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3330", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3331", + "kind": "boolean", + "type": { + "$ref": "431" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3332", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "3333", + "capacity": { + "$id": "3334", + "kind": "number", + "type": { + "$ref": "439" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3335", + "kind": "number", + "type": { + "$ref": "443" + }, + "value": 1 + }, + "allocationStrategy": { + "$id": "3336", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3337", + "kind": "array", + "type": { + "$ref": "452" + }, + "value": [ + { + "$id": "3338", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "3339", + "name": { + "$id": "3340", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_D2s_v3" + } + } + }, + { + "$id": "3341", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "3342", + "name": { + "$id": "3343", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_D4s_v3" + } + } + }, + { + "$id": "3344", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "3345", + "name": { + "$id": "3346", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_E2s_v3" + } + } + } + ] + }, + "computeProfile": { + "$id": "3347", + "kind": "model", + "type": { + "$ref": "1370" + }, + "value": { + "$id": "3348", + "baseVirtualMachineProfile": { + "$id": "3349", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "3350", + "storageProfile": { + "$id": "3351", + "kind": "model", + "type": { + "$ref": "757" + }, + "value": { + "$id": "3352", + "imageReference": { + "$id": "3353", + "kind": "model", + "type": { + "$ref": "759" + }, + "value": { + "$id": "3354", + "publisher": { + "$id": "3355", + "kind": "string", + "type": { + "$ref": "766" + }, + "value": "canonical" + }, + "offer": { + "$id": "3356", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "0001-com-ubuntu-server-focal" + }, + "sku": { + "$id": "3357", + "kind": "string", + "type": { + "$ref": "774" + }, + "value": "20_04-lts-gen2" + }, + "version": { + "$id": "3358", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "latest" + } + } + }, + "osDisk": { + "$id": "3359", + "kind": "model", + "type": { + "$ref": "796" + }, + "value": { + "$id": "3360", + "caching": { + "$id": "3361", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "ReadWrite" + }, + "createOption": { + "$id": "3362", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "osType": { + "$id": "3363", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Linux" + }, + "managedDisk": { + "$id": "3364", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3365", + "storageAccountType": { + "$id": "3366", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + } + } + } + } + } + } + }, + "osProfile": { + "$id": "3367", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "3368", + "computerNamePrefix": { + "$id": "3369", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "prefix" + }, + "adminUsername": { + "$id": "3370", + "kind": "string", + "type": { + "$ref": "573" + }, + "value": "azureuser" + }, + "adminPassword": { + "$id": "3371", + "kind": "string", + "type": { + "$ref": "577" + }, + "value": "TestPassword$0" + }, + "linuxConfiguration": { + "$id": "3372", + "kind": "model", + "type": { + "$ref": "666" + }, + "value": { + "$id": "3373", + "disablePasswordAuthentication": { + "$id": "3374", + "kind": "boolean", + "type": { + "$ref": "668" + }, + "value": false + } + } + } + } + }, + "networkProfile": { + "$id": "3375", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "3376", + "networkInterfaceConfigurations": { + "$id": "3377", + "kind": "array", + "type": { + "$ref": "930" + }, + "value": [ + { + "$id": "3378", + "kind": "model", + "type": { + "$ref": "931" + }, + "value": { + "$id": "3379", + "name": { + "$id": "3380", + "kind": "string", + "type": { + "$ref": "933" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3381", + "kind": "model", + "type": { + "$ref": "937" + }, + "value": { + "$id": "3382", + "primary": { + "$id": "3383", + "kind": "boolean", + "type": { + "$ref": "939" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3384", + "kind": "boolean", + "type": { + "$ref": "943" + }, + "value": false + }, + "ipConfigurations": { + "$id": "3385", + "kind": "array", + "type": { + "$ref": "967" + }, + "value": [ + { + "$id": "3386", + "kind": "model", + "type": { + "$ref": "968" + }, + "value": { + "$id": "3387", + "name": { + "$id": "3388", + "kind": "string", + "type": { + "$ref": "970" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3389", + "kind": "model", + "type": { + "$ref": "974" + }, + "value": { + "$id": "3390", + "subnet": { + "$id": "3391", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3392", + "id": { + "$id": "3393", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3394", + "kind": "boolean", + "type": { + "$ref": "979" + }, + "value": true + }, + "loadBalancerBackendAddressPools": { + "$id": "3395", + "kind": "array", + "type": { + "$ref": "1053" + }, + "value": [ + { + "$id": "3396", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3397", + "id": { + "$id": "3398", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3399", + "kind": "boolean", + "type": { + "$ref": "1065" + }, + "value": true + } + } + } + } + } + ] + } + } + } + } + }, + "computeApiVersion": { + "$id": "3400", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "2023-09-01" + }, + "platformFaultDomainCount": { + "$id": "3401", + "kind": "number", + "type": { + "$ref": "1379" + }, + "value": 1 + } + } + } + } + }, + "tags": { + "$id": "3402", + "kind": "dict", + "type": { + "$ref": "396" + }, + "value": { + "$id": "3403", + "key": { + "$id": "3404", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "fleets-test" + } + } + }, + "location": { + "$id": "3405", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "eastus2euap" + } + } + } + } + ], + "responses": [ + { + "$id": "3406", + "response": { + "$ref": "2198" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3407", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "3408", + "properties": { + "$id": "3409", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "3410", + "provisioningState": { + "$id": "3411", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + }, + "spotPriorityProfile": { + "$id": "3412", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "3413", + "capacity": { + "$id": "3414", + "kind": "number", + "type": { + "$ref": "413" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3415", + "kind": "number", + "type": { + "$ref": "417" + }, + "value": 1 + }, + "evictionPolicy": { + "$id": "3416", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3417", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3418", + "kind": "boolean", + "type": { + "$ref": "431" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3419", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "3420", + "capacity": { + "$id": "3421", + "kind": "number", + "type": { + "$ref": "439" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3422", + "kind": "number", + "type": { + "$ref": "443" + }, + "value": 1 + }, + "allocationStrategy": { + "$id": "3423", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3424", + "kind": "array", + "type": { + "$ref": "452" + }, + "value": [ + { + "$id": "3425", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "3426", + "name": { + "$id": "3427", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_D2s_v3" + } + } + }, + { + "$id": "3428", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "3429", + "name": { + "$id": "3430", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_D4s_v3" + } + } + }, + { + "$id": "3431", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "3432", + "name": { + "$id": "3433", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_E2s_v3" + } + } + } + ] + }, + "computeProfile": { + "$id": "3434", + "kind": "model", + "type": { + "$ref": "1370" + }, + "value": { + "$id": "3435", + "baseVirtualMachineProfile": { + "$id": "3436", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "3437", + "storageProfile": { + "$id": "3438", + "kind": "model", + "type": { + "$ref": "757" + }, + "value": { + "$id": "3439", + "imageReference": { + "$id": "3440", + "kind": "model", + "type": { + "$ref": "759" + }, + "value": { + "$id": "3441", + "publisher": { + "$id": "3442", + "kind": "string", + "type": { + "$ref": "766" + }, + "value": "canonical" + }, + "offer": { + "$id": "3443", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "0001-com-ubuntu-server-focal" + }, + "sku": { + "$id": "3444", + "kind": "string", + "type": { + "$ref": "774" + }, + "value": "20_04-lts-gen2" + }, + "version": { + "$id": "3445", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "latest" + } + } + }, + "osDisk": { + "$id": "3446", + "kind": "model", + "type": { + "$ref": "796" + }, + "value": { + "$id": "3447", + "caching": { + "$id": "3448", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "ReadWrite" + }, + "createOption": { + "$id": "3449", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "osType": { + "$id": "3450", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Linux" + }, + "managedDisk": { + "$id": "3451", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3452", + "storageAccountType": { + "$id": "3453", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + } + } + } + } + } + } + }, + "osProfile": { + "$id": "3454", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "3455", + "computerNamePrefix": { + "$id": "3456", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "prefix" + }, + "adminUsername": { + "$id": "3457", + "kind": "string", + "type": { + "$ref": "573" + }, + "value": "azureuser" + }, + "linuxConfiguration": { + "$id": "3458", + "kind": "model", + "type": { + "$ref": "666" + }, + "value": { + "$id": "3459", + "disablePasswordAuthentication": { + "$id": "3460", + "kind": "boolean", + "type": { + "$ref": "668" + }, + "value": false + } + } + } + } + }, + "networkProfile": { + "$id": "3461", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "3462", + "networkInterfaceConfigurations": { + "$id": "3463", + "kind": "array", + "type": { + "$ref": "930" + }, + "value": [ + { + "$id": "3464", + "kind": "model", + "type": { + "$ref": "931" + }, + "value": { + "$id": "3465", + "name": { + "$id": "3466", + "kind": "string", + "type": { + "$ref": "933" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3467", + "kind": "model", + "type": { + "$ref": "937" + }, + "value": { + "$id": "3468", + "primary": { + "$id": "3469", + "kind": "boolean", + "type": { + "$ref": "939" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3470", + "kind": "boolean", + "type": { + "$ref": "943" + }, + "value": false + }, + "ipConfigurations": { + "$id": "3471", + "kind": "array", + "type": { + "$ref": "967" + }, + "value": [ + { + "$id": "3472", + "kind": "model", + "type": { + "$ref": "968" + }, + "value": { + "$id": "3473", + "name": { + "$id": "3474", + "kind": "string", + "type": { + "$ref": "970" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3475", + "kind": "model", + "type": { + "$ref": "974" + }, + "value": { + "$id": "3476", + "subnet": { + "$id": "3477", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3478", + "id": { + "$id": "3479", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3480", + "kind": "boolean", + "type": { + "$ref": "979" + }, + "value": true + }, + "loadBalancerBackendAddressPools": { + "$id": "3481", + "kind": "array", + "type": { + "$ref": "1053" + }, + "value": [ + { + "$id": "3482", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3483", + "id": { + "$id": "3484", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3485", + "kind": "boolean", + "type": { + "$ref": "1065" + }, + "value": true + } + } + } + } + } + ] + } + } + } + } + }, + "computeApiVersion": { + "$id": "3486", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "2023-09-01" + }, + "platformFaultDomainCount": { + "$id": "3487", + "kind": "number", + "type": { + "$ref": "1379" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "3488", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "3489", + "kind": "string", + "type": { + "$ref": "1402" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "tags": { + "$id": "3490", + "kind": "dict", + "type": { + "$ref": "396" + }, + "value": { + "$id": "3491", + "key": { + "$id": "3492", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "fleets-test" + } + } + }, + "location": { + "$id": "3493", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "eastus2euap" + }, + "id": { + "$id": "3494", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "3495", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "testFleet" + }, + "type": { + "$id": "3496", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "Microsoft.AzureFleet/fleets" + } + } + } + }, + { + "$id": "3497", + "response": { + "$ref": "2199" + }, + "statusCode": 201, + "bodyValue": { + "$id": "3498", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "3499", + "properties": { + "$id": "3500", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "3501", + "provisioningState": { + "$id": "3502", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "3503", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "3504", + "capacity": { + "$id": "3505", + "kind": "number", + "type": { + "$ref": "413" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3506", + "kind": "number", + "type": { + "$ref": "417" + }, + "value": 1 + }, + "evictionPolicy": { + "$id": "3507", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3508", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3509", + "kind": "boolean", + "type": { + "$ref": "431" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3510", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "3511", + "capacity": { + "$id": "3512", + "kind": "number", + "type": { + "$ref": "439" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3513", + "kind": "number", + "type": { + "$ref": "443" + }, + "value": 1 + }, + "allocationStrategy": { + "$id": "3514", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3515", + "kind": "array", + "type": { + "$ref": "452" + }, + "value": [ + { + "$id": "3516", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "3517", + "name": { + "$id": "3518", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_D2s_v3" + } + } + }, + { + "$id": "3519", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "3520", + "name": { + "$id": "3521", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_D4s_v3" + } + } + }, + { + "$id": "3522", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "3523", + "name": { + "$id": "3524", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_E2s_v3" + } + } + } + ] + }, + "computeProfile": { + "$id": "3525", + "kind": "model", + "type": { + "$ref": "1370" + }, + "value": { + "$id": "3526", + "baseVirtualMachineProfile": { + "$id": "3527", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "3528", + "storageProfile": { + "$id": "3529", + "kind": "model", + "type": { + "$ref": "757" + }, + "value": { + "$id": "3530", + "imageReference": { + "$id": "3531", + "kind": "model", + "type": { + "$ref": "759" + }, + "value": { + "$id": "3532", + "publisher": { + "$id": "3533", + "kind": "string", + "type": { + "$ref": "766" + }, + "value": "canonical" + }, + "offer": { + "$id": "3534", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "0001-com-ubuntu-server-focal" + }, + "sku": { + "$id": "3535", + "kind": "string", + "type": { + "$ref": "774" + }, + "value": "20_04-lts-gen2" + }, + "version": { + "$id": "3536", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "latest" + } + } + }, + "osDisk": { + "$id": "3537", + "kind": "model", + "type": { + "$ref": "796" + }, + "value": { + "$id": "3538", + "caching": { + "$id": "3539", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "ReadWrite" + }, + "createOption": { + "$id": "3540", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "osType": { + "$id": "3541", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Linux" + }, + "managedDisk": { + "$id": "3542", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3543", + "storageAccountType": { + "$id": "3544", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + } + } + } + } + } + } + }, + "osProfile": { + "$id": "3545", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "3546", + "computerNamePrefix": { + "$id": "3547", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "prefix" + }, + "adminUsername": { + "$id": "3548", + "kind": "string", + "type": { + "$ref": "573" + }, + "value": "azureuser" + }, + "linuxConfiguration": { + "$id": "3549", + "kind": "model", + "type": { + "$ref": "666" + }, + "value": { + "$id": "3550", + "disablePasswordAuthentication": { + "$id": "3551", + "kind": "boolean", + "type": { + "$ref": "668" + }, + "value": false + } + } + } + } + }, + "networkProfile": { + "$id": "3552", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "3553", + "networkInterfaceConfigurations": { + "$id": "3554", + "kind": "array", + "type": { + "$ref": "930" + }, + "value": [ + { + "$id": "3555", + "kind": "model", + "type": { + "$ref": "931" + }, + "value": { + "$id": "3556", + "name": { + "$id": "3557", + "kind": "string", + "type": { + "$ref": "933" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3558", + "kind": "model", + "type": { + "$ref": "937" + }, + "value": { + "$id": "3559", + "primary": { + "$id": "3560", + "kind": "boolean", + "type": { + "$ref": "939" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3561", + "kind": "boolean", + "type": { + "$ref": "943" + }, + "value": false + }, + "ipConfigurations": { + "$id": "3562", + "kind": "array", + "type": { + "$ref": "967" + }, + "value": [ + { + "$id": "3563", + "kind": "model", + "type": { + "$ref": "968" + }, + "value": { + "$id": "3564", + "name": { + "$id": "3565", + "kind": "string", + "type": { + "$ref": "970" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3566", + "kind": "model", + "type": { + "$ref": "974" + }, + "value": { + "$id": "3567", + "subnet": { + "$id": "3568", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3569", + "id": { + "$id": "3570", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3571", + "kind": "boolean", + "type": { + "$ref": "979" + }, + "value": true + }, + "loadBalancerBackendAddressPools": { + "$id": "3572", + "kind": "array", + "type": { + "$ref": "1053" + }, + "value": [ + { + "$id": "3573", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3574", + "id": { + "$id": "3575", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3576", + "kind": "boolean", + "type": { + "$ref": "1065" + }, + "value": true + } + } + } + } + } + ] + } + } + } + } + }, + "computeApiVersion": { + "$id": "3577", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "2023-09-01" + }, + "platformFaultDomainCount": { + "$id": "3578", + "kind": "number", + "type": { + "$ref": "1379" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "3579", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "3580", + "kind": "string", + "type": { + "$ref": "1402" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "tags": { + "$id": "3581", + "kind": "dict", + "type": { + "$ref": "396" + }, + "value": { + "$id": "3582", + "key": { + "$id": "3583", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "fleets-test" + } + } + }, + "location": { + "$id": "3584", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "eastus2euap" + }, + "id": { + "$id": "3585", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "3586", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "testFleet" + }, + "type": { + "$id": "3587", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "Microsoft.AzureFleet/fleets" + } + } + } + } + ] + } + ] + }, + { + "$id": "3588", + "Name": "update", + "ResourceName": "Fleet", + "Doc": "Update a Fleet", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3589", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "3590", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3591", + "Type": { + "$id": "3592", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3593", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "3594", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3596", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "3597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3598", + "Name": "fleetName", + "NameInRequest": "fleetName", + "Doc": "The name of the Compute Fleet", + "Type": { + "$id": "3599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3600", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "3601", + "kind": "constant", + "valueType": { + "$id": "3602", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3603", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3604", + "kind": "constant", + "valueType": { + "$id": "3605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3606", + "Name": "properties", + "NameInRequest": "properties", + "Doc": "The resource properties to be updated.", + "Type": { + "$ref": "1504" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3607", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "350" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "3608", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "3609", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "3610", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "3611", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "3612", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "3613", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "3614", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "350" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.update", + "Decorators": [], + "Examples": [ + { + "$id": "3615", + "kind": "http", + "name": "Fleets_Update", + "description": "Fleets_Update", + "filePath": "2024-11-01/Fleets_Update.json", + "parameters": [ + { + "$id": "3616", + "parameter": { + "$ref": "3589" + }, + "value": { + "$id": "3617", + "kind": "string", + "type": { + "$ref": "3590" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3618", + "parameter": { + "$ref": "3593" + }, + "value": { + "$id": "3619", + "kind": "string", + "type": { + "$ref": "3594" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "3620", + "parameter": { + "$ref": "3596" + }, + "value": { + "$id": "3621", + "kind": "string", + "type": { + "$ref": "3597" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "3622", + "parameter": { + "$ref": "3598" + }, + "value": { + "$id": "3623", + "kind": "string", + "type": { + "$ref": "3599" + }, + "value": "testFleet" + } + }, + { + "$id": "3624", + "parameter": { + "$ref": "3606" + }, + "value": { + "$id": "3625", + "kind": "model", + "type": { + "$ref": "1504" + }, + "value": { + "$id": "3626", + "identity": { + "$id": "3627", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "3628", + "type": { + "$id": "3629", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "3630", + "kind": "dict", + "type": { + "$ref": "1517" + }, + "value": { + "$id": "3631" + } + } + } + }, + "tags": { + "$id": "3632", + "kind": "dict", + "type": { + "$ref": "1506" + }, + "value": { + "$id": "3633" + } + }, + "properties": { + "$id": "3634", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "3635", + "spotPriorityProfile": { + "$id": "3636", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "3637", + "capacity": { + "$id": "3638", + "kind": "number", + "type": { + "$ref": "413" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3639", + "kind": "number", + "type": { + "$ref": "417" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "3640", + "kind": "number", + "type": { + "$ref": "421" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "3641", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3642", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3643", + "kind": "boolean", + "type": { + "$ref": "431" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3644", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "3645", + "capacity": { + "$id": "3646", + "kind": "number", + "type": { + "$ref": "439" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3647", + "kind": "number", + "type": { + "$ref": "443" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "3648", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3649", + "kind": "array", + "type": { + "$ref": "452" + }, + "value": [ + { + "$id": "3650", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "3651", + "name": { + "$id": "3652", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "3653", + "kind": "number", + "type": { + "$ref": "459" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "3654", + "kind": "model", + "type": { + "$ref": "1370" + }, + "value": { + "$id": "3655", + "baseVirtualMachineProfile": { + "$id": "3656", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "3657", + "osProfile": { + "$id": "3658", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "3659", + "computerNamePrefix": { + "$id": "3660", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "o" + }, + "adminUsername": { + "$id": "3661", + "kind": "string", + "type": { + "$ref": "573" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "adminPassword": { + "$id": "3662", + "kind": "string", + "type": { + "$ref": "577" + }, + "value": "adfbrdxpv" + }, + "customData": { + "$id": "3663", + "kind": "string", + "type": { + "$ref": "581" + }, + "value": "xjjib" + }, + "windowsConfiguration": { + "$id": "3664", + "kind": "model", + "type": { + "$ref": "585" + }, + "value": { + "$id": "3665", + "provisionVMAgent": { + "$id": "3666", + "kind": "boolean", + "type": { + "$ref": "587" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "3667", + "kind": "boolean", + "type": { + "$ref": "591" + }, + "value": true + }, + "timeZone": { + "$id": "3668", + "kind": "string", + "type": { + "$ref": "595" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "3669", + "kind": "array", + "type": { + "$ref": "599" + }, + "value": [ + { + "$id": "3670", + "kind": "model", + "type": { + "$ref": "600" + }, + "value": { + "$id": "3671", + "passName": { + "$id": "3672", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "3673", + "kind": "string", + "type": { + "$ref": "606" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "3674", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + }, + "content": { + "$id": "3675", + "kind": "string", + "type": { + "$ref": "613" + }, + "value": "bubmqbxjkj" + } + } + } + ] + }, + "patchSettings": { + "$id": "3676", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "$id": "3677", + "patchMode": { + "$id": "3678", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "3679", + "kind": "boolean", + "type": { + "$ref": "624" + }, + "value": true + }, + "assessmentMode": { + "$id": "3680", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3681", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "3682", + "rebootSetting": { + "$id": "3683", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3684", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "3685", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "3686", + "listeners": { + "$id": "3687", + "kind": "array", + "type": { + "$ref": "646" + }, + "value": [ + { + "$id": "3688", + "kind": "model", + "type": { + "$ref": "647" + }, + "value": { + "$id": "3689", + "protocol": { + "$id": "3690", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "3691", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3692", + "kind": "boolean", + "type": { + "$ref": "660" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "3693", + "kind": "model", + "type": { + "$ref": "666" + }, + "value": { + "$id": "3694", + "disablePasswordAuthentication": { + "$id": "3695", + "kind": "boolean", + "type": { + "$ref": "668" + }, + "value": true + }, + "ssh": { + "$id": "3696", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "3697", + "publicKeys": { + "$id": "3698", + "kind": "array", + "type": { + "$ref": "674" + }, + "value": [ + { + "$id": "3699", + "kind": "model", + "type": { + "$ref": "675" + }, + "value": { + "$id": "3700", + "path": { + "$id": "3701", + "kind": "string", + "type": { + "$ref": "677" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "3702", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "3703", + "kind": "boolean", + "type": { + "$ref": "689" + }, + "value": true + }, + "patchSettings": { + "$id": "3704", + "kind": "model", + "type": { + "$ref": "693" + }, + "value": { + "$id": "3705", + "patchMode": { + "$id": "3706", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "3707", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3708", + "kind": "model", + "type": { + "$ref": "701" + }, + "value": { + "$id": "3709", + "rebootSetting": { + "$id": "3710", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3711", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3712", + "kind": "boolean", + "type": { + "$ref": "714" + }, + "value": true + } + } + }, + "secrets": { + "$id": "3713", + "kind": "array", + "type": { + "$ref": "720" + }, + "value": [ + { + "$id": "3714", + "kind": "model", + "type": { + "$ref": "721" + }, + "value": { + "$id": "3715", + "sourceVault": { + "$id": "3716", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3717", + "id": { + "$id": "3718", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "3719", + "kind": "array", + "type": { + "$ref": "732" + }, + "value": [ + { + "$id": "3720", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "3721", + "certificateUrl": { + "$id": "3722", + "kind": "string", + "type": { + "$ref": "735" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "3723", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "3724", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "3725", + "kind": "boolean", + "type": { + "$ref": "751" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "3726", + "kind": "model", + "type": { + "$ref": "757" + }, + "value": { + "$id": "3727", + "imageReference": { + "$id": "3728", + "kind": "model", + "type": { + "$ref": "759" + }, + "value": { + "$id": "3729", + "publisher": { + "$id": "3730", + "kind": "string", + "type": { + "$ref": "766" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "3731", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "3732", + "kind": "string", + "type": { + "$ref": "774" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "3733", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "sharedGalleryImageId": { + "$id": "3734", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "3735", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "vlqe" + }, + "id": { + "$id": "3736", + "kind": "string", + "type": { + "$ref": "761" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "3737", + "kind": "model", + "type": { + "$ref": "796" + }, + "value": { + "$id": "3738", + "name": { + "$id": "3739", + "kind": "string", + "type": { + "$ref": "798" + }, + "value": "wfttw" + }, + "caching": { + "$id": "3740", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3741", + "kind": "boolean", + "type": { + "$ref": "805" + }, + "value": true + }, + "createOption": { + "$id": "3742", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "3743", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "3744", + "option": { + "$id": "3745", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "3746", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "3747", + "kind": "number", + "type": { + "$ref": "822" + }, + "value": 14 + }, + "osType": { + "$id": "3748", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "3749", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "3750", + "uri": { + "$id": "3751", + "kind": "string", + "type": { + "$ref": "831" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "3752", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "3753", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "3754", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3755", + "storageAccountType": { + "$id": "3756", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3757", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "3758", + "id": { + "$id": "3759", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3760", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "3761", + "securityEncryptionType": { + "$id": "3762", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3763", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "3764", + "id": { + "$id": "3765", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "3766", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "3767", + "kind": "array", + "type": { + "$ref": "873" + }, + "value": [ + { + "$id": "3768", + "kind": "model", + "type": { + "$ref": "874" + }, + "value": { + "$id": "3769", + "name": { + "$id": "3770", + "kind": "string", + "type": { + "$ref": "876" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "3771", + "kind": "number", + "type": { + "$ref": "880" + }, + "value": 14 + }, + "caching": { + "$id": "3772", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3773", + "kind": "boolean", + "type": { + "$ref": "887" + }, + "value": true + }, + "createOption": { + "$id": "3774", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "3775", + "kind": "number", + "type": { + "$ref": "894" + }, + "value": 6 + }, + "managedDisk": { + "$id": "3776", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3777", + "storageAccountType": { + "$id": "3778", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3779", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "3780", + "id": { + "$id": "3781", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3782", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "3783", + "securityEncryptionType": { + "$id": "3784", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3785", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "3786", + "id": { + "$id": "3787", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "3788", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "3789", + "kind": "number", + "type": { + "$ref": "905" + }, + "value": 2 + }, + "deleteOption": { + "$id": "3790", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "3791", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "3792", + "healthProbe": { + "$id": "3793", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3794", + "id": { + "$id": "3795", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "3796", + "kind": "array", + "type": { + "$ref": "930" + }, + "value": [ + { + "$id": "3797", + "kind": "model", + "type": { + "$ref": "931" + }, + "value": { + "$id": "3798", + "name": { + "$id": "3799", + "kind": "string", + "type": { + "$ref": "933" + }, + "value": "i" + }, + "properties": { + "$id": "3800", + "kind": "model", + "type": { + "$ref": "937" + }, + "value": { + "$id": "3801", + "primary": { + "$id": "3802", + "kind": "boolean", + "type": { + "$ref": "939" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3803", + "kind": "boolean", + "type": { + "$ref": "943" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "3804", + "kind": "boolean", + "type": { + "$ref": "947" + }, + "value": true + }, + "enableFpga": { + "$id": "3805", + "kind": "boolean", + "type": { + "$ref": "951" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "3806", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3807", + "id": { + "$id": "3808", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "3809", + "kind": "model", + "type": { + "$ref": "958" + }, + "value": { + "$id": "3810", + "dnsServers": { + "$id": "3811", + "kind": "array", + "type": { + "$ref": "960" + }, + "value": [ + { + "$id": "3812", + "kind": "string", + "type": { + "$ref": "961" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "3813", + "kind": "array", + "type": { + "$ref": "967" + }, + "value": [ + { + "$id": "3814", + "kind": "model", + "type": { + "$ref": "968" + }, + "value": { + "$id": "3815", + "name": { + "$id": "3816", + "kind": "string", + "type": { + "$ref": "970" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "3817", + "kind": "model", + "type": { + "$ref": "974" + }, + "value": { + "$id": "3818", + "subnet": { + "$id": "3819", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3820", + "id": { + "$id": "3821", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3822", + "kind": "boolean", + "type": { + "$ref": "979" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "3823", + "kind": "model", + "type": { + "$ref": "983" + }, + "value": { + "$id": "3824", + "name": { + "$id": "3825", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "3826", + "kind": "model", + "type": { + "$ref": "989" + }, + "value": { + "$id": "3827", + "idleTimeoutInMinutes": { + "$id": "3828", + "kind": "number", + "type": { + "$ref": "991" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "3829", + "kind": "model", + "type": { + "$ref": "995" + }, + "value": { + "$id": "3830", + "domainNameLabel": { + "$id": "3831", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "3832", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "3833", + "kind": "array", + "type": { + "$ref": "1006" + }, + "value": [ + { + "$id": "3834", + "kind": "model", + "type": { + "$ref": "1007" + }, + "value": { + "$id": "3835", + "ipTagType": { + "$id": "3836", + "kind": "string", + "type": { + "$ref": "1009" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "3837", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "3838", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3839", + "id": { + "$id": "3840", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "3841", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "3842", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "3843", + "kind": "model", + "type": { + "$ref": "1030" + }, + "value": { + "$id": "3844", + "name": { + "$id": "3845", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "3846", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "3847", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "3848", + "kind": "array", + "type": { + "$ref": "1045" + }, + "value": [ + { + "$id": "3849", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3850", + "id": { + "$id": "3851", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "3852", + "kind": "array", + "type": { + "$ref": "1049" + }, + "value": [ + { + "$id": "3853", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3854", + "id": { + "$id": "3855", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "3856", + "kind": "array", + "type": { + "$ref": "1053" + }, + "value": [ + { + "$id": "3857", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3858", + "id": { + "$id": "3859", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "3860", + "kind": "array", + "type": { + "$ref": "1057" + }, + "value": [ + { + "$id": "3861", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3862", + "id": { + "$id": "3863", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3864", + "kind": "boolean", + "type": { + "$ref": "1065" + }, + "value": true + }, + "deleteOption": { + "$id": "3865", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "3866", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "3867", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3868", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "3869", + "kind": "model", + "type": { + "$ref": "1087" + }, + "value": { + "$id": "3870", + "uefiSettings": { + "$id": "3871", + "kind": "model", + "type": { + "$ref": "1089" + }, + "value": { + "$id": "3872", + "secureBootEnabled": { + "$id": "3873", + "kind": "boolean", + "type": { + "$ref": "1091" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "3874", + "kind": "boolean", + "type": { + "$ref": "1095" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "3875", + "kind": "boolean", + "type": { + "$ref": "1101" + }, + "value": true + }, + "securityType": { + "$id": "3876", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "3877", + "kind": "model", + "type": { + "$ref": "1108" + }, + "value": { + "$id": "3878", + "userAssignedIdentityResourceId": { + "$id": "3879", + "kind": "string", + "type": { + "$ref": "1110" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "3880", + "kind": "model", + "type": { + "$ref": "1117" + }, + "value": { + "$id": "3881", + "enabled": { + "$id": "3882", + "kind": "boolean", + "type": { + "$ref": "1119" + }, + "value": true + }, + "mode": { + "$id": "3883", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "3884", + "kind": "number", + "type": { + "$ref": "1126" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "3885", + "kind": "model", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "3886", + "bootDiagnostics": { + "$id": "3887", + "kind": "model", + "type": { + "$ref": "1136" + }, + "value": { + "$id": "3888", + "enabled": { + "$id": "3889", + "kind": "boolean", + "type": { + "$ref": "1138" + }, + "value": true + }, + "storageUri": { + "$id": "3890", + "kind": "string", + "type": { + "$ref": "1142" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "3891", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "3892", + "extensions": { + "$id": "3893", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "3894", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "3895", + "name": { + "$id": "3896", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "bndxuxx" + }, + "properties": { + "$id": "3897", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "3898", + "forceUpdateTag": { + "$id": "3899", + "kind": "string", + "type": { + "$ref": "1170" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "3900", + "kind": "string", + "type": { + "$ref": "1174" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "3901", + "kind": "string", + "type": { + "$ref": "1178" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "3902", + "kind": "string", + "type": { + "$ref": "1182" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "3903", + "kind": "boolean", + "type": { + "$ref": "1186" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3904", + "kind": "boolean", + "type": { + "$ref": "1190" + }, + "value": true + }, + "settings": { + "$id": "3905", + "kind": "dict", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "3906" + } + }, + "protectedSettings": { + "$id": "3907", + "kind": "dict", + "type": { + "$ref": "1200" + }, + "value": { + "$id": "3908" + } + }, + "provisionAfterExtensions": { + "$id": "3909", + "kind": "array", + "type": { + "$ref": "1210" + }, + "value": [ + { + "$id": "3910", + "kind": "string", + "type": { + "$ref": "1211" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "3911", + "kind": "boolean", + "type": { + "$ref": "1215" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "3912", + "kind": "model", + "type": { + "$ref": "1219" + }, + "value": { + "$id": "3913", + "secretUrl": { + "$id": "3914", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "3915", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3916", + "id": { + "$id": "3917", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "3918", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "3919", + "kind": "string", + "type": { + "$ref": "1240" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "3920", + "kind": "model", + "type": { + "$ref": "1244" + }, + "value": { + "$id": "3921", + "terminateNotificationProfile": { + "$id": "3922", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "3923", + "notBeforeTimeout": { + "$id": "3924", + "kind": "string", + "type": { + "$ref": "1248" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "3925", + "kind": "boolean", + "type": { + "$ref": "1252" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "3926", + "kind": "model", + "type": { + "$ref": "1258" + }, + "value": { + "$id": "3927", + "notBeforeTimeout": { + "$id": "3928", + "kind": "string", + "type": { + "$ref": "1260" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "3929", + "kind": "boolean", + "type": { + "$ref": "1264" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "3930", + "kind": "string", + "type": { + "$ref": "1272" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "3931", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "3932", + "capacityReservationGroup": { + "$id": "3933", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3934", + "id": { + "$id": "3935", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "3936", + "kind": "model", + "type": { + "$ref": "1283" + }, + "value": { + "$id": "3937", + "galleryApplications": { + "$id": "3938", + "kind": "array", + "type": { + "$ref": "1285" + }, + "value": [ + { + "$id": "3939", + "kind": "model", + "type": { + "$ref": "1286" + }, + "value": { + "$id": "3940", + "tags": { + "$id": "3941", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "3942", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "3943", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "configurationReference": { + "$id": "3944", + "kind": "string", + "type": { + "$ref": "1301" + }, + "value": "ulztmiavpojpbpbddgnuuiimxcpau" + }, + "treatFailureAsDeploymentFailure": { + "$id": "3945", + "kind": "boolean", + "type": { + "$ref": "1305" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3946", + "kind": "boolean", + "type": { + "$ref": "1309" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "3947", + "kind": "model", + "type": { + "$ref": "1317" + }, + "value": { + "$id": "3948", + "vmSizeProperties": { + "$id": "3949", + "kind": "model", + "type": { + "$ref": "1319" + }, + "value": { + "$id": "3950", + "vCPUsAvailable": { + "$id": "3951", + "kind": "number", + "type": { + "$ref": "1321" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "3952", + "kind": "number", + "type": { + "$ref": "1325" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "3953", + "kind": "model", + "type": { + "$ref": "1333" + }, + "value": { + "$id": "3954", + "id": { + "$id": "3955", + "kind": "string", + "type": { + "$ref": "1335" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "3956", + "kind": "model", + "type": { + "$ref": "1342" + }, + "value": { + "$id": "3957", + "id": { + "$id": "3958", + "kind": "string", + "type": { + "$ref": "1344" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "3959", + "kind": "array", + "type": { + "$ref": "1348" + }, + "value": [ + { + "$id": "3960", + "kind": "string", + "type": { + "$ref": "1349" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "3961", + "kind": "boolean", + "type": { + "$ref": "1353" + }, + "value": true + } + } + } + } + }, + "computeApiVersion": { + "$id": "3962", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "3963", + "kind": "number", + "type": { + "$ref": "1379" + }, + "value": 1 + } + } + } + } + }, + "plan": { + "$id": "3964", + "kind": "model", + "type": { + "$ref": "1524" + }, + "value": { + "$id": "3965", + "name": { + "$id": "3966", + "kind": "string", + "type": { + "$ref": "1526" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "3967", + "kind": "string", + "type": { + "$ref": "1530" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "3968", + "kind": "string", + "type": { + "$ref": "1534" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "3969", + "kind": "string", + "type": { + "$ref": "1538" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "3970", + "kind": "string", + "type": { + "$ref": "1542" + }, + "value": "wa" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "3971", + "response": { + "$ref": "3607" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3972", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "3973", + "properties": { + "$id": "3974", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "3975", + "spotPriorityProfile": { + "$id": "3976", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "3977", + "capacity": { + "$id": "3978", + "kind": "number", + "type": { + "$ref": "413" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3979", + "kind": "number", + "type": { + "$ref": "417" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "3980", + "kind": "number", + "type": { + "$ref": "421" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "3981", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3982", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3983", + "kind": "boolean", + "type": { + "$ref": "431" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3984", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "3985", + "capacity": { + "$id": "3986", + "kind": "number", + "type": { + "$ref": "439" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3987", + "kind": "number", + "type": { + "$ref": "443" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "3988", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3989", + "kind": "array", + "type": { + "$ref": "452" + }, + "value": [ + { + "$id": "3990", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "3991", + "name": { + "$id": "3992", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "3993", + "kind": "number", + "type": { + "$ref": "459" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "3994", + "kind": "model", + "type": { + "$ref": "1370" + }, + "value": { + "$id": "3995", + "baseVirtualMachineProfile": { + "$id": "3996", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "3997", + "osProfile": { + "$id": "3998", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "3999", + "computerNamePrefix": { + "$id": "4000", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "o" + }, + "adminUsername": { + "$id": "4001", + "kind": "string", + "type": { + "$ref": "573" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "4002", + "kind": "model", + "type": { + "$ref": "585" + }, + "value": { + "$id": "4003", + "provisionVMAgent": { + "$id": "4004", + "kind": "boolean", + "type": { + "$ref": "587" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "4005", + "kind": "boolean", + "type": { + "$ref": "591" + }, + "value": true + }, + "timeZone": { + "$id": "4006", + "kind": "string", + "type": { + "$ref": "595" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "4007", + "kind": "array", + "type": { + "$ref": "599" + }, + "value": [ + { + "$id": "4008", + "kind": "model", + "type": { + "$ref": "600" + }, + "value": { + "$id": "4009", + "passName": { + "$id": "4010", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "4011", + "kind": "string", + "type": { + "$ref": "606" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "4012", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "4013", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "$id": "4014", + "patchMode": { + "$id": "4015", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "4016", + "kind": "boolean", + "type": { + "$ref": "624" + }, + "value": true + }, + "assessmentMode": { + "$id": "4017", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4018", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "4019", + "rebootSetting": { + "$id": "4020", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4021", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "4022", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "4023", + "listeners": { + "$id": "4024", + "kind": "array", + "type": { + "$ref": "646" + }, + "value": [ + { + "$id": "4025", + "kind": "model", + "type": { + "$ref": "647" + }, + "value": { + "$id": "4026", + "protocol": { + "$id": "4027", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "4028", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4029", + "kind": "boolean", + "type": { + "$ref": "660" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "4030", + "kind": "model", + "type": { + "$ref": "666" + }, + "value": { + "$id": "4031", + "disablePasswordAuthentication": { + "$id": "4032", + "kind": "boolean", + "type": { + "$ref": "668" + }, + "value": true + }, + "ssh": { + "$id": "4033", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "4034", + "publicKeys": { + "$id": "4035", + "kind": "array", + "type": { + "$ref": "674" + }, + "value": [ + { + "$id": "4036", + "kind": "model", + "type": { + "$ref": "675" + }, + "value": { + "$id": "4037", + "path": { + "$id": "4038", + "kind": "string", + "type": { + "$ref": "677" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "4039", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "4040", + "kind": "boolean", + "type": { + "$ref": "689" + }, + "value": true + }, + "patchSettings": { + "$id": "4041", + "kind": "model", + "type": { + "$ref": "693" + }, + "value": { + "$id": "4042", + "patchMode": { + "$id": "4043", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "4044", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4045", + "kind": "model", + "type": { + "$ref": "701" + }, + "value": { + "$id": "4046", + "rebootSetting": { + "$id": "4047", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4048", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4049", + "kind": "boolean", + "type": { + "$ref": "714" + }, + "value": true + } + } + }, + "secrets": { + "$id": "4050", + "kind": "array", + "type": { + "$ref": "720" + }, + "value": [ + { + "$id": "4051", + "kind": "model", + "type": { + "$ref": "721" + }, + "value": { + "$id": "4052", + "sourceVault": { + "$id": "4053", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4054", + "id": { + "$id": "4055", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "4056", + "kind": "array", + "type": { + "$ref": "732" + }, + "value": [ + { + "$id": "4057", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "4058", + "certificateUrl": { + "$id": "4059", + "kind": "string", + "type": { + "$ref": "735" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "4060", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "4061", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "4062", + "kind": "boolean", + "type": { + "$ref": "751" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "4063", + "kind": "model", + "type": { + "$ref": "757" + }, + "value": { + "$id": "4064", + "imageReference": { + "$id": "4065", + "kind": "model", + "type": { + "$ref": "759" + }, + "value": { + "$id": "4066", + "publisher": { + "$id": "4067", + "kind": "string", + "type": { + "$ref": "766" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "4068", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "4069", + "kind": "string", + "type": { + "$ref": "774" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "4070", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "sharedGalleryImageId": { + "$id": "4071", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "4072", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "vlqe" + }, + "id": { + "$id": "4073", + "kind": "string", + "type": { + "$ref": "761" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + }, + "exactVersion": { + "$id": "4074", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "zjbntmiskjexlr" + } + } + }, + "osDisk": { + "$id": "4075", + "kind": "model", + "type": { + "$ref": "796" + }, + "value": { + "$id": "4076", + "name": { + "$id": "4077", + "kind": "string", + "type": { + "$ref": "798" + }, + "value": "wfttw" + }, + "caching": { + "$id": "4078", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4079", + "kind": "boolean", + "type": { + "$ref": "805" + }, + "value": true + }, + "createOption": { + "$id": "4080", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "4081", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "4082", + "option": { + "$id": "4083", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "4084", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "4085", + "kind": "number", + "type": { + "$ref": "822" + }, + "value": 14 + }, + "osType": { + "$id": "4086", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "4087", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "4088", + "uri": { + "$id": "4089", + "kind": "string", + "type": { + "$ref": "831" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "4090", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "4091", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "4092", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "4093", + "storageAccountType": { + "$id": "4094", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4095", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "4096", + "id": { + "$id": "4097", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4098", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "4099", + "securityEncryptionType": { + "$id": "4100", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4101", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "4102", + "id": { + "$id": "4103", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "4104", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "4105", + "kind": "array", + "type": { + "$ref": "873" + }, + "value": [ + { + "$id": "4106", + "kind": "model", + "type": { + "$ref": "874" + }, + "value": { + "$id": "4107", + "name": { + "$id": "4108", + "kind": "string", + "type": { + "$ref": "876" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "4109", + "kind": "number", + "type": { + "$ref": "880" + }, + "value": 14 + }, + "caching": { + "$id": "4110", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4111", + "kind": "boolean", + "type": { + "$ref": "887" + }, + "value": true + }, + "createOption": { + "$id": "4112", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "4113", + "kind": "number", + "type": { + "$ref": "894" + }, + "value": 6 + }, + "managedDisk": { + "$id": "4114", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "4115", + "storageAccountType": { + "$id": "4116", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4117", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "4118", + "id": { + "$id": "4119", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4120", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "4121", + "securityEncryptionType": { + "$id": "4122", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4123", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "4124", + "id": { + "$id": "4125", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "4126", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "4127", + "kind": "number", + "type": { + "$ref": "905" + }, + "value": 2 + }, + "deleteOption": { + "$id": "4128", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "4129", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "4130", + "healthProbe": { + "$id": "4131", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4132", + "id": { + "$id": "4133", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "4134", + "kind": "array", + "type": { + "$ref": "930" + }, + "value": [ + { + "$id": "4135", + "kind": "model", + "type": { + "$ref": "931" + }, + "value": { + "$id": "4136", + "name": { + "$id": "4137", + "kind": "string", + "type": { + "$ref": "933" + }, + "value": "i" + }, + "properties": { + "$id": "4138", + "kind": "model", + "type": { + "$ref": "937" + }, + "value": { + "$id": "4139", + "primary": { + "$id": "4140", + "kind": "boolean", + "type": { + "$ref": "939" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "4141", + "kind": "boolean", + "type": { + "$ref": "943" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "4142", + "kind": "boolean", + "type": { + "$ref": "947" + }, + "value": true + }, + "enableFpga": { + "$id": "4143", + "kind": "boolean", + "type": { + "$ref": "951" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "4144", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4145", + "id": { + "$id": "4146", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "4147", + "kind": "model", + "type": { + "$ref": "958" + }, + "value": { + "$id": "4148", + "dnsServers": { + "$id": "4149", + "kind": "array", + "type": { + "$ref": "960" + }, + "value": [ + { + "$id": "4150", + "kind": "string", + "type": { + "$ref": "961" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "4151", + "kind": "array", + "type": { + "$ref": "967" + }, + "value": [ + { + "$id": "4152", + "kind": "model", + "type": { + "$ref": "968" + }, + "value": { + "$id": "4153", + "name": { + "$id": "4154", + "kind": "string", + "type": { + "$ref": "970" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "4155", + "kind": "model", + "type": { + "$ref": "974" + }, + "value": { + "$id": "4156", + "subnet": { + "$id": "4157", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4158", + "id": { + "$id": "4159", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "4160", + "kind": "boolean", + "type": { + "$ref": "979" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "4161", + "kind": "model", + "type": { + "$ref": "983" + }, + "value": { + "$id": "4162", + "name": { + "$id": "4163", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "4164", + "kind": "model", + "type": { + "$ref": "989" + }, + "value": { + "$id": "4165", + "idleTimeoutInMinutes": { + "$id": "4166", + "kind": "number", + "type": { + "$ref": "991" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "4167", + "kind": "model", + "type": { + "$ref": "995" + }, + "value": { + "$id": "4168", + "domainNameLabel": { + "$id": "4169", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "4170", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "4171", + "kind": "array", + "type": { + "$ref": "1006" + }, + "value": [ + { + "$id": "4172", + "kind": "model", + "type": { + "$ref": "1007" + }, + "value": { + "$id": "4173", + "ipTagType": { + "$id": "4174", + "kind": "string", + "type": { + "$ref": "1009" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "4175", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "4176", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4177", + "id": { + "$id": "4178", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "4179", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "4180", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "4181", + "kind": "model", + "type": { + "$ref": "1030" + }, + "value": { + "$id": "4182", + "name": { + "$id": "4183", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "4184", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "4185", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "4186", + "kind": "array", + "type": { + "$ref": "1045" + }, + "value": [ + { + "$id": "4187", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4188", + "id": { + "$id": "4189", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "4190", + "kind": "array", + "type": { + "$ref": "1049" + }, + "value": [ + { + "$id": "4191", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4192", + "id": { + "$id": "4193", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "4194", + "kind": "array", + "type": { + "$ref": "1053" + }, + "value": [ + { + "$id": "4195", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4196", + "id": { + "$id": "4197", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "4198", + "kind": "array", + "type": { + "$ref": "1057" + }, + "value": [ + { + "$id": "4199", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4200", + "id": { + "$id": "4201", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "4202", + "kind": "boolean", + "type": { + "$ref": "1065" + }, + "value": true + }, + "deleteOption": { + "$id": "4203", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "4204", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "4205", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "4206", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "4207", + "kind": "model", + "type": { + "$ref": "1087" + }, + "value": { + "$id": "4208", + "uefiSettings": { + "$id": "4209", + "kind": "model", + "type": { + "$ref": "1089" + }, + "value": { + "$id": "4210", + "secureBootEnabled": { + "$id": "4211", + "kind": "boolean", + "type": { + "$ref": "1091" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "4212", + "kind": "boolean", + "type": { + "$ref": "1095" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "4213", + "kind": "boolean", + "type": { + "$ref": "1101" + }, + "value": true + }, + "securityType": { + "$id": "4214", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "4215", + "kind": "model", + "type": { + "$ref": "1108" + }, + "value": { + "$id": "4216", + "userAssignedIdentityResourceId": { + "$id": "4217", + "kind": "string", + "type": { + "$ref": "1110" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "4218", + "kind": "model", + "type": { + "$ref": "1117" + }, + "value": { + "$id": "4219", + "enabled": { + "$id": "4220", + "kind": "boolean", + "type": { + "$ref": "1119" + }, + "value": true + }, + "mode": { + "$id": "4221", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "4222", + "kind": "number", + "type": { + "$ref": "1126" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "4223", + "kind": "model", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "4224", + "bootDiagnostics": { + "$id": "4225", + "kind": "model", + "type": { + "$ref": "1136" + }, + "value": { + "$id": "4226", + "enabled": { + "$id": "4227", + "kind": "boolean", + "type": { + "$ref": "1138" + }, + "value": true + }, + "storageUri": { + "$id": "4228", + "kind": "string", + "type": { + "$ref": "1142" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "4229", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4230", + "extensions": { + "$id": "4231", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "4232", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "4233", + "name": { + "$id": "4234", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "bndxuxx" + }, + "properties": { + "$id": "4235", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "4236", + "forceUpdateTag": { + "$id": "4237", + "kind": "string", + "type": { + "$ref": "1170" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "4238", + "kind": "string", + "type": { + "$ref": "1174" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "4239", + "kind": "string", + "type": { + "$ref": "1178" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "4240", + "kind": "string", + "type": { + "$ref": "1182" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "4241", + "kind": "boolean", + "type": { + "$ref": "1186" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4242", + "kind": "boolean", + "type": { + "$ref": "1190" + }, + "value": true + }, + "provisionAfterExtensions": { + "$id": "4243", + "kind": "array", + "type": { + "$ref": "1210" + }, + "value": [ + { + "$id": "4244", + "kind": "string", + "type": { + "$ref": "1211" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "4245", + "kind": "boolean", + "type": { + "$ref": "1215" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "4246", + "kind": "model", + "type": { + "$ref": "1219" + }, + "value": { + "$id": "4247", + "secretUrl": { + "$id": "4248", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "4249", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4250", + "id": { + "$id": "4251", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + }, + "settings": { + "$id": "4252", + "kind": "dict", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "4253" + } + }, + "provisioningState": { + "$id": "4254", + "kind": "string", + "type": { + "$ref": "1206" + }, + "value": "Succeeded" + } + } + }, + "type": { + "$id": "4255", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "cmeam" + }, + "id": { + "$id": "4256", + "kind": "string", + "type": { + "$ref": "1155" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "4257", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "4258", + "kind": "string", + "type": { + "$ref": "1240" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "4259", + "kind": "model", + "type": { + "$ref": "1244" + }, + "value": { + "$id": "4260", + "terminateNotificationProfile": { + "$id": "4261", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "4262", + "notBeforeTimeout": { + "$id": "4263", + "kind": "string", + "type": { + "$ref": "1248" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "4264", + "kind": "boolean", + "type": { + "$ref": "1252" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "4265", + "kind": "model", + "type": { + "$ref": "1258" + }, + "value": { + "$id": "4266", + "notBeforeTimeout": { + "$id": "4267", + "kind": "string", + "type": { + "$ref": "1260" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "4268", + "kind": "boolean", + "type": { + "$ref": "1264" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "4269", + "kind": "string", + "type": { + "$ref": "1272" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "4270", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "4271", + "capacityReservationGroup": { + "$id": "4272", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4273", + "id": { + "$id": "4274", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "4275", + "kind": "model", + "type": { + "$ref": "1283" + }, + "value": { + "$id": "4276", + "galleryApplications": { + "$id": "4277", + "kind": "array", + "type": { + "$ref": "1285" + }, + "value": [ + { + "$id": "4278", + "kind": "model", + "type": { + "$ref": "1286" + }, + "value": { + "$id": "4279", + "tags": { + "$id": "4280", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "4281", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "4282", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "4283", + "kind": "boolean", + "type": { + "$ref": "1305" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4284", + "kind": "boolean", + "type": { + "$ref": "1309" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "4285", + "kind": "model", + "type": { + "$ref": "1317" + }, + "value": { + "$id": "4286", + "vmSizeProperties": { + "$id": "4287", + "kind": "model", + "type": { + "$ref": "1319" + }, + "value": { + "$id": "4288", + "vCPUsAvailable": { + "$id": "4289", + "kind": "number", + "type": { + "$ref": "1321" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "4290", + "kind": "number", + "type": { + "$ref": "1325" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "4291", + "kind": "model", + "type": { + "$ref": "1333" + }, + "value": { + "$id": "4292", + "id": { + "$id": "4293", + "kind": "string", + "type": { + "$ref": "1335" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "4294", + "kind": "model", + "type": { + "$ref": "1342" + }, + "value": { + "$id": "4295", + "id": { + "$id": "4296", + "kind": "string", + "type": { + "$ref": "1344" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "4297", + "kind": "array", + "type": { + "$ref": "1348" + }, + "value": [ + { + "$id": "4298", + "kind": "string", + "type": { + "$ref": "1349" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "4299", + "kind": "boolean", + "type": { + "$ref": "1353" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "4300", + "kind": "string", + "type": { + "$ref": "1359" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "4301", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "4302", + "kind": "number", + "type": { + "$ref": "1379" + }, + "value": 1 + } + } + }, + "provisioningState": { + "$id": "4303", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "timeCreated": { + "$id": "4304", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "4305", + "kind": "string", + "type": { + "$ref": "1402" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "4306", + "kind": "array", + "type": { + "$ref": "1408" + }, + "value": [ + { + "$id": "4307", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zone1" + }, + { + "$id": "4308", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "4309", + "kind": "model", + "type": { + "$ref": "1413" + }, + "value": { + "$id": "4310", + "type": { + "$id": "4311", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "4312", + "kind": "dict", + "type": { + "$ref": "1428" + }, + "value": { + "$id": "4313" + } + }, + "principalId": { + "$id": "4314", + "kind": "string", + "type": { + "$ref": "1415" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "4315", + "kind": "string", + "type": { + "$ref": "1420" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + }, + "tags": { + "$id": "4316", + "kind": "dict", + "type": { + "$ref": "396" + }, + "value": { + "$id": "4317" + } + }, + "location": { + "$id": "4318", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "westus" + }, + "plan": { + "$id": "4319", + "kind": "model", + "type": { + "$ref": "1447" + }, + "value": { + "$id": "4320", + "name": { + "$id": "4321", + "kind": "string", + "type": { + "$ref": "1449" + }, + "value": "uapfngmdekvpgjhomthtpxjfdmmll" + }, + "publisher": { + "$id": "4322", + "kind": "string", + "type": { + "$ref": "1453" + }, + "value": "aqhles" + }, + "product": { + "$id": "4323", + "kind": "string", + "type": { + "$ref": "1457" + }, + "value": "bfzbkdnbexmedxdc" + }, + "promotionCode": { + "$id": "4324", + "kind": "string", + "type": { + "$ref": "1461" + }, + "value": "gspehogwfjxirz" + }, + "version": { + "$id": "4325", + "kind": "string", + "type": { + "$ref": "1465" + }, + "value": "yza" + } + } + }, + "id": { + "$id": "4326", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "4327", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "testFleet" + }, + "type": { + "$id": "4328", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "4329", + "kind": "model", + "type": { + "$ref": "368" + }, + "value": { + "$id": "4330", + "createdBy": { + "$id": "4331", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "4332", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "4333", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "4334", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "4335", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4336", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + }, + { + "$id": "4337", + "response": { + "$ref": "3608" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "4338", + "Name": "delete", + "ResourceName": "Fleet", + "Doc": "Delete a Fleet", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4339", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "4340", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "4341", + "Type": { + "$id": "4342", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4343", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "4344", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4346", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "4347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4348", + "Name": "fleetName", + "NameInRequest": "fleetName", + "Doc": "The name of the Compute Fleet", + "Type": { + "$id": "4349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4350", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4351", + "kind": "constant", + "valueType": { + "$id": "4352", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4353", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "4354", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "4355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "4356", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "4357", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "4358", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}", + "BufferResponse": true, + "LongRunning": { + "$id": "4359", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "4360", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.delete", + "Decorators": [], + "Examples": [ + { + "$id": "4361", + "kind": "http", + "name": "Fleets_Delete", + "description": "Fleets_Delete", + "filePath": "2024-11-01/Fleets_Delete.json", + "parameters": [ + { + "$id": "4362", + "parameter": { + "$ref": "4339" + }, + "value": { + "$id": "4363", + "kind": "string", + "type": { + "$ref": "4340" + }, + "value": "2024-11-01" + } + }, + { + "$id": "4364", + "parameter": { + "$ref": "4343" + }, + "value": { + "$id": "4365", + "kind": "string", + "type": { + "$ref": "4344" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "4366", + "parameter": { + "$ref": "4346" + }, + "value": { + "$id": "4367", + "kind": "string", + "type": { + "$ref": "4347" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "4368", + "parameter": { + "$ref": "4348" + }, + "value": { + "$id": "4369", + "kind": "string", + "type": { + "$ref": "4349" + }, + "value": "testFleet" + } + } + ], + "responses": [ + { + "$id": "4370", + "response": { + "$ref": "4353" + }, + "statusCode": 202 + }, + { + "$id": "4371", + "response": { + "$ref": "4358" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "4372", + "Name": "listByResourceGroup", + "ResourceName": "Fleet", + "Doc": "List Fleet resources by resource group", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4373", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "4374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "4375", + "Type": { + "$id": "4376", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4377", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "4378", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4379", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4380", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "4381", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4382", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4383", + "kind": "constant", + "valueType": { + "$id": "4384", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4385", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1575" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets", + "BufferResponse": true, + "Paging": { + "$id": "4386", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "4387", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "4388", + "kind": "http", + "name": "Fleets_ListByResourceGroup", + "description": "Fleets_ListByResourceGroup", + "filePath": "2024-11-01/Fleets_ListByResourceGroup.json", + "parameters": [ + { + "$id": "4389", + "parameter": { + "$ref": "4373" + }, + "value": { + "$id": "4390", + "kind": "string", + "type": { + "$ref": "4374" + }, + "value": "2024-11-01" + } + }, + { + "$id": "4391", + "parameter": { + "$ref": "4377" + }, + "value": { + "$id": "4392", + "kind": "string", + "type": { + "$ref": "4378" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "4393", + "parameter": { + "$ref": "4380" + }, + "value": { + "$id": "4394", + "kind": "string", + "type": { + "$ref": "4381" + }, + "value": "rgazurefleet" + } + } + ], + "responses": [ + { + "$id": "4395", + "response": { + "$ref": "4385" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4396", + "kind": "model", + "type": { + "$ref": "1575" + }, + "value": { + "$id": "4397", + "value": { + "$id": "4398", + "kind": "array", + "type": { + "$ref": "1577" + }, + "value": [ + { + "$id": "4399", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "4400", + "properties": { + "$id": "4401", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "4402", + "provisioningState": { + "$id": "4403", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "4404", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "4405", + "capacity": { + "$id": "4406", + "kind": "number", + "type": { + "$ref": "413" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4407", + "kind": "number", + "type": { + "$ref": "417" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "4408", + "kind": "number", + "type": { + "$ref": "421" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "4409", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "4410", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "4411", + "kind": "boolean", + "type": { + "$ref": "431" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "4412", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "4413", + "capacity": { + "$id": "4414", + "kind": "number", + "type": { + "$ref": "439" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4415", + "kind": "number", + "type": { + "$ref": "443" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "4416", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "4417", + "kind": "array", + "type": { + "$ref": "452" + }, + "value": [ + { + "$id": "4418", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "4419", + "name": { + "$id": "4420", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "4421", + "kind": "number", + "type": { + "$ref": "459" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "4422", + "kind": "model", + "type": { + "$ref": "1370" + }, + "value": { + "$id": "4423", + "baseVirtualMachineProfile": { + "$id": "4424", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "4425", + "osProfile": { + "$id": "4426", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "4427", + "computerNamePrefix": { + "$id": "4428", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "o" + }, + "adminUsername": { + "$id": "4429", + "kind": "string", + "type": { + "$ref": "573" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "4430", + "kind": "model", + "type": { + "$ref": "585" + }, + "value": { + "$id": "4431", + "provisionVMAgent": { + "$id": "4432", + "kind": "boolean", + "type": { + "$ref": "587" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "4433", + "kind": "boolean", + "type": { + "$ref": "591" + }, + "value": true + }, + "timeZone": { + "$id": "4434", + "kind": "string", + "type": { + "$ref": "595" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "4435", + "kind": "array", + "type": { + "$ref": "599" + }, + "value": [ + { + "$id": "4436", + "kind": "model", + "type": { + "$ref": "600" + }, + "value": { + "$id": "4437", + "passName": { + "$id": "4438", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "4439", + "kind": "string", + "type": { + "$ref": "606" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "4440", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "4441", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "$id": "4442", + "patchMode": { + "$id": "4443", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "4444", + "kind": "boolean", + "type": { + "$ref": "624" + }, + "value": true + }, + "assessmentMode": { + "$id": "4445", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4446", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "4447", + "rebootSetting": { + "$id": "4448", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4449", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "4450", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "4451", + "listeners": { + "$id": "4452", + "kind": "array", + "type": { + "$ref": "646" + }, + "value": [ + { + "$id": "4453", + "kind": "model", + "type": { + "$ref": "647" + }, + "value": { + "$id": "4454", + "protocol": { + "$id": "4455", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "4456", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4457", + "kind": "boolean", + "type": { + "$ref": "660" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "4458", + "kind": "model", + "type": { + "$ref": "666" + }, + "value": { + "$id": "4459", + "disablePasswordAuthentication": { + "$id": "4460", + "kind": "boolean", + "type": { + "$ref": "668" + }, + "value": true + }, + "ssh": { + "$id": "4461", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "4462", + "publicKeys": { + "$id": "4463", + "kind": "array", + "type": { + "$ref": "674" + }, + "value": [ + { + "$id": "4464", + "kind": "model", + "type": { + "$ref": "675" + }, + "value": { + "$id": "4465", + "path": { + "$id": "4466", + "kind": "string", + "type": { + "$ref": "677" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "4467", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "4468", + "kind": "boolean", + "type": { + "$ref": "689" + }, + "value": true + }, + "patchSettings": { + "$id": "4469", + "kind": "model", + "type": { + "$ref": "693" + }, + "value": { + "$id": "4470", + "patchMode": { + "$id": "4471", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "4472", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4473", + "kind": "model", + "type": { + "$ref": "701" + }, + "value": { + "$id": "4474", + "rebootSetting": { + "$id": "4475", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4476", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4477", + "kind": "boolean", + "type": { + "$ref": "714" + }, + "value": true + } + } + }, + "secrets": { + "$id": "4478", + "kind": "array", + "type": { + "$ref": "720" + }, + "value": [ + { + "$id": "4479", + "kind": "model", + "type": { + "$ref": "721" + }, + "value": { + "$id": "4480", + "sourceVault": { + "$id": "4481", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4482", + "id": { + "$id": "4483", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "4484", + "kind": "array", + "type": { + "$ref": "732" + }, + "value": [ + { + "$id": "4485", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "4486", + "certificateUrl": { + "$id": "4487", + "kind": "string", + "type": { + "$ref": "735" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "4488", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "4489", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "4490", + "kind": "boolean", + "type": { + "$ref": "751" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "4491", + "kind": "model", + "type": { + "$ref": "757" + }, + "value": { + "$id": "4492", + "imageReference": { + "$id": "4493", + "kind": "model", + "type": { + "$ref": "759" + }, + "value": { + "$id": "4494", + "publisher": { + "$id": "4495", + "kind": "string", + "type": { + "$ref": "766" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "4496", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "4497", + "kind": "string", + "type": { + "$ref": "774" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "4498", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "4499", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "4500", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "4501", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "vlqe" + }, + "id": { + "$id": "4502", + "kind": "string", + "type": { + "$ref": "761" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "4503", + "kind": "model", + "type": { + "$ref": "796" + }, + "value": { + "$id": "4504", + "name": { + "$id": "4505", + "kind": "string", + "type": { + "$ref": "798" + }, + "value": "wfttw" + }, + "caching": { + "$id": "4506", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4507", + "kind": "boolean", + "type": { + "$ref": "805" + }, + "value": true + }, + "createOption": { + "$id": "4508", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "4509", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "4510", + "option": { + "$id": "4511", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "4512", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "4513", + "kind": "number", + "type": { + "$ref": "822" + }, + "value": 14 + }, + "osType": { + "$id": "4514", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "4515", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "4516", + "uri": { + "$id": "4517", + "kind": "string", + "type": { + "$ref": "831" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "4518", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "4519", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "4520", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "4521", + "storageAccountType": { + "$id": "4522", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4523", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "4524", + "id": { + "$id": "4525", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4526", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "4527", + "securityEncryptionType": { + "$id": "4528", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4529", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "4530", + "id": { + "$id": "4531", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "4532", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "4533", + "kind": "array", + "type": { + "$ref": "873" + }, + "value": [ + { + "$id": "4534", + "kind": "model", + "type": { + "$ref": "874" + }, + "value": { + "$id": "4535", + "name": { + "$id": "4536", + "kind": "string", + "type": { + "$ref": "876" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "4537", + "kind": "number", + "type": { + "$ref": "880" + }, + "value": 14 + }, + "caching": { + "$id": "4538", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4539", + "kind": "boolean", + "type": { + "$ref": "887" + }, + "value": true + }, + "createOption": { + "$id": "4540", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "4541", + "kind": "number", + "type": { + "$ref": "894" + }, + "value": 6 + }, + "managedDisk": { + "$id": "4542", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "4543", + "storageAccountType": { + "$id": "4544", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4545", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "4546", + "id": { + "$id": "4547", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4548", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "4549", + "securityEncryptionType": { + "$id": "4550", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4551", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "4552", + "id": { + "$id": "4553", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "4554", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "4555", + "kind": "number", + "type": { + "$ref": "905" + }, + "value": 2 + }, + "deleteOption": { + "$id": "4556", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "4557", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "4558", + "healthProbe": { + "$id": "4559", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4560", + "id": { + "$id": "4561", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "4562", + "kind": "array", + "type": { + "$ref": "930" + }, + "value": [ + { + "$id": "4563", + "kind": "model", + "type": { + "$ref": "931" + }, + "value": { + "$id": "4564", + "name": { + "$id": "4565", + "kind": "string", + "type": { + "$ref": "933" + }, + "value": "i" + }, + "properties": { + "$id": "4566", + "kind": "model", + "type": { + "$ref": "937" + }, + "value": { + "$id": "4567", + "primary": { + "$id": "4568", + "kind": "boolean", + "type": { + "$ref": "939" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "4569", + "kind": "boolean", + "type": { + "$ref": "943" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "4570", + "kind": "boolean", + "type": { + "$ref": "947" + }, + "value": true + }, + "enableFpga": { + "$id": "4571", + "kind": "boolean", + "type": { + "$ref": "951" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "4572", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4573", + "id": { + "$id": "4574", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "4575", + "kind": "model", + "type": { + "$ref": "958" + }, + "value": { + "$id": "4576", + "dnsServers": { + "$id": "4577", + "kind": "array", + "type": { + "$ref": "960" + }, + "value": [ + { + "$id": "4578", + "kind": "string", + "type": { + "$ref": "961" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "4579", + "kind": "array", + "type": { + "$ref": "967" + }, + "value": [ + { + "$id": "4580", + "kind": "model", + "type": { + "$ref": "968" + }, + "value": { + "$id": "4581", + "name": { + "$id": "4582", + "kind": "string", + "type": { + "$ref": "970" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "4583", + "kind": "model", + "type": { + "$ref": "974" + }, + "value": { + "$id": "4584", + "subnet": { + "$id": "4585", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4586", + "id": { + "$id": "4587", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "4588", + "kind": "boolean", + "type": { + "$ref": "979" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "4589", + "kind": "model", + "type": { + "$ref": "983" + }, + "value": { + "$id": "4590", + "name": { + "$id": "4591", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "4592", + "kind": "model", + "type": { + "$ref": "989" + }, + "value": { + "$id": "4593", + "idleTimeoutInMinutes": { + "$id": "4594", + "kind": "number", + "type": { + "$ref": "991" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "4595", + "kind": "model", + "type": { + "$ref": "995" + }, + "value": { + "$id": "4596", + "domainNameLabel": { + "$id": "4597", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "4598", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "4599", + "kind": "array", + "type": { + "$ref": "1006" + }, + "value": [ + { + "$id": "4600", + "kind": "model", + "type": { + "$ref": "1007" + }, + "value": { + "$id": "4601", + "ipTagType": { + "$id": "4602", + "kind": "string", + "type": { + "$ref": "1009" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "4603", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "4604", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4605", + "id": { + "$id": "4606", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "4607", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "4608", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "4609", + "kind": "model", + "type": { + "$ref": "1030" + }, + "value": { + "$id": "4610", + "name": { + "$id": "4611", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "4612", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "4613", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "4614", + "kind": "array", + "type": { + "$ref": "1045" + }, + "value": [ + { + "$id": "4615", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4616", + "id": { + "$id": "4617", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "4618", + "kind": "array", + "type": { + "$ref": "1049" + }, + "value": [ + { + "$id": "4619", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4620", + "id": { + "$id": "4621", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "4622", + "kind": "array", + "type": { + "$ref": "1053" + }, + "value": [ + { + "$id": "4623", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4624", + "id": { + "$id": "4625", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "4626", + "kind": "array", + "type": { + "$ref": "1057" + }, + "value": [ + { + "$id": "4627", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4628", + "id": { + "$id": "4629", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "4630", + "kind": "boolean", + "type": { + "$ref": "1065" + }, + "value": true + }, + "deleteOption": { + "$id": "4631", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "4632", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "4633", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "4634", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "4635", + "kind": "model", + "type": { + "$ref": "1087" + }, + "value": { + "$id": "4636", + "uefiSettings": { + "$id": "4637", + "kind": "model", + "type": { + "$ref": "1089" + }, + "value": { + "$id": "4638", + "secureBootEnabled": { + "$id": "4639", + "kind": "boolean", + "type": { + "$ref": "1091" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "4640", + "kind": "boolean", + "type": { + "$ref": "1095" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "4641", + "kind": "boolean", + "type": { + "$ref": "1101" + }, + "value": true + }, + "securityType": { + "$id": "4642", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "4643", + "kind": "model", + "type": { + "$ref": "1108" + }, + "value": { + "$id": "4644", + "userAssignedIdentityResourceId": { + "$id": "4645", + "kind": "string", + "type": { + "$ref": "1110" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "4646", + "kind": "model", + "type": { + "$ref": "1117" + }, + "value": { + "$id": "4647", + "enabled": { + "$id": "4648", + "kind": "boolean", + "type": { + "$ref": "1119" + }, + "value": true + }, + "mode": { + "$id": "4649", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "4650", + "kind": "number", + "type": { + "$ref": "1126" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "4651", + "kind": "model", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "4652", + "bootDiagnostics": { + "$id": "4653", + "kind": "model", + "type": { + "$ref": "1136" + }, + "value": { + "$id": "4654", + "enabled": { + "$id": "4655", + "kind": "boolean", + "type": { + "$ref": "1138" + }, + "value": true + }, + "storageUri": { + "$id": "4656", + "kind": "string", + "type": { + "$ref": "1142" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "4657", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4658", + "extensions": { + "$id": "4659", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "4660", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "4661", + "name": { + "$id": "4662", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "4663", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "cmeam" + }, + "properties": { + "$id": "4664", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "4665", + "forceUpdateTag": { + "$id": "4666", + "kind": "string", + "type": { + "$ref": "1170" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "4667", + "kind": "string", + "type": { + "$ref": "1174" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "4668", + "kind": "string", + "type": { + "$ref": "1178" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "4669", + "kind": "string", + "type": { + "$ref": "1182" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "4670", + "kind": "boolean", + "type": { + "$ref": "1186" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4671", + "kind": "boolean", + "type": { + "$ref": "1190" + }, + "value": true + }, + "settings": { + "$id": "4672", + "kind": "dict", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "4673" + } + }, + "provisioningState": { + "$id": "4674", + "kind": "string", + "type": { + "$ref": "1206" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "4675", + "kind": "array", + "type": { + "$ref": "1210" + }, + "value": [ + { + "$id": "4676", + "kind": "string", + "type": { + "$ref": "1211" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "4677", + "kind": "boolean", + "type": { + "$ref": "1215" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "4678", + "kind": "model", + "type": { + "$ref": "1219" + }, + "value": { + "$id": "4679", + "secretUrl": { + "$id": "4680", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "4681", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4682", + "id": { + "$id": "4683", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "4684", + "kind": "string", + "type": { + "$ref": "1155" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "4685", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "4686", + "kind": "string", + "type": { + "$ref": "1240" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "4687", + "kind": "model", + "type": { + "$ref": "1244" + }, + "value": { + "$id": "4688", + "terminateNotificationProfile": { + "$id": "4689", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "4690", + "notBeforeTimeout": { + "$id": "4691", + "kind": "string", + "type": { + "$ref": "1248" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "4692", + "kind": "boolean", + "type": { + "$ref": "1252" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "4693", + "kind": "model", + "type": { + "$ref": "1258" + }, + "value": { + "$id": "4694", + "notBeforeTimeout": { + "$id": "4695", + "kind": "string", + "type": { + "$ref": "1260" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "4696", + "kind": "boolean", + "type": { + "$ref": "1264" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "4697", + "kind": "string", + "type": { + "$ref": "1272" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "4698", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "4699", + "capacityReservationGroup": { + "$id": "4700", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4701", + "id": { + "$id": "4702", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "4703", + "kind": "model", + "type": { + "$ref": "1283" + }, + "value": { + "$id": "4704", + "galleryApplications": { + "$id": "4705", + "kind": "array", + "type": { + "$ref": "1285" + }, + "value": [ + { + "$id": "4706", + "kind": "model", + "type": { + "$ref": "1286" + }, + "value": { + "$id": "4707", + "tags": { + "$id": "4708", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "4709", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "4710", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "4711", + "kind": "boolean", + "type": { + "$ref": "1305" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4712", + "kind": "boolean", + "type": { + "$ref": "1309" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "4713", + "kind": "model", + "type": { + "$ref": "1317" + }, + "value": { + "$id": "4714", + "vmSizeProperties": { + "$id": "4715", + "kind": "model", + "type": { + "$ref": "1319" + }, + "value": { + "$id": "4716", + "vCPUsAvailable": { + "$id": "4717", + "kind": "number", + "type": { + "$ref": "1321" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "4718", + "kind": "number", + "type": { + "$ref": "1325" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "4719", + "kind": "model", + "type": { + "$ref": "1333" + }, + "value": { + "$id": "4720", + "id": { + "$id": "4721", + "kind": "string", + "type": { + "$ref": "1335" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "4722", + "kind": "model", + "type": { + "$ref": "1342" + }, + "value": { + "$id": "4723", + "id": { + "$id": "4724", + "kind": "string", + "type": { + "$ref": "1344" + }, + "value": "mubredelfbshboaxrsxiajihahaa" + }, + "excludeExtensions": { + "$id": "4725", + "kind": "array", + "type": { + "$ref": "1348" + }, + "value": [ + { + "$id": "4726", + "kind": "string", + "type": { + "$ref": "1349" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "4727", + "kind": "boolean", + "type": { + "$ref": "1353" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "4728", + "kind": "string", + "type": { + "$ref": "1359" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "4729", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "4730", + "kind": "number", + "type": { + "$ref": "1379" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "4731", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "4732", + "kind": "string", + "type": { + "$ref": "1402" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "4733", + "kind": "array", + "type": { + "$ref": "1408" + }, + "value": [ + { + "$id": "4734", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zone1" + }, + { + "$id": "4735", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "4736", + "kind": "model", + "type": { + "$ref": "1413" + }, + "value": { + "$id": "4737", + "principalId": { + "$id": "4738", + "kind": "string", + "type": { + "$ref": "1415" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "4739", + "kind": "string", + "type": { + "$ref": "1420" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "4740", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "4741", + "kind": "dict", + "type": { + "$ref": "1428" + }, + "value": { + "$id": "4742", + "key9851": { + "$id": "4743", + "kind": "model", + "type": { + "$ref": "1431" + }, + "value": { + "$id": "4744", + "principalId": { + "$id": "4745", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "4746", + "kind": "string", + "type": { + "$ref": "1433" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "plan": { + "$id": "4747", + "kind": "model", + "type": { + "$ref": "1447" + }, + "value": { + "$id": "4748", + "name": { + "$id": "4749", + "kind": "string", + "type": { + "$ref": "1449" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "4750", + "kind": "string", + "type": { + "$ref": "1453" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "4751", + "kind": "string", + "type": { + "$ref": "1457" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "4752", + "kind": "string", + "type": { + "$ref": "1461" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "4753", + "kind": "string", + "type": { + "$ref": "1465" + }, + "value": "wa" + } + } + }, + "tags": { + "$id": "4754", + "kind": "dict", + "type": { + "$ref": "396" + }, + "value": { + "$id": "4755", + "key3518": { + "$id": "4756", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "4757", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "westus" + }, + "id": { + "$id": "4758", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "4759", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "testFleet" + }, + "type": { + "$id": "4760", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "4761", + "kind": "model", + "type": { + "$ref": "368" + }, + "value": { + "$id": "4762", + "createdBy": { + "$id": "4763", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "4764", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "4765", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "4766", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "4767", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4768", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "4769", + "kind": "string", + "type": { + "$ref": "1581" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "4770", + "Name": "listBySubscription", + "ResourceName": "Fleet", + "Doc": "List Fleet resources by subscription ID", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4771", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "4772", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "4773", + "Type": { + "$id": "4774", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4775", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "4776", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4777", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4778", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4779", + "kind": "constant", + "valueType": { + "$id": "4780", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4781", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1575" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzureFleet/fleets", + "BufferResponse": true, + "Paging": { + "$id": "4782", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "4783", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listBySubscription", + "Decorators": [], + "Examples": [ + { + "$id": "4784", + "kind": "http", + "name": "Fleets_ListBySubscription", + "description": "Fleets_ListBySubscription", + "filePath": "2024-11-01/Fleets_ListBySubscription.json", + "parameters": [ + { + "$id": "4785", + "parameter": { + "$ref": "4771" + }, + "value": { + "$id": "4786", + "kind": "string", + "type": { + "$ref": "4772" + }, + "value": "2024-11-01" + } + }, + { + "$id": "4787", + "parameter": { + "$ref": "4775" + }, + "value": { + "$id": "4788", + "kind": "string", + "type": { + "$ref": "4776" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + } + ], + "responses": [ + { + "$id": "4789", + "response": { + "$ref": "4781" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4790", + "kind": "model", + "type": { + "$ref": "1575" + }, + "value": { + "$id": "4791", + "value": { + "$id": "4792", + "kind": "array", + "type": { + "$ref": "1577" + }, + "value": [ + { + "$id": "4793", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "4794", + "properties": { + "$id": "4795", + "kind": "model", + "type": { + "$ref": "406" + }, + "value": { + "$id": "4796", + "provisioningState": { + "$id": "4797", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "4798", + "kind": "model", + "type": { + "$ref": "411" + }, + "value": { + "$id": "4799", + "capacity": { + "$id": "4800", + "kind": "number", + "type": { + "$ref": "413" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4801", + "kind": "number", + "type": { + "$ref": "417" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "4802", + "kind": "number", + "type": { + "$ref": "421" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "4803", + "kind": "string", + "type": { + "$ref": "18" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "4804", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "4805", + "kind": "boolean", + "type": { + "$ref": "431" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "4806", + "kind": "model", + "type": { + "$ref": "437" + }, + "value": { + "$id": "4807", + "capacity": { + "$id": "4808", + "kind": "number", + "type": { + "$ref": "439" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4809", + "kind": "number", + "type": { + "$ref": "443" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "4810", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "4811", + "kind": "array", + "type": { + "$ref": "452" + }, + "value": [ + { + "$id": "4812", + "kind": "model", + "type": { + "$ref": "453" + }, + "value": { + "$id": "4813", + "name": { + "$id": "4814", + "kind": "string", + "type": { + "$ref": "455" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "4815", + "kind": "number", + "type": { + "$ref": "459" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "4816", + "kind": "model", + "type": { + "$ref": "1370" + }, + "value": { + "$id": "4817", + "baseVirtualMachineProfile": { + "$id": "4818", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "4819", + "osProfile": { + "$id": "4820", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "$id": "4821", + "computerNamePrefix": { + "$id": "4822", + "kind": "string", + "type": { + "$ref": "569" + }, + "value": "o" + }, + "adminUsername": { + "$id": "4823", + "kind": "string", + "type": { + "$ref": "573" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "4824", + "kind": "model", + "type": { + "$ref": "585" + }, + "value": { + "$id": "4825", + "provisionVMAgent": { + "$id": "4826", + "kind": "boolean", + "type": { + "$ref": "587" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "4827", + "kind": "boolean", + "type": { + "$ref": "591" + }, + "value": true + }, + "timeZone": { + "$id": "4828", + "kind": "string", + "type": { + "$ref": "595" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "4829", + "kind": "array", + "type": { + "$ref": "599" + }, + "value": [ + { + "$id": "4830", + "kind": "model", + "type": { + "$ref": "600" + }, + "value": { + "$id": "4831", + "passName": { + "$id": "4832", + "kind": "string", + "type": { + "$ref": "602" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "4833", + "kind": "string", + "type": { + "$ref": "606" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "4834", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "4835", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "$id": "4836", + "patchMode": { + "$id": "4837", + "kind": "string", + "type": { + "$ref": "110" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "4838", + "kind": "boolean", + "type": { + "$ref": "624" + }, + "value": true + }, + "assessmentMode": { + "$id": "4839", + "kind": "string", + "type": { + "$ref": "118" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4840", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "$id": "4841", + "rebootSetting": { + "$id": "4842", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4843", + "kind": "boolean", + "type": { + "$ref": "636" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "4844", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "4845", + "listeners": { + "$id": "4846", + "kind": "array", + "type": { + "$ref": "646" + }, + "value": [ + { + "$id": "4847", + "kind": "model", + "type": { + "$ref": "647" + }, + "value": { + "$id": "4848", + "protocol": { + "$id": "4849", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "4850", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4851", + "kind": "boolean", + "type": { + "$ref": "660" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "4852", + "kind": "model", + "type": { + "$ref": "666" + }, + "value": { + "$id": "4853", + "disablePasswordAuthentication": { + "$id": "4854", + "kind": "boolean", + "type": { + "$ref": "668" + }, + "value": true + }, + "ssh": { + "$id": "4855", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "4856", + "publicKeys": { + "$id": "4857", + "kind": "array", + "type": { + "$ref": "674" + }, + "value": [ + { + "$id": "4858", + "kind": "model", + "type": { + "$ref": "675" + }, + "value": { + "$id": "4859", + "path": { + "$id": "4860", + "kind": "string", + "type": { + "$ref": "677" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "4861", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "4862", + "kind": "boolean", + "type": { + "$ref": "689" + }, + "value": true + }, + "patchSettings": { + "$id": "4863", + "kind": "model", + "type": { + "$ref": "693" + }, + "value": { + "$id": "4864", + "patchMode": { + "$id": "4865", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "4866", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4867", + "kind": "model", + "type": { + "$ref": "701" + }, + "value": { + "$id": "4868", + "rebootSetting": { + "$id": "4869", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4870", + "kind": "boolean", + "type": { + "$ref": "706" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4871", + "kind": "boolean", + "type": { + "$ref": "714" + }, + "value": true + } + } + }, + "secrets": { + "$id": "4872", + "kind": "array", + "type": { + "$ref": "720" + }, + "value": [ + { + "$id": "4873", + "kind": "model", + "type": { + "$ref": "721" + }, + "value": { + "$id": "4874", + "sourceVault": { + "$id": "4875", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4876", + "id": { + "$id": "4877", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "4878", + "kind": "array", + "type": { + "$ref": "732" + }, + "value": [ + { + "$id": "4879", + "kind": "model", + "type": { + "$ref": "733" + }, + "value": { + "$id": "4880", + "certificateUrl": { + "$id": "4881", + "kind": "string", + "type": { + "$ref": "735" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "4882", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "4883", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "4884", + "kind": "boolean", + "type": { + "$ref": "751" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "4885", + "kind": "model", + "type": { + "$ref": "757" + }, + "value": { + "$id": "4886", + "imageReference": { + "$id": "4887", + "kind": "model", + "type": { + "$ref": "759" + }, + "value": { + "$id": "4888", + "publisher": { + "$id": "4889", + "kind": "string", + "type": { + "$ref": "766" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "4890", + "kind": "string", + "type": { + "$ref": "770" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "4891", + "kind": "string", + "type": { + "$ref": "774" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "4892", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "4893", + "kind": "string", + "type": { + "$ref": "782" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "4894", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "4895", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "vlqe" + }, + "id": { + "$id": "4896", + "kind": "string", + "type": { + "$ref": "761" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "4897", + "kind": "model", + "type": { + "$ref": "796" + }, + "value": { + "$id": "4898", + "name": { + "$id": "4899", + "kind": "string", + "type": { + "$ref": "798" + }, + "value": "wfttw" + }, + "caching": { + "$id": "4900", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4901", + "kind": "boolean", + "type": { + "$ref": "805" + }, + "value": true + }, + "createOption": { + "$id": "4902", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "4903", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "4904", + "option": { + "$id": "4905", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Local" + }, + "placement": { + "$id": "4906", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "4907", + "kind": "number", + "type": { + "$ref": "822" + }, + "value": 14 + }, + "osType": { + "$id": "4908", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Windows" + }, + "image": { + "$id": "4909", + "kind": "model", + "type": { + "$ref": "829" + }, + "value": { + "$id": "4910", + "uri": { + "$id": "4911", + "kind": "string", + "type": { + "$ref": "831" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "4912", + "kind": "array", + "type": { + "$ref": "837" + }, + "value": [ + { + "$id": "4913", + "kind": "string", + "type": { + "$ref": "838" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "4914", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "4915", + "storageAccountType": { + "$id": "4916", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4917", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "4918", + "id": { + "$id": "4919", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4920", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "4921", + "securityEncryptionType": { + "$id": "4922", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4923", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "4924", + "id": { + "$id": "4925", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "4926", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "4927", + "kind": "array", + "type": { + "$ref": "873" + }, + "value": [ + { + "$id": "4928", + "kind": "model", + "type": { + "$ref": "874" + }, + "value": { + "$id": "4929", + "name": { + "$id": "4930", + "kind": "string", + "type": { + "$ref": "876" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "4931", + "kind": "number", + "type": { + "$ref": "880" + }, + "value": 14 + }, + "caching": { + "$id": "4932", + "kind": "string", + "type": { + "$ref": "162" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4933", + "kind": "boolean", + "type": { + "$ref": "887" + }, + "value": true + }, + "createOption": { + "$id": "4934", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "4935", + "kind": "number", + "type": { + "$ref": "894" + }, + "value": 6 + }, + "managedDisk": { + "$id": "4936", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "4937", + "storageAccountType": { + "$id": "4938", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4939", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "4940", + "id": { + "$id": "4941", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4942", + "kind": "model", + "type": { + "$ref": "856" + }, + "value": { + "$id": "4943", + "securityEncryptionType": { + "$id": "4944", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4945", + "kind": "model", + "type": { + "$ref": "847" + }, + "value": { + "$id": "4946", + "id": { + "$id": "4947", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "4948", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "4949", + "kind": "number", + "type": { + "$ref": "905" + }, + "value": 2 + }, + "deleteOption": { + "$id": "4950", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Delete" + } + } + } + ] + } + } + }, + "networkProfile": { + "$id": "4951", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "4952", + "healthProbe": { + "$id": "4953", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4954", + "id": { + "$id": "4955", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "4956", + "kind": "array", + "type": { + "$ref": "930" + }, + "value": [ + { + "$id": "4957", + "kind": "model", + "type": { + "$ref": "931" + }, + "value": { + "$id": "4958", + "name": { + "$id": "4959", + "kind": "string", + "type": { + "$ref": "933" + }, + "value": "i" + }, + "properties": { + "$id": "4960", + "kind": "model", + "type": { + "$ref": "937" + }, + "value": { + "$id": "4961", + "primary": { + "$id": "4962", + "kind": "boolean", + "type": { + "$ref": "939" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "4963", + "kind": "boolean", + "type": { + "$ref": "943" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "4964", + "kind": "boolean", + "type": { + "$ref": "947" + }, + "value": true + }, + "enableFpga": { + "$id": "4965", + "kind": "boolean", + "type": { + "$ref": "951" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "4966", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4967", + "id": { + "$id": "4968", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "4969", + "kind": "model", + "type": { + "$ref": "958" + }, + "value": { + "$id": "4970", + "dnsServers": { + "$id": "4971", + "kind": "array", + "type": { + "$ref": "960" + }, + "value": [ + { + "$id": "4972", + "kind": "string", + "type": { + "$ref": "961" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "4973", + "kind": "array", + "type": { + "$ref": "967" + }, + "value": [ + { + "$id": "4974", + "kind": "model", + "type": { + "$ref": "968" + }, + "value": { + "$id": "4975", + "name": { + "$id": "4976", + "kind": "string", + "type": { + "$ref": "970" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "4977", + "kind": "model", + "type": { + "$ref": "974" + }, + "value": { + "$id": "4978", + "subnet": { + "$id": "4979", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4980", + "id": { + "$id": "4981", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "4982", + "kind": "boolean", + "type": { + "$ref": "979" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "4983", + "kind": "model", + "type": { + "$ref": "983" + }, + "value": { + "$id": "4984", + "name": { + "$id": "4985", + "kind": "string", + "type": { + "$ref": "985" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "4986", + "kind": "model", + "type": { + "$ref": "989" + }, + "value": { + "$id": "4987", + "idleTimeoutInMinutes": { + "$id": "4988", + "kind": "number", + "type": { + "$ref": "991" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "4989", + "kind": "model", + "type": { + "$ref": "995" + }, + "value": { + "$id": "4990", + "domainNameLabel": { + "$id": "4991", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "4992", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "4993", + "kind": "array", + "type": { + "$ref": "1006" + }, + "value": [ + { + "$id": "4994", + "kind": "model", + "type": { + "$ref": "1007" + }, + "value": { + "$id": "4995", + "ipTagType": { + "$id": "4996", + "kind": "string", + "type": { + "$ref": "1009" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "4997", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "4998", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4999", + "id": { + "$id": "5000", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "5001", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "5002", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "5003", + "kind": "model", + "type": { + "$ref": "1030" + }, + "value": { + "$id": "5004", + "name": { + "$id": "5005", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Basic" + }, + "tier": { + "$id": "5006", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "5007", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "5008", + "kind": "array", + "type": { + "$ref": "1045" + }, + "value": [ + { + "$id": "5009", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "5010", + "id": { + "$id": "5011", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "5012", + "kind": "array", + "type": { + "$ref": "1049" + }, + "value": [ + { + "$id": "5013", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "5014", + "id": { + "$id": "5015", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "5016", + "kind": "array", + "type": { + "$ref": "1053" + }, + "value": [ + { + "$id": "5017", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "5018", + "id": { + "$id": "5019", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "5020", + "kind": "array", + "type": { + "$ref": "1057" + }, + "value": [ + { + "$id": "5021", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "5022", + "id": { + "$id": "5023", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "5024", + "kind": "boolean", + "type": { + "$ref": "1065" + }, + "value": true + }, + "deleteOption": { + "$id": "5025", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "5026", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "5027", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "5028", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "5029", + "kind": "model", + "type": { + "$ref": "1087" + }, + "value": { + "$id": "5030", + "uefiSettings": { + "$id": "5031", + "kind": "model", + "type": { + "$ref": "1089" + }, + "value": { + "$id": "5032", + "secureBootEnabled": { + "$id": "5033", + "kind": "boolean", + "type": { + "$ref": "1091" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "5034", + "kind": "boolean", + "type": { + "$ref": "1095" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "5035", + "kind": "boolean", + "type": { + "$ref": "1101" + }, + "value": true + }, + "securityType": { + "$id": "5036", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "5037", + "kind": "model", + "type": { + "$ref": "1108" + }, + "value": { + "$id": "5038", + "userAssignedIdentityResourceId": { + "$id": "5039", + "kind": "string", + "type": { + "$ref": "1110" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "5040", + "kind": "model", + "type": { + "$ref": "1117" + }, + "value": { + "$id": "5041", + "enabled": { + "$id": "5042", + "kind": "boolean", + "type": { + "$ref": "1119" + }, + "value": true + }, + "mode": { + "$id": "5043", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "5044", + "kind": "number", + "type": { + "$ref": "1126" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "5045", + "kind": "model", + "type": { + "$ref": "1134" + }, + "value": { + "$id": "5046", + "bootDiagnostics": { + "$id": "5047", + "kind": "model", + "type": { + "$ref": "1136" + }, + "value": { + "$id": "5048", + "enabled": { + "$id": "5049", + "kind": "boolean", + "type": { + "$ref": "1138" + }, + "value": true + }, + "storageUri": { + "$id": "5050", + "kind": "string", + "type": { + "$ref": "1142" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "5051", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "5052", + "extensions": { + "$id": "5053", + "kind": "array", + "type": { + "$ref": "1152" + }, + "value": [ + { + "$id": "5054", + "kind": "model", + "type": { + "$ref": "1153" + }, + "value": { + "$id": "5055", + "name": { + "$id": "5056", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "5057", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "cmeam" + }, + "properties": { + "$id": "5058", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "5059", + "forceUpdateTag": { + "$id": "5060", + "kind": "string", + "type": { + "$ref": "1170" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "5061", + "kind": "string", + "type": { + "$ref": "1174" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "5062", + "kind": "string", + "type": { + "$ref": "1178" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "5063", + "kind": "string", + "type": { + "$ref": "1182" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "5064", + "kind": "boolean", + "type": { + "$ref": "1186" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "5065", + "kind": "boolean", + "type": { + "$ref": "1190" + }, + "value": true + }, + "settings": { + "$id": "5066", + "kind": "dict", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "5067" + } + }, + "provisioningState": { + "$id": "5068", + "kind": "string", + "type": { + "$ref": "1206" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "5069", + "kind": "array", + "type": { + "$ref": "1210" + }, + "value": [ + { + "$id": "5070", + "kind": "string", + "type": { + "$ref": "1211" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "5071", + "kind": "boolean", + "type": { + "$ref": "1215" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "5072", + "kind": "model", + "type": { + "$ref": "1219" + }, + "value": { + "$id": "5073", + "secretUrl": { + "$id": "5074", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "5075", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "5076", + "id": { + "$id": "5077", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "5078", + "kind": "string", + "type": { + "$ref": "1155" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "5079", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "5080", + "kind": "string", + "type": { + "$ref": "1240" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "5081", + "kind": "model", + "type": { + "$ref": "1244" + }, + "value": { + "$id": "5082", + "terminateNotificationProfile": { + "$id": "5083", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "5084", + "notBeforeTimeout": { + "$id": "5085", + "kind": "string", + "type": { + "$ref": "1248" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "5086", + "kind": "boolean", + "type": { + "$ref": "1252" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "5087", + "kind": "model", + "type": { + "$ref": "1258" + }, + "value": { + "$id": "5088", + "notBeforeTimeout": { + "$id": "5089", + "kind": "string", + "type": { + "$ref": "1260" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "5090", + "kind": "boolean", + "type": { + "$ref": "1264" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "5091", + "kind": "string", + "type": { + "$ref": "1272" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "5092", + "kind": "model", + "type": { + "$ref": "1276" + }, + "value": { + "$id": "5093", + "capacityReservationGroup": { + "$id": "5094", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "5095", + "id": { + "$id": "5096", + "kind": "string", + "type": { + "$ref": "725" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "5097", + "kind": "model", + "type": { + "$ref": "1283" + }, + "value": { + "$id": "5098", + "galleryApplications": { + "$id": "5099", + "kind": "array", + "type": { + "$ref": "1285" + }, + "value": [ + { + "$id": "5100", + "kind": "model", + "type": { + "$ref": "1286" + }, + "value": { + "$id": "5101", + "tags": { + "$id": "5102", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "5103", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "5104", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "5105", + "kind": "boolean", + "type": { + "$ref": "1305" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "5106", + "kind": "boolean", + "type": { + "$ref": "1309" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "5107", + "kind": "model", + "type": { + "$ref": "1317" + }, + "value": { + "$id": "5108", + "vmSizeProperties": { + "$id": "5109", + "kind": "model", + "type": { + "$ref": "1319" + }, + "value": { + "$id": "5110", + "vCPUsAvailable": { + "$id": "5111", + "kind": "number", + "type": { + "$ref": "1321" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "5112", + "kind": "number", + "type": { + "$ref": "1325" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "5113", + "kind": "model", + "type": { + "$ref": "1333" + }, + "value": { + "$id": "5114", + "id": { + "$id": "5115", + "kind": "string", + "type": { + "$ref": "1335" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "5116", + "kind": "model", + "type": { + "$ref": "1342" + }, + "value": { + "$id": "5117", + "id": { + "$id": "5118", + "kind": "string", + "type": { + "$ref": "1344" + }, + "value": "mubredelfbshboaxrsxiajihahaa" + }, + "excludeExtensions": { + "$id": "5119", + "kind": "array", + "type": { + "$ref": "1348" + }, + "value": [ + { + "$id": "5120", + "kind": "string", + "type": { + "$ref": "1349" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "5121", + "kind": "boolean", + "type": { + "$ref": "1353" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "5122", + "kind": "string", + "type": { + "$ref": "1359" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "5123", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "5124", + "kind": "number", + "type": { + "$ref": "1379" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "5125", + "kind": "string", + "type": { + "$ref": "1397" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "5126", + "kind": "string", + "type": { + "$ref": "1402" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "5127", + "kind": "array", + "type": { + "$ref": "1408" + }, + "value": [ + { + "$id": "5128", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zone1" + }, + { + "$id": "5129", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "5130", + "kind": "model", + "type": { + "$ref": "1413" + }, + "value": { + "$id": "5131", + "principalId": { + "$id": "5132", + "kind": "string", + "type": { + "$ref": "1415" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "5133", + "kind": "string", + "type": { + "$ref": "1420" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "5134", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "5135", + "kind": "dict", + "type": { + "$ref": "1428" + }, + "value": { + "$id": "5136", + "key9851": { + "$id": "5137", + "kind": "model", + "type": { + "$ref": "1431" + }, + "value": { + "$id": "5138", + "principalId": { + "$id": "5139", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "5140", + "kind": "string", + "type": { + "$ref": "1433" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "plan": { + "$id": "5141", + "kind": "model", + "type": { + "$ref": "1447" + }, + "value": { + "$id": "5142", + "name": { + "$id": "5143", + "kind": "string", + "type": { + "$ref": "1449" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "5144", + "kind": "string", + "type": { + "$ref": "1453" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "5145", + "kind": "string", + "type": { + "$ref": "1457" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "5146", + "kind": "string", + "type": { + "$ref": "1461" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "5147", + "kind": "string", + "type": { + "$ref": "1465" + }, + "value": "wa" + } + } + }, + "tags": { + "$id": "5148", + "kind": "dict", + "type": { + "$ref": "396" + }, + "value": { + "$id": "5149", + "key3518": { + "$id": "5150", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "5151", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "westus" + }, + "id": { + "$id": "5152", + "kind": "string", + "type": { + "$ref": "354" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "5153", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "testFleet" + }, + "type": { + "$id": "5154", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "5155", + "kind": "model", + "type": { + "$ref": "368" + }, + "value": { + "$id": "5156", + "createdBy": { + "$id": "5157", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "5158", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "createdAt": { + "$id": "5159", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "5160", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "5161", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5162", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "5163", + "kind": "string", + "type": { + "$ref": "1581" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "5164", + "Name": "listVirtualMachineScaleSets", + "ResourceName": "VirtualMachineScaleSet", + "Doc": "List VirtualMachineScaleSet resources by Fleet", + "Accessibility": "public", + "Parameters": [ + { + "$id": "5165", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "5166", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "5167", + "Type": { + "$id": "5168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5169", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "5170", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5172", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "5173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5174", + "Name": "name", + "NameInRequest": "name", + "Doc": "The name of the Fleet", + "Type": { + "$id": "5175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5176", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5177", + "kind": "constant", + "valueType": { + "$id": "5178", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5179", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1585" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{name}/virtualMachineScaleSets", + "BufferResponse": true, + "Paging": { + "$id": "5180", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "5181", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listVirtualMachineScaleSets", + "Decorators": [], + "Examples": [ + { + "$id": "5182", + "kind": "http", + "name": "Fleets_ListVirtualMachineScaleSets", + "description": "Fleets_ListVirtualMachineScaleSets", + "filePath": "2024-11-01/Fleets_ListVirtualMachineScaleSets.json", + "parameters": [ + { + "$id": "5183", + "parameter": { + "$ref": "5165" + }, + "value": { + "$id": "5184", + "kind": "string", + "type": { + "$ref": "5166" + }, + "value": "2024-11-01" + } + }, + { + "$id": "5185", + "parameter": { + "$ref": "5169" + }, + "value": { + "$id": "5186", + "kind": "string", + "type": { + "$ref": "5170" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "5187", + "parameter": { + "$ref": "5172" + }, + "value": { + "$id": "5188", + "kind": "string", + "type": { + "$ref": "5173" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "5189", + "parameter": { + "$ref": "5174" + }, + "value": { + "$id": "5190", + "kind": "string", + "type": { + "$ref": "5175" + }, + "value": "myFleet" + } + } + ], + "responses": [ + { + "$id": "5191", + "response": { + "$ref": "5179" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5192", + "kind": "model", + "type": { + "$ref": "1585" + }, + "value": { + "$id": "5193", + "value": { + "$id": "5194", + "kind": "array", + "type": { + "$ref": "1587" + }, + "value": [ + { + "$id": "5195", + "kind": "model", + "type": { + "$ref": "1588" + }, + "value": { + "$id": "5196", + "id": { + "$id": "5197", + "kind": "string", + "type": { + "$ref": "1590" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/myFleet/virtualMachineScaleSets/myVmss" + }, + "type": { + "$id": "5198", + "kind": "string", + "type": { + "$ref": "1595" + }, + "value": "Microsoft.AzureFleet/fleets/virtualMachineScaleSets" + }, + "operationStatus": { + "$id": "5199", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "error": { + "$id": "5200", + "kind": "model", + "type": { + "$ref": "1602" + }, + "value": { + "$id": "5201", + "details": { + "$id": "5202", + "kind": "array", + "type": { + "$ref": "1616" + }, + "value": [ + { + "$id": "5203", + "kind": "model", + "type": { + "$ref": "1617" + }, + "value": { + "$id": "5204", + "code": { + "$id": "5205", + "kind": "string", + "type": { + "$ref": "1619" + }, + "value": "gzhtOverconstrainedAllocationRequestyosk" + }, + "target": { + "$id": "5206", + "kind": "string", + "type": { + "$ref": "1623" + }, + "value": "qfthabhrmndhfizfnrwpgxvnokpy" + }, + "message": { + "$id": "5207", + "kind": "string", + "type": { + "$ref": "1627" + }, + "value": "Allocation Failed" + } + } + } + ] + }, + "innererror": { + "$id": "5208", + "kind": "model", + "type": { + "$ref": "1633" + }, + "value": { + "$id": "5209", + "exceptionType": { + "$id": "5210", + "kind": "string", + "type": { + "$ref": "1635" + }, + "value": "sfaomfpoaptnbxchrfskm" + }, + "errorDetail": { + "$id": "5211", + "kind": "string", + "type": { + "$ref": "1639" + }, + "value": "ihjwbwykq" + } + } + }, + "code": { + "$id": "5212", + "kind": "string", + "type": { + "$ref": "1604" + }, + "value": "OverconstrainedAllocationRequest" + }, + "target": { + "$id": "5213", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "nhaj" + }, + "message": { + "$id": "5214", + "kind": "string", + "type": { + "$ref": "1612" + }, + "value": "Allocation Failed" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "5215" + }, + "Parent": "AzureFleetClient", + "Parameters": [ + { + "$id": "5216", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "5217", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "5218", + "Type": { + "$id": "5219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets" + } + ], + "Auth": { + "$id": "5220", + "OAuth2": { + "$id": "5221", + "Scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/Azure.ResourceManager.Contoso.sln b/sdk/contoso/Azure.ResourceManager.Contoso/Azure.ResourceManager.Contoso.sln new file mode 100644 index 000000000000..cb820959e5b2 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/Azure.ResourceManager.Contoso.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Contoso.Samples", "samples\Azure.ResourceManager.Contoso.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Contoso", "src\Azure.ResourceManager.Contoso.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Contoso.Tests", "tests\Azure.ResourceManager.Contoso.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/CHANGELOG.md b/sdk/contoso/Azure.ResourceManager.Contoso/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/Directory.Build.props b/sdk/contoso/Azure.ResourceManager.Contoso/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/README.md b/sdk/contoso/Azure.ResourceManager.Contoso/README.md new file mode 100644 index 000000000000..78ea67f6bbf0 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure Contoso management client library for .NET + +**[Describe the service briefly first.]** + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - 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. + +## Getting started + +### Install the package + +Install the Microsoft Azure Contoso management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.Contoso --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET 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/dev/mgmt_quickstart.md). +- [API References](https://learn.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://aka.ms/azuresdk-net-mgmt-samples) + +## 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 about Microsoft Azure SDK, see [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 +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action 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 other 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/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.net8.0.cs b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.net8.0.cs new file mode 100644 index 000000000000..e066d059b9ab --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.net8.0.cs @@ -0,0 +1,131 @@ +namespace Azure.ResourceManager.Contoso +{ + public static partial class ContosoExtensions + { + public static Azure.Response GetEmployee(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEmployeeAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEmployees(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEmployeesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EmployeeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EmployeeCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string employeeName, 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 employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string employeeName, 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 EmployeeData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EmployeeData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Contoso.Models.EmployeeProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EmployeeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EmployeeResource() { } + public virtual Azure.ResourceManager.Contoso.EmployeeData 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 employeeName) { 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 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; } + Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Contoso.Mocking +{ + public partial class MockableContosoArmClient : Azure.ResourceManager.ArmResource + { + protected MockableContosoArmClient() { } + public virtual Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableContosoResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableContosoResourceGroupResource() { } + public virtual Azure.Response GetEmployee(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEmployeeAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees() { throw null; } + } + public partial class MockableContosoSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableContosoSubscriptionResource() { } + public virtual Azure.Pageable GetEmployees(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEmployeesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Contoso.Models +{ + public static partial class ArmContosoModelFactory + { + public static Azure.ResourceManager.Contoso.EmployeeData EmployeeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Contoso.Models.EmployeeProperties properties = null) { throw null; } + public static Azure.ResourceManager.Contoso.Models.EmployeeProperties EmployeeProperties(int? age = default(int?), string city = null, byte[] profile = null, Azure.ResourceManager.Contoso.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Contoso.Models.ProvisioningState?)) { throw null; } + } + public partial class EmployeeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EmployeeProperties() { } + public int? Age { get { throw null; } set { } } + public string City { get { throw null; } set { } } + public byte[] Profile { get { throw null; } set { } } + public Azure.ResourceManager.Contoso.Models.ProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.Models.EmployeeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.Models.EmployeeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { 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.Contoso.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.Contoso.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.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Contoso.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.netstandard2.0.cs b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.netstandard2.0.cs new file mode 100644 index 000000000000..e066d059b9ab --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.netstandard2.0.cs @@ -0,0 +1,131 @@ +namespace Azure.ResourceManager.Contoso +{ + public static partial class ContosoExtensions + { + public static Azure.Response GetEmployee(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetEmployeeAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEmployees(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEmployeesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EmployeeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EmployeeCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string employeeName, 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 employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string employeeName, 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 EmployeeData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EmployeeData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Contoso.Models.EmployeeProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EmployeeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EmployeeResource() { } + public virtual Azure.ResourceManager.Contoso.EmployeeData 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 employeeName) { 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 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; } + Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Contoso.Mocking +{ + public partial class MockableContosoArmClient : Azure.ResourceManager.ArmResource + { + protected MockableContosoArmClient() { } + public virtual Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableContosoResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableContosoResourceGroupResource() { } + public virtual Azure.Response GetEmployee(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEmployeeAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees() { throw null; } + } + public partial class MockableContosoSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableContosoSubscriptionResource() { } + public virtual Azure.Pageable GetEmployees(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEmployeesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.Contoso.Models +{ + public static partial class ArmContosoModelFactory + { + public static Azure.ResourceManager.Contoso.EmployeeData EmployeeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Contoso.Models.EmployeeProperties properties = null) { throw null; } + public static Azure.ResourceManager.Contoso.Models.EmployeeProperties EmployeeProperties(int? age = default(int?), string city = null, byte[] profile = null, Azure.ResourceManager.Contoso.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Contoso.Models.ProvisioningState?)) { throw null; } + } + public partial class EmployeeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EmployeeProperties() { } + public int? Age { get { throw null; } set { } } + public string City { get { throw null; } set { } } + public byte[] Profile { get { throw null; } set { } } + public Azure.ResourceManager.Contoso.Models.ProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.Models.EmployeeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Contoso.Models.EmployeeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { 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.Contoso.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.Contoso.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.Contoso.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.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Contoso.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/assets.json b/sdk/contoso/Azure.ResourceManager.Contoso/assets.json new file mode 100644 index 000000000000..ed7bbd7af63d --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/contoso/Azure.ResourceManager.Contoso", + "Tag": "" +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/samples/Azure.ResourceManager.Contoso.Samples.csproj b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Azure.ResourceManager.Contoso.Samples.csproj new file mode 100644 index 000000000000..e1423e416b0f --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Azure.ResourceManager.Contoso.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeCollection.cs b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeCollection.cs new file mode 100644 index 000000000000..5d6930e24057 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeCollection.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Contoso.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Contoso.Samples +{ + public partial class Sample_EmployeeCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_EmployeesCreateOrUpdate() + { + // Generated from example definition: 2021-11-01/Employees_CreateOrUpdate.json + // this example is just showing the usage of "Employee_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EmployeeResource + EmployeeCollection collection = resourceGroupResource.GetEmployees(); + + // invoke the operation + string employeeName = "9KF-f-8b"; + EmployeeData data = new EmployeeData(new AzureLocation("itajgxyqozseoygnl")) + { + Properties = new EmployeeProperties + { + Age = 30, + City = "gydhnntudughbmxlkyzrskcdkotrxn", + Profile = Encoding.UTF8.GetBytes("ms"), + }, + Tags = +{ +["key2913"] = "urperxmkkhhkp" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, employeeName, data); + EmployeeResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EmployeeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EmployeesGet() + { + // Generated from example definition: 2021-11-01/Employees_Get.json + // this example is just showing the usage of "Employee_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EmployeeResource + EmployeeCollection collection = resourceGroupResource.GetEmployees(); + + // invoke the operation + string employeeName = "le-8MU--J3W6q8D386p3-iT3"; + EmployeeResource result = await collection.GetAsync(employeeName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EmployeeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_EmployeesListByResourceGroup() + { + // Generated from example definition: 2021-11-01/Employees_ListByResourceGroup.json + // this example is just showing the usage of "Employee_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EmployeeResource + EmployeeCollection collection = resourceGroupResource.GetEmployees(); + + // invoke the operation and iterate over the result + await foreach (EmployeeResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EmployeeData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_EmployeesGet() + { + // Generated from example definition: 2021-11-01/Employees_Get.json + // this example is just showing the usage of "Employee_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EmployeeResource + EmployeeCollection collection = resourceGroupResource.GetEmployees(); + + // invoke the operation + string employeeName = "le-8MU--J3W6q8D386p3-iT3"; + bool result = await collection.ExistsAsync(employeeName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_EmployeesGet() + { + // Generated from example definition: 2021-11-01/Employees_Get.json + // this example is just showing the usage of "Employee_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this EmployeeResource + EmployeeCollection collection = resourceGroupResource.GetEmployees(); + + // invoke the operation + string employeeName = "le-8MU--J3W6q8D386p3-iT3"; + NullableResponse response = await collection.GetIfExistsAsync(employeeName); + EmployeeResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EmployeeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeResource.cs new file mode 100644 index 000000000000..da147009f1d0 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeResource.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Contoso.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Contoso.Samples +{ + public partial class Sample_EmployeeResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_EmployeesGet() + { + // Generated from example definition: 2021-11-01/Employees_Get.json + // this example is just showing the usage of "Employee_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this EmployeeResource created on azure + // for more information of creating EmployeeResource, please refer to the document of EmployeeResource + string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + string employeeName = "le-8MU--J3W6q8D386p3-iT3"; + ResourceIdentifier employeeResourceId = EmployeeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, employeeName); + EmployeeResource employee = client.GetEmployeeResource(employeeResourceId); + + // invoke the operation + EmployeeResource result = await employee.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EmployeeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_EmployeesDelete() + { + // Generated from example definition: 2021-11-01/Employees_Delete.json + // this example is just showing the usage of "Employee_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this EmployeeResource created on azure + // for more information of creating EmployeeResource, please refer to the document of EmployeeResource + string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + string employeeName = "5vX--BxSu3ux48rI4O9OQ569"; + ResourceIdentifier employeeResourceId = EmployeeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, employeeName); + EmployeeResource employee = client.GetEmployeeResource(employeeResourceId); + + // invoke the operation + await employee.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_EmployeesUpdate() + { + // Generated from example definition: 2021-11-01/Employees_Update.json + // this example is just showing the usage of "Employee_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this EmployeeResource created on azure + // for more information of creating EmployeeResource, please refer to the document of EmployeeResource + string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + string resourceGroupName = "rgopenapi"; + string employeeName = "-XhyNJ--"; + ResourceIdentifier employeeResourceId = EmployeeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, employeeName); + EmployeeResource employee = client.GetEmployeeResource(employeeResourceId); + + // invoke the operation + EmployeeData data = new EmployeeData(default) + { + Properties = new EmployeeProperties + { + Age = 24, + City = "uyfg", + Profile = Encoding.UTF8.GetBytes("oapgijcswfkruiuuzbwco"), + }, + Tags = +{ +["key7952"] = "no" +}, + }; + EmployeeResource result = await employee.UpdateAsync(data); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EmployeeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..62db2b6f5e75 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Contoso.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetEmployees_EmployeesListBySubscription() + { + // Generated from example definition: 2021-11-01/Employees_ListBySubscription.json + // this example is just showing the usage of "Employee_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (EmployeeResource item in subscriptionResource.GetEmployeesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + EmployeeData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Azure.ResourceManager.Contoso.csproj b/sdk/contoso/Azure.ResourceManager.Contoso/src/Azure.ResourceManager.Contoso.csproj new file mode 100644 index 000000000000..2755628805d0 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Azure.ResourceManager.Contoso.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider Contoso. + 1.0.0-beta.1 + azure;management;arm;resource manager;contoso + Azure.ResourceManager.Contoso + + diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ArmContosoModelFactory.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ArmContosoModelFactory.cs new file mode 100644 index 000000000000..836b121b3967 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ArmContosoModelFactory.cs @@ -0,0 +1,54 @@ +// 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; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Contoso.Models +{ + /// Model factory for models. + public static partial class ArmContosoModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static EmployeeData EmployeeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EmployeeProperties properties = null) + { + tags ??= new Dictionary(); + + return new EmployeeData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Age of employee. + /// City of employee. + /// Profile of employee. + /// The status of the last operation. + /// A new instance for mocking. + public static EmployeeProperties EmployeeProperties(int? age = null, string city = null, byte[] profile = null, ProvisioningState? provisioningState = null) + { + return new EmployeeProperties(age, city, profile, provisioningState, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeCollection.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeCollection.cs new file mode 100644 index 000000000000..6fead5174202 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Contoso +{ + /// + /// 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 GetEmployees method from an instance of . + /// + public partial class EmployeeCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _employeeClientDiagnostics; + private readonly EmployeesRestOperations _employeeRestClient; + + /// Initializes a new instance of the class for mocking. + protected EmployeeCollection() + { + } + + /// 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 EmployeeCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _employeeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Contoso", EmployeeResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EmployeeResource.ResourceType, out string employeeApiVersion); + _employeeRestClient = new EmployeesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, employeeApiVersion); +#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 Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 Employee. + /// Resource create parameters. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _employeeRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, data, cancellationToken).ConfigureAwait(false); + var operation = new ContosoArmOperation(new EmployeeOperationSource(Client), _employeeClientDiagnostics, Pipeline, _employeeRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, employeeName, 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 Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 Employee. + /// Resource create parameters. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _employeeRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, employeeName, data, cancellationToken); + var operation = new ContosoArmOperation(new EmployeeOperationSource(Client), _employeeClientDiagnostics, Pipeline, _employeeRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, employeeName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Get"); + scope.Start(); + try + { + var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Get"); + scope.Start(); + try + { + var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Employee resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _employeeRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _employeeRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), _employeeClientDiagnostics, Pipeline, "EmployeeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Employee resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _employeeRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _employeeRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), _employeeClientDiagnostics, Pipeline, "EmployeeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Exists"); + scope.Start(); + try + { + var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, 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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Exists"); + scope.Start(); + try + { + var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.GetIfExists"); + scope.Start(); + try + { + var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(Client, response.Value), 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/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.Serialization.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.Serialization.cs new file mode 100644 index 000000000000..6f63d6c28ea4 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Contoso.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Contoso +{ + public partial class EmployeeData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EmployeeData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + EmployeeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EmployeeData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEmployeeData(document.RootElement, options); + } + + internal static EmployeeData DeserializeEmployeeData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EmployeeProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = EmployeeProperties.DeserializeEmployeeProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + 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"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EmployeeData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EmployeeData)} does not support writing '{options.Format}' format."); + } + } + + EmployeeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEmployeeData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EmployeeData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.cs new file mode 100644 index 000000000000..081bdf1fe2c7 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Contoso.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Contoso +{ + /// + /// A class representing the Employee data model. + /// Employee resource + /// + public partial class EmployeeData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public EmployeeData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal EmployeeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EmployeeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EmployeeData() + { + } + + /// The resource-specific properties for this resource. + public EmployeeProperties Properties { get; set; } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.Serialization.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.Serialization.cs new file mode 100644 index 000000000000..9ba6d75f170e --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.Contoso +{ + public partial class EmployeeResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EmployeeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + EmployeeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.cs new file mode 100644 index 000000000000..d09c19428c4c --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.cs @@ -0,0 +1,698 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Contoso +{ + /// + /// A Class representing an Employee 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 GetEmployeeResource method. + /// Otherwise you can get one from its parent resource using the GetEmployee method. + /// + public partial class EmployeeResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The employeeName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string employeeName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _employeeClientDiagnostics; + private readonly EmployeesRestOperations _employeeRestClient; + private readonly EmployeeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Contoso/employees"; + + /// Initializes a new instance of the class for mocking. + protected EmployeeResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EmployeeResource(ArmClient client, EmployeeData 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 EmployeeResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _employeeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Contoso", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string employeeApiVersion); + _employeeRestClient = new EmployeesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, employeeApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 EmployeeData 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 Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Get"); + scope.Start(); + try + { + var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Get"); + scope.Start(); + try + { + var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Delete + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.Delete"); + scope.Start(); + try + { + var response = await _employeeRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ContosoArmOperation(_employeeClientDiagnostics, Pipeline, _employeeRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Delete + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.Delete"); + scope.Start(); + try + { + var response = _employeeRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ContosoArmOperation(_employeeClientDiagnostics, Pipeline, _employeeRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Update + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Update"); + scope.Start(); + try + { + var response = await _employeeRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Update + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Update"); + scope.Start(); + try + { + var response = _employeeRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken); + return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EmployeeData(current.Location); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EmployeeData(current.Location); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + 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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EmployeeData(current.Location); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + 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.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + 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 = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EmployeeData(current.Location); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new EmployeeData(current.Location); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _employeeClientDiagnostics.CreateScope("EmployeeResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new EmployeeData(current.Location); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/ContosoExtensions.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/ContosoExtensions.cs new file mode 100644 index 000000000000..3e8c2e0d8d70 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/ContosoExtensions.cs @@ -0,0 +1,219 @@ +// 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.Core; +using Azure.ResourceManager.Contoso.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Contoso +{ + /// A class to add extension methods to Azure.ResourceManager.Contoso. + public static partial class ContosoExtensions + { + private static MockableContosoArmClient GetMockableContosoArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableContosoArmClient(client0)); + } + + private static MockableContosoResourceGroupResource GetMockableContosoResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableContosoResourceGroupResource(client, resource.Id)); + } + + private static MockableContosoSubscriptionResource GetMockableContosoSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableContosoSubscriptionResource(client, resource.Id)); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static EmployeeResource GetEmployeeResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContosoArmClient(client).GetEmployeeResource(id); + } + + /// + /// Gets a collection of EmployeeResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of EmployeeResources and their operations over a EmployeeResource. + public static EmployeeCollection GetEmployees(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableContosoResourceGroupResource(resourceGroupResource).GetEmployees(); + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Employee. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetEmployeeAsync(this ResourceGroupResource resourceGroupResource, string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableContosoResourceGroupResource(resourceGroupResource).GetEmployeeAsync(employeeName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Employee. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetEmployee(this ResourceGroupResource resourceGroupResource, string employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableContosoResourceGroupResource(resourceGroupResource).GetEmployee(employeeName, cancellationToken); + } + + /// + /// List Employee resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListBySubscription + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetEmployeesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableContosoSubscriptionResource(subscriptionResource).GetEmployeesAsync(cancellationToken); + } + + /// + /// List Employee resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListBySubscription + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetEmployees(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableContosoSubscriptionResource(subscriptionResource).GetEmployees(cancellationToken); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoArmClient.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoArmClient.cs new file mode 100644 index 000000000000..9dd8be4758d4 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoArmClient.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.Contoso.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableContosoArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableContosoArmClient() + { + } + + /// 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 MockableContosoArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableContosoArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual EmployeeResource GetEmployeeResource(ResourceIdentifier id) + { + EmployeeResource.ValidateResourceId(id); + return new EmployeeResource(Client, id); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoResourceGroupResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoResourceGroupResource.cs new file mode 100644 index 000000000000..a4c47d382ed8 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoResourceGroupResource.cs @@ -0,0 +1,105 @@ +// 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.Core; + +namespace Azure.ResourceManager.Contoso.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableContosoResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableContosoResourceGroupResource() + { + } + + /// 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 MockableContosoResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of EmployeeResources in the ResourceGroupResource. + /// An object representing collection of EmployeeResources and their operations over a EmployeeResource. + public virtual EmployeeCollection GetEmployees() + { + return GetCachedClient(client => new EmployeeCollection(client, Id)); + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEmployeeAsync(string employeeName, CancellationToken cancellationToken = default) + { + return await GetEmployees().GetAsync(employeeName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Employee + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName} + /// + /// + /// Operation Id + /// Employee_Get + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Employee. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEmployee(string employeeName, CancellationToken cancellationToken = default) + { + return GetEmployees().Get(employeeName, cancellationToken); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoSubscriptionResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoSubscriptionResource.cs new file mode 100644 index 000000000000..6a116f9716a3 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoSubscriptionResource.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Contoso.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableContosoSubscriptionResource : ArmResource + { + private ClientDiagnostics _employeeClientDiagnostics; + private EmployeesRestOperations _employeeRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableContosoSubscriptionResource() + { + } + + /// 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 MockableContosoSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics EmployeeClientDiagnostics => _employeeClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Contoso", EmployeeResource.ResourceType.Namespace, Diagnostics); + private EmployeesRestOperations EmployeeRestClient => _employeeRestClient ??= new EmployeesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EmployeeResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List Employee resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListBySubscription + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetEmployeesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EmployeeRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EmployeeRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), EmployeeClientDiagnostics, Pipeline, "MockableContosoSubscriptionResource.GetEmployees", "value", "nextLink", cancellationToken); + } + + /// + /// List Employee resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees + /// + /// + /// Operation Id + /// Employee_ListBySubscription + /// + /// + /// Default Api Version + /// 2021-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetEmployees(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => EmployeeRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EmployeeRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), EmployeeClientDiagnostics, Pipeline, "MockableContosoSubscriptionResource.GetEmployees", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Argument.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..b146fadb7828 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Contoso +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..c2b481265f05 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Contoso +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingList.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..28e10b878f86 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// 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.Linq; + +namespace Azure.ResourceManager.Contoso +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..5b13d8c23e13 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.Contoso +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Optional.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..3d6bd293a801 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Optional.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; + +namespace Azure.ResourceManager.Contoso +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..50d04f500cd4 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.Contoso +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperation.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperation.cs new file mode 100644 index 000000000000..2badd30f1f7b --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperation.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Contoso +{ +#pragma warning disable SA1649 // File name should match first type name + internal class ContosoArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of ContosoArmOperation for mocking. + protected ContosoArmOperation() + { + } + + internal ContosoArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal ContosoArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "ContosoArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + 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/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperationOfT.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperationOfT.cs new file mode 100644 index 000000000000..4b59643530b2 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/ContosoArmOperationOfT.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Contoso +{ +#pragma warning disable SA1649 // File name should match first type name + internal class ContosoArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of ContosoArmOperation for mocking. + protected ContosoArmOperation() + { + } + + internal ContosoArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal ContosoArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "ContosoArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + 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/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/EmployeeOperationSource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/EmployeeOperationSource.cs new file mode 100644 index 000000000000..40897fe08bcb --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/LongRunningOperation/EmployeeOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.Contoso +{ + internal class EmployeeOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EmployeeOperationSource(ArmClient client) + { + _client = client; + } + + EmployeeResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new EmployeeResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new EmployeeResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.Serialization.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.Serialization.cs new file mode 100644 index 000000000000..5a1ac3f3643f --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Contoso.Models +{ + internal partial class EmployeeListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EmployeeListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EmployeeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EmployeeListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEmployeeListResult(document.RootElement, options); + } + + internal static EmployeeListResult DeserializeEmployeeListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EmployeeData.DeserializeEmployeeData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EmployeeListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EmployeeListResult)} does not support writing '{options.Format}' format."); + } + } + + EmployeeListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEmployeeListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EmployeeListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.cs new file mode 100644 index 000000000000..f40f6693d057 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.Contoso.Models +{ + /// The response of a Employee list operation. + internal partial class EmployeeListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Employee items on this page. + /// is null. + internal EmployeeListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Employee items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal EmployeeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EmployeeListResult() + { + } + + /// The Employee items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.Serialization.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.Serialization.cs new file mode 100644 index 000000000000..5c469fe54d30 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Contoso.Models +{ + public partial class EmployeeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EmployeeProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Age)) + { + writer.WritePropertyName("age"u8); + writer.WriteNumberValue(Age.Value); + } + if (Optional.IsDefined(City)) + { + writer.WritePropertyName("city"u8); + writer.WriteStringValue(City); + } + if (Optional.IsDefined(Profile)) + { + writer.WritePropertyName("profile"u8); + writer.WriteBase64StringValue(Profile, "U"); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EmployeeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EmployeeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEmployeeProperties(document.RootElement, options); + } + + internal static EmployeeProperties DeserializeEmployeeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? age = default; + string city = default; + byte[] profile = default; + ProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("age"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + age = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("city"u8)) + { + city = property.Value.GetString(); + continue; + } + if (property.NameEquals("profile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + profile = property.Value.GetBytesFromBase64("U"); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EmployeeProperties(age, city, profile, provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EmployeeProperties)} does not support writing '{options.Format}' format."); + } + } + + EmployeeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEmployeeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EmployeeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.cs new file mode 100644 index 000000000000..f17e5ee5c7df --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/EmployeeProperties.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Contoso.Models +{ + /// Employee properties. + public partial class EmployeeProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EmployeeProperties() + { + } + + /// Initializes a new instance of . + /// Age of employee. + /// City of employee. + /// Profile of employee. + /// The status of the last operation. + /// Keeps track of any properties unknown to the library. + internal EmployeeProperties(int? age, string city, byte[] profile, ProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Age = age; + City = city; + Profile = profile; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Age of employee. + public int? Age { get; set; } + /// City of employee. + public string City { get; set; } + /// Profile of employee. + public byte[] Profile { get; set; } + /// The status of the last operation. + public ProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/ProvisioningState.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..3b650fd30ca1 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Models/ProvisioningState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Contoso.Models +{ + /// The resource provisioning state. + 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 SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string ProvisioningValue = "Provisioning"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + private const string AcceptedValue = "Accepted"; + + /// Resource has been created. + public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); + /// Resource creation failed. + public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); + /// Resource creation was canceled. + public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); + /// The resource is being provisioned. + public static ProvisioningState Provisioning { get; } = new ProvisioningState(ProvisioningValue); + /// The resource is updating. + public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); + /// The resource is being deleted. + public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); + /// The resource create request has been accepted. + public static ProvisioningState Accepted { get; } = new ProvisioningState(AcceptedValue); + /// 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 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 != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ProviderConstants.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..58224a637312 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.Contoso +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/RestOperations/EmployeesRestOperations.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/RestOperations/EmployeesRestOperations.cs new file mode 100644 index 000000000000..b13e791dc40f --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/RestOperations/EmployeesRestOperations.cs @@ -0,0 +1,731 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Contoso.Models; + +namespace Azure.ResourceManager.Contoso +{ + internal partial class EmployeesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of EmployeesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public EmployeesRestOperations(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 ?? "2021-11-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string employeeName) + { + 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string employeeName) + { + 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// 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 employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, employeeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EmployeeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeData.DeserializeEmployeeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EmployeeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// 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 employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, employeeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EmployeeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeData.DeserializeEmployeeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EmployeeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string employeeName, EmployeeData data) + { + 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string employeeName, EmployeeData 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.Contoso/employees/", false); + uri.AppendPath(employeeName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// Resource create parameters. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, employeeName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// Resource create parameters. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, employeeName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string employeeName, EmployeeData data) + { + 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string employeeName, EmployeeData 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.Contoso/employees/", false); + uri.AppendPath(employeeName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// The resource properties to be updated. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, employeeName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EmployeeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeData.DeserializeEmployeeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// The resource properties to be updated. + /// 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 employeeName, EmployeeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, employeeName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EmployeeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeData.DeserializeEmployeeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string employeeName) + { + 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string employeeName) + { + 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.Contoso/employees/", false); + uri.AppendPath(employeeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// 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 employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, employeeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Employee. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Employee. + /// 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 employeeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, employeeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + 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.Contoso/employees", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(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.Contoso/employees", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Employee resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EmployeeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Employee resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EmployeeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Contoso/employees", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + 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.Contoso/employees", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Employee resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + EmployeeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Employee resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + EmployeeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(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; + } + + /// List Employee resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(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 = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EmployeeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Employee resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(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 = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EmployeeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + 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; + } + + /// List Employee resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + EmployeeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Employee resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + EmployeeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmployeeListResult.DeserializeEmployeeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Properties/AssemblyInfo.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..113b6ed3d98f --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.Contoso.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("Contoso")] diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/tests/Azure.ResourceManager.Contoso.Tests.csproj b/sdk/contoso/Azure.ResourceManager.Contoso/tests/Azure.ResourceManager.Contoso.Tests.csproj new file mode 100644 index 000000000000..4b906ef77fda --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/tests/Azure.ResourceManager.Contoso.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestBase.cs b/sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestBase.cs new file mode 100644 index 000000000000..77599a7902fe --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.Contoso.Tests +{ + public class ContosoManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected ContosoManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected ContosoManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + 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/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestEnvironment.cs b/sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestEnvironment.cs new file mode 100644 index 000000000000..b1c4c91e35b3 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/tests/ContosoManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.Contoso.Tests +{ + public class ContosoManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/tsp-location.yaml b/sdk/contoso/Azure.ResourceManager.Contoso/tsp-location.yaml new file mode 100644 index 000000000000..6568b76750b4 --- /dev/null +++ b/sdk/contoso/Azure.ResourceManager.Contoso/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/contosowidgetmanager/Contoso.Management +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/contoso/ci.mgmt.yml b/sdk/contoso/ci.mgmt.yml new file mode 100644 index 000000000000..3485a663b46d --- /dev/null +++ b/sdk/contoso/ci.mgmt.yml @@ -0,0 +1,26 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/contoso /ci.mgmt.yml + - sdk/contoso /Azure.ResourceManager.Contoso / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: contoso + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.Contoso + safeName: AzureResourceManagerContoso diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/Azure.ResourceManager.DatabaseWatcher.sln b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/Azure.ResourceManager.DatabaseWatcher.sln new file mode 100644 index 000000000000..313caa46f33f --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/Azure.ResourceManager.DatabaseWatcher.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.DatabaseWatcher.Samples", "samples\Azure.ResourceManager.DatabaseWatcher.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.DatabaseWatcher", "src\Azure.ResourceManager.DatabaseWatcher.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.DatabaseWatcher.Tests", "tests\Azure.ResourceManager.DatabaseWatcher.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/CHANGELOG.md b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/Directory.Build.props b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/README.md b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/README.md new file mode 100644 index 000000000000..876bc6678452 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure DatabaseWatcher management client library for .NET + +**[Describe the service briefly first.]** + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - 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. + +## Getting started + +### Install the package + +Install the Microsoft Azure DatabaseWatcher management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.DatabaseWatcher --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET 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/dev/mgmt_quickstart.md). +- [API References](https://learn.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://aka.ms/azuresdk-net-mgmt-samples) + +## 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 about Microsoft Azure SDK, see [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 +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action 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 other 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/databasewatcher/Azure.ResourceManager.DatabaseWatcher/api/Azure.ResourceManager.DatabaseWatcher.net8.0.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/api/Azure.ResourceManager.DatabaseWatcher.net8.0.cs new file mode 100644 index 000000000000..600b1aa1b45a --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/api/Azure.ResourceManager.DatabaseWatcher.net8.0.cs @@ -0,0 +1,691 @@ +namespace Azure.ResourceManager.DatabaseWatcher +{ + public partial class AlertRuleResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AlertRuleResource() { } + public virtual Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string watcherName, string alertRuleResourceName) { 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; } + Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AlertRuleResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AlertRuleResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string alertRuleResourceName, Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string alertRuleResourceName, Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string alertRuleResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string alertRuleResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string alertRuleResourceName, 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 alertRuleResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string alertRuleResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string alertRuleResourceName, 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 AlertRuleResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AlertRuleResourceData() { } + public Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleResourceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public static partial class DatabaseWatcherExtensions + { + public static Azure.ResourceManager.DatabaseWatcher.AlertRuleResource GetAlertRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.HealthValidationResource GetHealthValidationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResource GetSharedPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.TargetResource GetTargetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetWatcher(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetWatcherAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.WatcherResource GetWatcherResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.WatcherCollection GetWatchers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetWatchers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetWatchersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class HealthValidationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected HealthValidationCollection() { } + public virtual Azure.Response Exists(string healthValidationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string healthValidationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string healthValidationName, 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 healthValidationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string healthValidationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string healthValidationName, 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 HealthValidationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HealthValidationData() { } + public Azure.ResourceManager.DatabaseWatcher.Models.HealthValidationProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.HealthValidationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.HealthValidationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HealthValidationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected HealthValidationResource() { } + public virtual Azure.ResourceManager.DatabaseWatcher.HealthValidationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string watcherName, string healthValidationName) { 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 StartValidation(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartValidationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DatabaseWatcher.HealthValidationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.HealthValidationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SharedPrivateLinkResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SharedPrivateLinkResource() { } + public virtual Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string watcherName, string sharedPrivateLinkResourceName) { 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; } + Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SharedPrivateLinkResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SharedPrivateLinkResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sharedPrivateLinkResourceName, Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sharedPrivateLinkResourceName, Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string sharedPrivateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string sharedPrivateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string sharedPrivateLinkResourceName, 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 sharedPrivateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string sharedPrivateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string sharedPrivateLinkResourceName, 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 SharedPrivateLinkResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SharedPrivateLinkResourceData() { } + public Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TargetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected TargetCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string targetName, Azure.ResourceManager.DatabaseWatcher.TargetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string targetName, Azure.ResourceManager.DatabaseWatcher.TargetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string targetName, 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 targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string targetName, 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 TargetData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TargetData() { } + public Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.TargetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.TargetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TargetResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected TargetResource() { } + public virtual Azure.ResourceManager.DatabaseWatcher.TargetData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string watcherName, string targetName) { 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; } + Azure.ResourceManager.DatabaseWatcher.TargetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.TargetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.TargetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.TargetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class WatcherCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WatcherCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string watcherName, Azure.ResourceManager.DatabaseWatcher.WatcherData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string watcherName, Azure.ResourceManager.DatabaseWatcher.WatcherData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string watcherName, 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 watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string watcherName, 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 WatcherData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WatcherData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityV4 Identity { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.WatcherProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.WatcherData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.WatcherData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WatcherResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WatcherResource() { } + public virtual Azure.ResourceManager.DatabaseWatcher.WatcherData 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 watcherName) { 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 GetAlertRuleResource(string alertRuleResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAlertRuleResourceAsync(string alertRuleResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceCollection GetAlertRuleResources() { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetHealthValidation(string healthValidationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetHealthValidationAsync(string healthValidationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.HealthValidationCollection GetHealthValidations() { throw null; } + public virtual Azure.Response GetSharedPrivateLinkResource(string sharedPrivateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSharedPrivateLinkResourceAsync(string sharedPrivateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceCollection GetSharedPrivateLinkResources() { throw null; } + public virtual Azure.Response GetTarget(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTargetAsync(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.TargetCollection GetTargets() { 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; } + Azure.ResourceManager.DatabaseWatcher.WatcherData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.WatcherData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.Models.WatcherPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.Models.WatcherPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DatabaseWatcher.Mocking +{ + public partial class MockableDatabaseWatcherArmClient : Azure.ResourceManager.ArmResource + { + protected MockableDatabaseWatcherArmClient() { } + public virtual Azure.ResourceManager.DatabaseWatcher.AlertRuleResource GetAlertRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.HealthValidationResource GetHealthValidationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResource GetSharedPrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.TargetResource GetTargetResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.WatcherResource GetWatcherResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableDatabaseWatcherResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableDatabaseWatcherResourceGroupResource() { } + public virtual Azure.Response GetWatcher(string watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWatcherAsync(string watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.WatcherCollection GetWatchers() { throw null; } + } + public partial class MockableDatabaseWatcherSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableDatabaseWatcherSubscriptionResource() { } + public virtual Azure.Pageable GetWatchers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetWatchersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AlertRuleCreationProperty : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AlertRuleCreationProperty(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty CreatedWithActionGroup { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty None { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty 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.DatabaseWatcher.Models.AlertRuleCreationProperty left, Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty left, Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AlertRuleResourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AlertRuleResourceProperties(Azure.Core.ResourceIdentifier alertRuleResourceId, Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty createdWithProperties, System.DateTimeOffset createdOn, string alertRuleTemplateId, string alertRuleTemplateVersion) { } + public Azure.Core.ResourceIdentifier AlertRuleResourceId { get { throw null; } set { } } + public string AlertRuleTemplateId { get { throw null; } set { } } + public string AlertRuleTemplateVersion { get { throw null; } set { } } + public System.DateTimeOffset CreatedOn { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty CreatedWithProperties { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleResourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public static partial class ArmDatabaseWatcherModelFactory + { + public static Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData AlertRuleResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleResourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleResourceProperties AlertRuleResourceProperties(Azure.Core.ResourceIdentifier alertRuleResourceId = null, Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty createdWithProperties = default(Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty), System.DateTimeOffset createdOn = default(System.DateTimeOffset), Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState?), string alertRuleTemplateId = null, string alertRuleTemplateVersion = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.HealthValidationData HealthValidationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseWatcher.Models.HealthValidationProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.HealthValidationProperties HealthValidationProperties(System.DateTimeOffset startOn = default(System.DateTimeOffset), System.DateTimeOffset endOn = default(System.DateTimeOffset), Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus status = default(Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus), System.Collections.Generic.IEnumerable issues = null, Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityV4 ManagedServiceIdentityV4(System.Guid? principalId = default(System.Guid?), System.Guid? tenantId = default(System.Guid?), Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType type = default(Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType), System.Collections.Generic.IDictionary userAssignedIdentities = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData SharedPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceProperties SharedPrivateLinkResourceProperties(Azure.Core.ResourceIdentifier privateLinkResourceId = null, string groupId = null, string requestMessage = null, string dnsZone = null, Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus? status = default(Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus?), Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.SqlDbElasticPoolTargetProperties SqlDbElasticPoolTargetProperties(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType = default(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType), Azure.ResourceManager.DatabaseWatcher.Models.VaultSecret targetVault = null, string connectionServerName = null, Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState?), Azure.Core.ResourceIdentifier sqlEpResourceId = null, Azure.Core.ResourceIdentifier anchorDatabaseResourceId = null, bool? readIntent = default(bool?)) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.SqlDbSingleDatabaseTargetProperties SqlDbSingleDatabaseTargetProperties(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType = default(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType), Azure.ResourceManager.DatabaseWatcher.Models.VaultSecret targetVault = null, string connectionServerName = null, Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState?), Azure.Core.ResourceIdentifier sqlDbResourceId = null, bool? readIntent = default(bool?)) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.SqlMiTargetProperties SqlMiTargetProperties(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType = default(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType), Azure.ResourceManager.DatabaseWatcher.Models.VaultSecret targetVault = null, string connectionServerName = null, Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState?), Azure.Core.ResourceIdentifier sqlMiResourceId = null, int? connectionTcpPort = default(int?), bool? readIntent = default(bool?)) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.TargetData TargetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties TargetProperties(string targetType = null, Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType = default(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType), Azure.ResourceManager.DatabaseWatcher.Models.VaultSecret targetVault = null, string connectionServerName = null, Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.ValidationIssue ValidationIssue(string errorCode = null, string errorMessage = null, string additionalDetails = null, string recommendationMessage = null, System.Uri recommendationUri = null, Azure.Core.ResourceIdentifier relatedResourceId = null, string relatedResourceType = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.WatcherData WatcherData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DatabaseWatcher.Models.WatcherProperties properties = null, Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityV4 identity = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.WatcherProperties WatcherProperties(Azure.ResourceManager.DatabaseWatcher.Models.Datastore datastore = null, Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus? status = default(Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus?), Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState?), Azure.Core.ResourceIdentifier defaultAlertRuleIdentityResourceId = null) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatabaseWatcherProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatabaseWatcherProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState 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.DatabaseWatcher.Models.DatabaseWatcherProvisioningState left, Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState left, Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class Datastore : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Datastore(string kustoClusterUri, string kustoDataIngestionUri, string kustoDatabaseName, string kustoManagementUri, Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType kustoOfferingType) { } + public Azure.Core.ResourceIdentifier AdxClusterResourceId { get { throw null; } set { } } + public string KustoClusterDisplayName { get { throw null; } set { } } + public string KustoClusterUri { get { throw null; } set { } } + public string KustoDatabaseName { get { throw null; } set { } } + public string KustoDataIngestionUri { get { throw null; } set { } } + public string KustoManagementUri { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType KustoOfferingType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.Datastore System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.Datastore System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HealthValidationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HealthValidationProperties() { } + public System.DateTimeOffset EndOn { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Issues { get { throw null; } } + public Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? ProvisioningState { get { throw null; } } + public System.DateTimeOffset StartOn { get { throw null; } } + public Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.HealthValidationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.HealthValidationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KustoOfferingType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KustoOfferingType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType Adx { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType Fabric { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType Free { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType 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.DatabaseWatcher.Models.KustoOfferingType left, Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType left, Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ManagedServiceIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ManagedServiceIdentityType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType None { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType SystemAndUserAssigned { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType 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.DatabaseWatcher.Models.ManagedServiceIdentityType left, Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType left, Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ManagedServiceIdentityV4 : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManagedServiceIdentityV4(Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType type) { } + public System.Guid? PrincipalId { get { throw null; } } + public System.Guid? TenantId { get { throw null; } } + public Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType Type { get { throw null; } set { } } + public System.Collections.Generic.IDictionary UserAssignedIdentities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityV4 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityV4 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState 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.DatabaseWatcher.Models.ResourceProvisioningState left, Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState left, Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SharedPrivateLinkResourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SharedPrivateLinkResourceProperties(Azure.Core.ResourceIdentifier privateLinkResourceId, string groupId, string requestMessage) { } + public string DnsZone { get { throw null; } set { } } + public string GroupId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier PrivateLinkResourceId { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? ProvisioningState { get { throw null; } } + public string RequestMessage { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SharedPrivateLinkResourceStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SharedPrivateLinkResourceStatus(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus Approved { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus Disconnected { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus Pending { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus Rejected { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus 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.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus left, Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus left, Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SqlDbElasticPoolTargetProperties : Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlDbElasticPoolTargetProperties(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType, string connectionServerName, Azure.Core.ResourceIdentifier sqlEpResourceId, Azure.Core.ResourceIdentifier anchorDatabaseResourceId) : base (default(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType), default(string)) { } + public Azure.Core.ResourceIdentifier AnchorDatabaseResourceId { get { throw null; } set { } } + public bool? ReadIntent { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SqlEpResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SqlDbElasticPoolTargetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SqlDbElasticPoolTargetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SqlDbSingleDatabaseTargetProperties : Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlDbSingleDatabaseTargetProperties(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType, string connectionServerName, Azure.Core.ResourceIdentifier sqlDbResourceId) : base (default(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType), default(string)) { } + public bool? ReadIntent { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SqlDbResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SqlDbSingleDatabaseTargetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SqlDbSingleDatabaseTargetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SqlMiTargetProperties : Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlMiTargetProperties(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType, string connectionServerName, Azure.Core.ResourceIdentifier sqlMiResourceId) : base (default(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType), default(string)) { } + public int? ConnectionTcpPort { get { throw null; } set { } } + public bool? ReadIntent { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SqlMiResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SqlMiTargetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SqlMiTargetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TargetAuthenticationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TargetAuthenticationType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType Aad { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType Sql { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType 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.DatabaseWatcher.Models.TargetAuthenticationType left, Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType left, Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class TargetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected TargetProperties(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType, string connectionServerName) { } + public string ConnectionServerName { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType TargetAuthenticationType { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.VaultSecret TargetVault { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ValidationIssue : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ValidationIssue() { } + public string AdditionalDetails { get { throw null; } } + public string ErrorCode { get { throw null; } } + public string ErrorMessage { get { throw null; } } + public string RecommendationMessage { get { throw null; } } + public System.Uri RecommendationUri { get { throw null; } } + public Azure.Core.ResourceIdentifier RelatedResourceId { get { throw null; } } + public string RelatedResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.ValidationIssue System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.ValidationIssue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ValidationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ValidationStatus(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus Canceled { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus Failed { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus NotStarted { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus Running { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus Succeeded { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus TimedOut { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus 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.DatabaseWatcher.Models.ValidationStatus left, Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus left, Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class VaultSecret : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VaultSecret() { } + public Azure.Core.ResourceIdentifier AkvResourceId { get { throw null; } set { } } + public string AkvTargetPassword { get { throw null; } set { } } + public string AkvTargetUser { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.VaultSecret System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.VaultSecret System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WatcherPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WatcherPatch() { } + public Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityV4 Identity { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.WatcherUpdateProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.WatcherPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.WatcherPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WatcherProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WatcherProperties() { } + public Azure.ResourceManager.DatabaseWatcher.Models.Datastore Datastore { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier DefaultAlertRuleIdentityResourceId { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.WatcherProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.WatcherProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WatcherStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WatcherStatus(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus Deleting { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus Running { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus Starting { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus Stopped { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus Stopping { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus 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.DatabaseWatcher.Models.WatcherStatus left, Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus left, Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WatcherUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WatcherUpdateProperties() { } + public Azure.ResourceManager.DatabaseWatcher.Models.Datastore Datastore { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier DefaultAlertRuleIdentityResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.WatcherUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.WatcherUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/api/Azure.ResourceManager.DatabaseWatcher.netstandard2.0.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/api/Azure.ResourceManager.DatabaseWatcher.netstandard2.0.cs new file mode 100644 index 000000000000..600b1aa1b45a --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/api/Azure.ResourceManager.DatabaseWatcher.netstandard2.0.cs @@ -0,0 +1,691 @@ +namespace Azure.ResourceManager.DatabaseWatcher +{ + public partial class AlertRuleResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AlertRuleResource() { } + public virtual Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string watcherName, string alertRuleResourceName) { 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; } + Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AlertRuleResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AlertRuleResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string alertRuleResourceName, Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string alertRuleResourceName, Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string alertRuleResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string alertRuleResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string alertRuleResourceName, 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 alertRuleResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string alertRuleResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string alertRuleResourceName, 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 AlertRuleResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AlertRuleResourceData() { } + public Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleResourceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public static partial class DatabaseWatcherExtensions + { + public static Azure.ResourceManager.DatabaseWatcher.AlertRuleResource GetAlertRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.HealthValidationResource GetHealthValidationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResource GetSharedPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.TargetResource GetTargetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetWatcher(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetWatcherAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.WatcherResource GetWatcherResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.WatcherCollection GetWatchers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetWatchers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetWatchersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class HealthValidationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected HealthValidationCollection() { } + public virtual Azure.Response Exists(string healthValidationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string healthValidationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string healthValidationName, 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 healthValidationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string healthValidationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string healthValidationName, 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 HealthValidationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HealthValidationData() { } + public Azure.ResourceManager.DatabaseWatcher.Models.HealthValidationProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.HealthValidationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.HealthValidationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HealthValidationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected HealthValidationResource() { } + public virtual Azure.ResourceManager.DatabaseWatcher.HealthValidationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string watcherName, string healthValidationName) { 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 StartValidation(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartValidationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DatabaseWatcher.HealthValidationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.HealthValidationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SharedPrivateLinkResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SharedPrivateLinkResource() { } + public virtual Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string watcherName, string sharedPrivateLinkResourceName) { 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; } + Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SharedPrivateLinkResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SharedPrivateLinkResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sharedPrivateLinkResourceName, Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sharedPrivateLinkResourceName, Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string sharedPrivateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string sharedPrivateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string sharedPrivateLinkResourceName, 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 sharedPrivateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string sharedPrivateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string sharedPrivateLinkResourceName, 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 SharedPrivateLinkResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SharedPrivateLinkResourceData() { } + public Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TargetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected TargetCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string targetName, Azure.ResourceManager.DatabaseWatcher.TargetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string targetName, Azure.ResourceManager.DatabaseWatcher.TargetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string targetName, 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 targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string targetName, 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 TargetData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TargetData() { } + public Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.TargetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.TargetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TargetResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected TargetResource() { } + public virtual Azure.ResourceManager.DatabaseWatcher.TargetData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string watcherName, string targetName) { 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; } + Azure.ResourceManager.DatabaseWatcher.TargetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.TargetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.TargetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.TargetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class WatcherCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WatcherCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string watcherName, Azure.ResourceManager.DatabaseWatcher.WatcherData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string watcherName, Azure.ResourceManager.DatabaseWatcher.WatcherData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string watcherName, 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 watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string watcherName, 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 WatcherData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WatcherData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityV4 Identity { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.WatcherProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.WatcherData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.WatcherData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WatcherResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WatcherResource() { } + public virtual Azure.ResourceManager.DatabaseWatcher.WatcherData 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 watcherName) { 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 GetAlertRuleResource(string alertRuleResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAlertRuleResourceAsync(string alertRuleResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceCollection GetAlertRuleResources() { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetHealthValidation(string healthValidationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetHealthValidationAsync(string healthValidationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.HealthValidationCollection GetHealthValidations() { throw null; } + public virtual Azure.Response GetSharedPrivateLinkResource(string sharedPrivateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSharedPrivateLinkResourceAsync(string sharedPrivateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceCollection GetSharedPrivateLinkResources() { throw null; } + public virtual Azure.Response GetTarget(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTargetAsync(string targetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.TargetCollection GetTargets() { 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; } + Azure.ResourceManager.DatabaseWatcher.WatcherData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.WatcherData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.Models.WatcherPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseWatcher.Models.WatcherPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DatabaseWatcher.Mocking +{ + public partial class MockableDatabaseWatcherArmClient : Azure.ResourceManager.ArmResource + { + protected MockableDatabaseWatcherArmClient() { } + public virtual Azure.ResourceManager.DatabaseWatcher.AlertRuleResource GetAlertRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.HealthValidationResource GetHealthValidationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResource GetSharedPrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.TargetResource GetTargetResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.WatcherResource GetWatcherResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableDatabaseWatcherResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableDatabaseWatcherResourceGroupResource() { } + public virtual Azure.Response GetWatcher(string watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWatcherAsync(string watcherName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseWatcher.WatcherCollection GetWatchers() { throw null; } + } + public partial class MockableDatabaseWatcherSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableDatabaseWatcherSubscriptionResource() { } + public virtual Azure.Pageable GetWatchers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetWatchersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AlertRuleCreationProperty : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AlertRuleCreationProperty(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty CreatedWithActionGroup { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty None { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty 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.DatabaseWatcher.Models.AlertRuleCreationProperty left, Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty left, Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AlertRuleResourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AlertRuleResourceProperties(Azure.Core.ResourceIdentifier alertRuleResourceId, Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty createdWithProperties, System.DateTimeOffset createdOn, string alertRuleTemplateId, string alertRuleTemplateVersion) { } + public Azure.Core.ResourceIdentifier AlertRuleResourceId { get { throw null; } set { } } + public string AlertRuleTemplateId { get { throw null; } set { } } + public string AlertRuleTemplateVersion { get { throw null; } set { } } + public System.DateTimeOffset CreatedOn { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty CreatedWithProperties { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleResourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public static partial class ArmDatabaseWatcherModelFactory + { + public static Azure.ResourceManager.DatabaseWatcher.AlertRuleResourceData AlertRuleResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleResourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleResourceProperties AlertRuleResourceProperties(Azure.Core.ResourceIdentifier alertRuleResourceId = null, Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty createdWithProperties = default(Azure.ResourceManager.DatabaseWatcher.Models.AlertRuleCreationProperty), System.DateTimeOffset createdOn = default(System.DateTimeOffset), Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState?), string alertRuleTemplateId = null, string alertRuleTemplateVersion = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.HealthValidationData HealthValidationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseWatcher.Models.HealthValidationProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.HealthValidationProperties HealthValidationProperties(System.DateTimeOffset startOn = default(System.DateTimeOffset), System.DateTimeOffset endOn = default(System.DateTimeOffset), Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus status = default(Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus), System.Collections.Generic.IEnumerable issues = null, Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityV4 ManagedServiceIdentityV4(System.Guid? principalId = default(System.Guid?), System.Guid? tenantId = default(System.Guid?), Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType type = default(Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType), System.Collections.Generic.IDictionary userAssignedIdentities = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.SharedPrivateLinkResourceData SharedPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceProperties SharedPrivateLinkResourceProperties(Azure.Core.ResourceIdentifier privateLinkResourceId = null, string groupId = null, string requestMessage = null, string dnsZone = null, Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus? status = default(Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus?), Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.SqlDbElasticPoolTargetProperties SqlDbElasticPoolTargetProperties(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType = default(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType), Azure.ResourceManager.DatabaseWatcher.Models.VaultSecret targetVault = null, string connectionServerName = null, Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState?), Azure.Core.ResourceIdentifier sqlEpResourceId = null, Azure.Core.ResourceIdentifier anchorDatabaseResourceId = null, bool? readIntent = default(bool?)) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.SqlDbSingleDatabaseTargetProperties SqlDbSingleDatabaseTargetProperties(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType = default(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType), Azure.ResourceManager.DatabaseWatcher.Models.VaultSecret targetVault = null, string connectionServerName = null, Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState?), Azure.Core.ResourceIdentifier sqlDbResourceId = null, bool? readIntent = default(bool?)) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.SqlMiTargetProperties SqlMiTargetProperties(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType = default(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType), Azure.ResourceManager.DatabaseWatcher.Models.VaultSecret targetVault = null, string connectionServerName = null, Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState?), Azure.Core.ResourceIdentifier sqlMiResourceId = null, int? connectionTcpPort = default(int?), bool? readIntent = default(bool?)) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.TargetData TargetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties TargetProperties(string targetType = null, Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType = default(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType), Azure.ResourceManager.DatabaseWatcher.Models.VaultSecret targetVault = null, string connectionServerName = null, Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.ValidationIssue ValidationIssue(string errorCode = null, string errorMessage = null, string additionalDetails = null, string recommendationMessage = null, System.Uri recommendationUri = null, Azure.Core.ResourceIdentifier relatedResourceId = null, string relatedResourceType = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.WatcherData WatcherData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DatabaseWatcher.Models.WatcherProperties properties = null, Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityV4 identity = null) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.WatcherProperties WatcherProperties(Azure.ResourceManager.DatabaseWatcher.Models.Datastore datastore = null, Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus? status = default(Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus?), Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState?), Azure.Core.ResourceIdentifier defaultAlertRuleIdentityResourceId = null) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatabaseWatcherProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatabaseWatcherProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState 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.DatabaseWatcher.Models.DatabaseWatcherProvisioningState left, Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState left, Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class Datastore : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Datastore(string kustoClusterUri, string kustoDataIngestionUri, string kustoDatabaseName, string kustoManagementUri, Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType kustoOfferingType) { } + public Azure.Core.ResourceIdentifier AdxClusterResourceId { get { throw null; } set { } } + public string KustoClusterDisplayName { get { throw null; } set { } } + public string KustoClusterUri { get { throw null; } set { } } + public string KustoDatabaseName { get { throw null; } set { } } + public string KustoDataIngestionUri { get { throw null; } set { } } + public string KustoManagementUri { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType KustoOfferingType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.Datastore System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.Datastore System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HealthValidationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HealthValidationProperties() { } + public System.DateTimeOffset EndOn { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Issues { get { throw null; } } + public Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? ProvisioningState { get { throw null; } } + public System.DateTimeOffset StartOn { get { throw null; } } + public Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.HealthValidationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.HealthValidationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KustoOfferingType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KustoOfferingType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType Adx { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType Fabric { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType Free { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType 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.DatabaseWatcher.Models.KustoOfferingType left, Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType left, Azure.ResourceManager.DatabaseWatcher.Models.KustoOfferingType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ManagedServiceIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ManagedServiceIdentityType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType None { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType SystemAndUserAssigned { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType 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.DatabaseWatcher.Models.ManagedServiceIdentityType left, Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType left, Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ManagedServiceIdentityV4 : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManagedServiceIdentityV4(Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType type) { } + public System.Guid? PrincipalId { get { throw null; } } + public System.Guid? TenantId { get { throw null; } } + public Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityType Type { get { throw null; } set { } } + public System.Collections.Generic.IDictionary UserAssignedIdentities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityV4 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityV4 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState 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.DatabaseWatcher.Models.ResourceProvisioningState left, Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState left, Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SharedPrivateLinkResourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SharedPrivateLinkResourceProperties(Azure.Core.ResourceIdentifier privateLinkResourceId, string groupId, string requestMessage) { } + public string DnsZone { get { throw null; } set { } } + public string GroupId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier PrivateLinkResourceId { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? ProvisioningState { get { throw null; } } + public string RequestMessage { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SharedPrivateLinkResourceStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SharedPrivateLinkResourceStatus(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus Approved { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus Disconnected { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus Pending { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus Rejected { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus 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.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus left, Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus left, Azure.ResourceManager.DatabaseWatcher.Models.SharedPrivateLinkResourceStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SqlDbElasticPoolTargetProperties : Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlDbElasticPoolTargetProperties(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType, string connectionServerName, Azure.Core.ResourceIdentifier sqlEpResourceId, Azure.Core.ResourceIdentifier anchorDatabaseResourceId) : base (default(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType), default(string)) { } + public Azure.Core.ResourceIdentifier AnchorDatabaseResourceId { get { throw null; } set { } } + public bool? ReadIntent { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SqlEpResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SqlDbElasticPoolTargetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SqlDbElasticPoolTargetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SqlDbSingleDatabaseTargetProperties : Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlDbSingleDatabaseTargetProperties(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType, string connectionServerName, Azure.Core.ResourceIdentifier sqlDbResourceId) : base (default(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType), default(string)) { } + public bool? ReadIntent { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SqlDbResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SqlDbSingleDatabaseTargetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SqlDbSingleDatabaseTargetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SqlMiTargetProperties : Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlMiTargetProperties(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType, string connectionServerName, Azure.Core.ResourceIdentifier sqlMiResourceId) : base (default(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType), default(string)) { } + public int? ConnectionTcpPort { get { throw null; } set { } } + public bool? ReadIntent { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SqlMiResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SqlMiTargetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.SqlMiTargetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TargetAuthenticationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TargetAuthenticationType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType Aad { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType Sql { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType 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.DatabaseWatcher.Models.TargetAuthenticationType left, Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType left, Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class TargetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected TargetProperties(Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType targetAuthenticationType, string connectionServerName) { } + public string ConnectionServerName { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.ResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DatabaseWatcher.Models.TargetAuthenticationType TargetAuthenticationType { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.VaultSecret TargetVault { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.TargetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ValidationIssue : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ValidationIssue() { } + public string AdditionalDetails { get { throw null; } } + public string ErrorCode { get { throw null; } } + public string ErrorMessage { get { throw null; } } + public string RecommendationMessage { get { throw null; } } + public System.Uri RecommendationUri { get { throw null; } } + public Azure.Core.ResourceIdentifier RelatedResourceId { get { throw null; } } + public string RelatedResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.ValidationIssue System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.ValidationIssue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ValidationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ValidationStatus(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus Canceled { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus Failed { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus NotStarted { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus Running { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus Succeeded { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus TimedOut { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus 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.DatabaseWatcher.Models.ValidationStatus left, Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus left, Azure.ResourceManager.DatabaseWatcher.Models.ValidationStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class VaultSecret : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VaultSecret() { } + public Azure.Core.ResourceIdentifier AkvResourceId { get { throw null; } set { } } + public string AkvTargetPassword { get { throw null; } set { } } + public string AkvTargetUser { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.VaultSecret System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.VaultSecret System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WatcherPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WatcherPatch() { } + public Azure.ResourceManager.DatabaseWatcher.Models.ManagedServiceIdentityV4 Identity { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.WatcherUpdateProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.WatcherPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.WatcherPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WatcherProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WatcherProperties() { } + public Azure.ResourceManager.DatabaseWatcher.Models.Datastore Datastore { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier DefaultAlertRuleIdentityResourceId { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseWatcher.Models.DatabaseWatcherProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.WatcherProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.WatcherProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WatcherStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WatcherStatus(string value) { throw null; } + public static Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus Deleting { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus Running { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus Starting { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus Stopped { get { throw null; } } + public static Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus Stopping { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus 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.DatabaseWatcher.Models.WatcherStatus left, Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus left, Azure.ResourceManager.DatabaseWatcher.Models.WatcherStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WatcherUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WatcherUpdateProperties() { } + public Azure.ResourceManager.DatabaseWatcher.Models.Datastore Datastore { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier DefaultAlertRuleIdentityResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.WatcherUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseWatcher.Models.WatcherUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/assets.json b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/assets.json new file mode 100644 index 000000000000..169779905282 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/databasewatcher/Azure.ResourceManager.DatabaseWatcher", + "Tag": "" +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Azure.ResourceManager.DatabaseWatcher.Samples.csproj b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Azure.ResourceManager.DatabaseWatcher.Samples.csproj new file mode 100644 index 000000000000..4750448f1e63 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Azure.ResourceManager.DatabaseWatcher.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_AlertRuleResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_AlertRuleResource.cs new file mode 100644 index 000000000000..3485ac40f5df --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_AlertRuleResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseWatcher.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseWatcher.Samples +{ + public partial class Sample_AlertRuleResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AlertRuleResourcesGetMaximumSet() + { + // Generated from example definition: 2025-01-02/AlertRuleResources_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AlertRuleResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AlertRuleResource created on azure + // for more information of creating AlertRuleResource, please refer to the document of AlertRuleResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + string alertRuleResourceName = "testAlert"; + ResourceIdentifier alertRuleResourceId = AlertRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName, alertRuleResourceName); + AlertRuleResource alertRuleResource = client.GetAlertRuleResource(alertRuleResourceId); + + // invoke the operation + AlertRuleResource result = await alertRuleResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AlertRuleResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_AlertRuleResourcesDeleteMaximumSet() + { + // Generated from example definition: 2025-01-02/AlertRuleResources_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "AlertRuleResource_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AlertRuleResource created on azure + // for more information of creating AlertRuleResource, please refer to the document of AlertRuleResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + string alertRuleResourceName = "testAlert"; + ResourceIdentifier alertRuleResourceId = AlertRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName, alertRuleResourceName); + AlertRuleResource alertRuleResource = client.GetAlertRuleResource(alertRuleResourceId); + + // invoke the operation + await alertRuleResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_AlertRuleResourcesCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-01-02/AlertRuleResources_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "AlertRuleResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AlertRuleResource created on azure + // for more information of creating AlertRuleResource, please refer to the document of AlertRuleResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + string alertRuleResourceName = "testAlert"; + ResourceIdentifier alertRuleResourceId = AlertRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName, alertRuleResourceName); + AlertRuleResource alertRuleResource = client.GetAlertRuleResource(alertRuleResourceId); + + // invoke the operation + AlertRuleResourceData data = new AlertRuleResourceData + { + Properties = new AlertRuleResourceProperties(new ResourceIdentifier("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo"), AlertRuleCreationProperty.CreatedWithActionGroup, DateTimeOffset.Parse("2024-07-25T15:38:47.798Z"), "someTemplateId", "1.0"), + }; + ArmOperation lro = await alertRuleResource.UpdateAsync(WaitUntil.Completed, data); + AlertRuleResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AlertRuleResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_AlertRuleResourceCollection.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_AlertRuleResourceCollection.cs new file mode 100644 index 000000000000..44c4f3db380a --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_AlertRuleResourceCollection.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseWatcher.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseWatcher.Samples +{ + public partial class Sample_AlertRuleResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_AlertRuleResourcesCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-01-02/AlertRuleResources_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "AlertRuleResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this AlertRuleResource + AlertRuleResourceCollection collection = watcher.GetAlertRuleResources(); + + // invoke the operation + string alertRuleResourceName = "testAlert"; + AlertRuleResourceData data = new AlertRuleResourceData + { + Properties = new AlertRuleResourceProperties(new ResourceIdentifier("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo"), AlertRuleCreationProperty.CreatedWithActionGroup, DateTimeOffset.Parse("2024-07-25T15:38:47.798Z"), "someTemplateId", "1.0"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, alertRuleResourceName, data); + AlertRuleResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AlertRuleResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AlertRuleResourcesGetMaximumSet() + { + // Generated from example definition: 2025-01-02/AlertRuleResources_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AlertRuleResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this AlertRuleResource + AlertRuleResourceCollection collection = watcher.GetAlertRuleResources(); + + // invoke the operation + string alertRuleResourceName = "testAlert"; + AlertRuleResource result = await collection.GetAsync(alertRuleResourceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AlertRuleResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AlertRuleResourcesListByParentMaximumSet() + { + // Generated from example definition: 2025-01-02/AlertRuleResources_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "AlertRuleResource_ListByParent" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this AlertRuleResource + AlertRuleResourceCollection collection = watcher.GetAlertRuleResources(); + + // invoke the operation and iterate over the result + await foreach (AlertRuleResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AlertRuleResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AlertRuleResourcesGetMaximumSet() + { + // Generated from example definition: 2025-01-02/AlertRuleResources_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AlertRuleResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this AlertRuleResource + AlertRuleResourceCollection collection = watcher.GetAlertRuleResources(); + + // invoke the operation + string alertRuleResourceName = "testAlert"; + bool result = await collection.ExistsAsync(alertRuleResourceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AlertRuleResourcesGetMaximumSet() + { + // Generated from example definition: 2025-01-02/AlertRuleResources_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AlertRuleResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this AlertRuleResource + AlertRuleResourceCollection collection = watcher.GetAlertRuleResources(); + + // invoke the operation + string alertRuleResourceName = "testAlert"; + NullableResponse response = await collection.GetIfExistsAsync(alertRuleResourceName); + AlertRuleResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AlertRuleResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_HealthValidationCollection.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_HealthValidationCollection.cs new file mode 100644 index 000000000000..d42c055011fa --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_HealthValidationCollection.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseWatcher.Samples +{ + public partial class Sample_HealthValidationCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_HealthValidationsGetMaximumSet() + { + // Generated from example definition: 2025-01-02/HealthValidations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HealthValidation_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this HealthValidationResource + HealthValidationCollection collection = watcher.GetHealthValidations(); + + // invoke the operation + string healthValidationName = "testHealthValidation"; + HealthValidationResource result = await collection.GetAsync(healthValidationName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HealthValidationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_HealthValidationsListByParentMaximumSet() + { + // Generated from example definition: 2025-01-02/HealthValidations_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "HealthValidation_ListByParent" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this HealthValidationResource + HealthValidationCollection collection = watcher.GetHealthValidations(); + + // invoke the operation and iterate over the result + await foreach (HealthValidationResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HealthValidationData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_HealthValidationsGetMaximumSet() + { + // Generated from example definition: 2025-01-02/HealthValidations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HealthValidation_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this HealthValidationResource + HealthValidationCollection collection = watcher.GetHealthValidations(); + + // invoke the operation + string healthValidationName = "testHealthValidation"; + bool result = await collection.ExistsAsync(healthValidationName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_HealthValidationsGetMaximumSet() + { + // Generated from example definition: 2025-01-02/HealthValidations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HealthValidation_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this HealthValidationResource + HealthValidationCollection collection = watcher.GetHealthValidations(); + + // invoke the operation + string healthValidationName = "testHealthValidation"; + NullableResponse response = await collection.GetIfExistsAsync(healthValidationName); + HealthValidationResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HealthValidationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_HealthValidationResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_HealthValidationResource.cs new file mode 100644 index 000000000000..ce9b4741820d --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_HealthValidationResource.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseWatcher.Samples +{ + public partial class Sample_HealthValidationResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_HealthValidationsGetMaximumSet() + { + // Generated from example definition: 2025-01-02/HealthValidations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "HealthValidation_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HealthValidationResource created on azure + // for more information of creating HealthValidationResource, please refer to the document of HealthValidationResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + string healthValidationName = "testHealthValidation"; + ResourceIdentifier healthValidationResourceId = HealthValidationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName, healthValidationName); + HealthValidationResource healthValidation = client.GetHealthValidationResource(healthValidationResourceId); + + // invoke the operation + HealthValidationResource result = await healthValidation.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HealthValidationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task StartValidation_HealthValidationsStartValidationMaximumSet() + { + // Generated from example definition: 2025-01-02/HealthValidations_StartValidation_MaximumSet_Gen.json + // this example is just showing the usage of "HealthValidations_StartValidation" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HealthValidationResource created on azure + // for more information of creating HealthValidationResource, please refer to the document of HealthValidationResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + string healthValidationName = "testHealthValidation"; + ResourceIdentifier healthValidationResourceId = HealthValidationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName, healthValidationName); + HealthValidationResource healthValidation = client.GetHealthValidationResource(healthValidationResourceId); + + // invoke the operation + ArmOperation lro = await healthValidation.StartValidationAsync(WaitUntil.Completed); + HealthValidationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HealthValidationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_SharedPrivateLinkResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_SharedPrivateLinkResource.cs new file mode 100644 index 000000000000..8e163d7bf921 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_SharedPrivateLinkResource.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseWatcher.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseWatcher.Samples +{ + public partial class Sample_SharedPrivateLinkResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SharedPrivateLinkResourcesGetMaximumSet() + { + // Generated from example definition: 2025-01-02/SharedPrivateLinkResources_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SharedPrivateLinkResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SharedPrivateLinkResource created on azure + // for more information of creating SharedPrivateLinkResource, please refer to the document of SharedPrivateLinkResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + string sharedPrivateLinkResourceName = "monitoringh22eed"; + ResourceIdentifier sharedPrivateLinkResourceId = SharedPrivateLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName, sharedPrivateLinkResourceName); + SharedPrivateLinkResource sharedPrivateLinkResource = client.GetSharedPrivateLinkResource(sharedPrivateLinkResourceId); + + // invoke the operation + SharedPrivateLinkResource result = await sharedPrivateLinkResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SharedPrivateLinkResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SharedPrivateLinkResourcesDeleteMaximumSet() + { + // Generated from example definition: 2025-01-02/SharedPrivateLinkResources_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "SharedPrivateLinkResource_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SharedPrivateLinkResource created on azure + // for more information of creating SharedPrivateLinkResource, please refer to the document of SharedPrivateLinkResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + string sharedPrivateLinkResourceName = "monitoringh22eed"; + ResourceIdentifier sharedPrivateLinkResourceId = SharedPrivateLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName, sharedPrivateLinkResourceName); + SharedPrivateLinkResource sharedPrivateLinkResource = client.GetSharedPrivateLinkResource(sharedPrivateLinkResourceId); + + // invoke the operation + await sharedPrivateLinkResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SharedPrivateLinkResourcesCreateMaximumSet() + { + // Generated from example definition: 2025-01-02/SharedPrivateLinkResources_Create_MaximumSet_Gen.json + // this example is just showing the usage of "SharedPrivateLinkResource_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SharedPrivateLinkResource created on azure + // for more information of creating SharedPrivateLinkResource, please refer to the document of SharedPrivateLinkResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + string sharedPrivateLinkResourceName = "monitoringh22eed"; + ResourceIdentifier sharedPrivateLinkResourceId = SharedPrivateLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName, sharedPrivateLinkResourceName); + SharedPrivateLinkResource sharedPrivateLinkResource = client.GetSharedPrivateLinkResource(sharedPrivateLinkResourceId); + + // invoke the operation + SharedPrivateLinkResourceData data = new SharedPrivateLinkResourceData + { + Properties = new SharedPrivateLinkResourceProperties(new ResourceIdentifier("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.KeyVault/vaults/kvmo3ej9ih"), "vault", "request message") + { + DnsZone = "ec3ae9d410ba", + }, + }; + ArmOperation lro = await sharedPrivateLinkResource.UpdateAsync(WaitUntil.Completed, data); + SharedPrivateLinkResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SharedPrivateLinkResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_SharedPrivateLinkResourceCollection.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_SharedPrivateLinkResourceCollection.cs new file mode 100644 index 000000000000..8ea926df43bc --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_SharedPrivateLinkResourceCollection.cs @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseWatcher.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseWatcher.Samples +{ + public partial class Sample_SharedPrivateLinkResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SharedPrivateLinkResourcesCreateMaximumSet() + { + // Generated from example definition: 2025-01-02/SharedPrivateLinkResources_Create_MaximumSet_Gen.json + // this example is just showing the usage of "SharedPrivateLinkResource_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this SharedPrivateLinkResource + SharedPrivateLinkResourceCollection collection = watcher.GetSharedPrivateLinkResources(); + + // invoke the operation + string sharedPrivateLinkResourceName = "monitoringh22eed"; + SharedPrivateLinkResourceData data = new SharedPrivateLinkResourceData + { + Properties = new SharedPrivateLinkResourceProperties(new ResourceIdentifier("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.KeyVault/vaults/kvmo3ej9ih"), "vault", "request message") + { + DnsZone = "ec3ae9d410ba", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sharedPrivateLinkResourceName, data); + SharedPrivateLinkResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SharedPrivateLinkResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SharedPrivateLinkResourcesGetMaximumSet() + { + // Generated from example definition: 2025-01-02/SharedPrivateLinkResources_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SharedPrivateLinkResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this SharedPrivateLinkResource + SharedPrivateLinkResourceCollection collection = watcher.GetSharedPrivateLinkResources(); + + // invoke the operation + string sharedPrivateLinkResourceName = "monitoringh22eed"; + SharedPrivateLinkResource result = await collection.GetAsync(sharedPrivateLinkResourceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SharedPrivateLinkResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SharedPrivateLinkResourcesListByWatcherMaximumSet() + { + // Generated from example definition: 2025-01-02/SharedPrivateLinkResources_ListByWatcher_MaximumSet_Gen.json + // this example is just showing the usage of "SharedPrivateLinkResource_ListByWatcher" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this SharedPrivateLinkResource + SharedPrivateLinkResourceCollection collection = watcher.GetSharedPrivateLinkResources(); + + // invoke the operation and iterate over the result + await foreach (SharedPrivateLinkResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SharedPrivateLinkResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SharedPrivateLinkResourcesGetMaximumSet() + { + // Generated from example definition: 2025-01-02/SharedPrivateLinkResources_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SharedPrivateLinkResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this SharedPrivateLinkResource + SharedPrivateLinkResourceCollection collection = watcher.GetSharedPrivateLinkResources(); + + // invoke the operation + string sharedPrivateLinkResourceName = "monitoringh22eed"; + bool result = await collection.ExistsAsync(sharedPrivateLinkResourceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SharedPrivateLinkResourcesGetMaximumSet() + { + // Generated from example definition: 2025-01-02/SharedPrivateLinkResources_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SharedPrivateLinkResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this SharedPrivateLinkResource + SharedPrivateLinkResourceCollection collection = watcher.GetSharedPrivateLinkResources(); + + // invoke the operation + string sharedPrivateLinkResourceName = "monitoringh22eed"; + NullableResponse response = await collection.GetIfExistsAsync(sharedPrivateLinkResourceName); + SharedPrivateLinkResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SharedPrivateLinkResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..52b5589c03f6 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseWatcher.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetWatchers_WatchersListBySubscriptionMaximumSet() + { + // Generated from example definition: 2025-01-02/Watchers_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "Watcher_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (WatcherResource item in subscriptionResource.GetWatchersAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WatcherData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_TargetCollection.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_TargetCollection.cs new file mode 100644 index 000000000000..7a680ae22dbe --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_TargetCollection.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseWatcher.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseWatcher.Samples +{ + public partial class Sample_TargetCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_TargetsCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-01-02/Targets_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "Target_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this TargetResource + TargetCollection collection = watcher.GetTargets(); + + // invoke the operation + string targetName = "monitoringh22eed"; + TargetData data = new TargetData + { + Properties = new SqlDbSingleDatabaseTargetProperties(TargetAuthenticationType.Aad, "sqlServero1ihe2", new ResourceIdentifier("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.Sql/servers/m1/databases/m2")), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, targetName, data); + TargetResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TargetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_TargetsGetMaximumSet() + { + // Generated from example definition: 2025-01-02/Targets_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Target_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this TargetResource + TargetCollection collection = watcher.GetTargets(); + + // invoke the operation + string targetName = "monitoringh22eed"; + TargetResource result = await collection.GetAsync(targetName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TargetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_TargetsListByWatcherMaximumSet() + { + // Generated from example definition: 2025-01-02/Targets_ListByWatcher_MaximumSet_Gen.json + // this example is just showing the usage of "Target_ListByWatcher" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this TargetResource + TargetCollection collection = watcher.GetTargets(); + + // invoke the operation and iterate over the result + await foreach (TargetResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TargetData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_TargetsGetMaximumSet() + { + // Generated from example definition: 2025-01-02/Targets_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Target_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this TargetResource + TargetCollection collection = watcher.GetTargets(); + + // invoke the operation + string targetName = "monitoringh22eed"; + bool result = await collection.ExistsAsync(targetName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_TargetsGetMaximumSet() + { + // Generated from example definition: 2025-01-02/Targets_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Target_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // get the collection of this TargetResource + TargetCollection collection = watcher.GetTargets(); + + // invoke the operation + string targetName = "monitoringh22eed"; + NullableResponse response = await collection.GetIfExistsAsync(targetName); + TargetResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TargetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_TargetResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_TargetResource.cs new file mode 100644 index 000000000000..6c10469af52d --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_TargetResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseWatcher.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseWatcher.Samples +{ + public partial class Sample_TargetResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_TargetsGetMaximumSet() + { + // Generated from example definition: 2025-01-02/Targets_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Target_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TargetResource created on azure + // for more information of creating TargetResource, please refer to the document of TargetResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + string targetName = "monitoringh22eed"; + ResourceIdentifier targetResourceId = TargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName, targetName); + TargetResource target = client.GetTargetResource(targetResourceId); + + // invoke the operation + TargetResource result = await target.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TargetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_TargetsDeleteMaximumSet() + { + // Generated from example definition: 2025-01-02/Targets_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "Target_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TargetResource created on azure + // for more information of creating TargetResource, please refer to the document of TargetResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + string targetName = "monitoringh22eed"; + ResourceIdentifier targetResourceId = TargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName, targetName); + TargetResource target = client.GetTargetResource(targetResourceId); + + // invoke the operation + await target.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_TargetsCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-01-02/Targets_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "Target_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TargetResource created on azure + // for more information of creating TargetResource, please refer to the document of TargetResource + string subscriptionId = "49e0fbd3-75e8-44e7-96fd-5b64d9ad818d"; + string resourceGroupName = "apiTest-ddat4p"; + string watcherName = "databasemo3ej9ih"; + string targetName = "monitoringh22eed"; + ResourceIdentifier targetResourceId = TargetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName, targetName); + TargetResource target = client.GetTargetResource(targetResourceId); + + // invoke the operation + TargetData data = new TargetData + { + Properties = new SqlDbSingleDatabaseTargetProperties(TargetAuthenticationType.Aad, "sqlServero1ihe2", new ResourceIdentifier("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest-ddat4p/providers/Microsoft.Sql/servers/m1/databases/m2")), + }; + ArmOperation lro = await target.UpdateAsync(WaitUntil.Completed, data); + TargetResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TargetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_WatcherCollection.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_WatcherCollection.cs new file mode 100644 index 000000000000..840349b9b52c --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_WatcherCollection.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseWatcher.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseWatcher.Samples +{ + public partial class Sample_WatcherCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_WatchersCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-01-02/Watchers_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "Watcher_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WatcherResource + WatcherCollection collection = resourceGroupResource.GetWatchers(); + + // invoke the operation + string watcherName = "testWatcher"; + WatcherData data = new WatcherData(new AzureLocation("eastus2")) + { + Properties = new WatcherProperties + { + Datastore = new Datastore("https://kustouri-adx.eastus.kusto.windows.net", "https://ingest-kustouri-adx.eastus.kusto.windows.net", "kustoDatabaseName1", "https://portal.azure.com/", KustoOfferingType.Adx) + { + AdxClusterResourceId = new ResourceIdentifier("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"), + KustoClusterDisplayName = "kustoUri-adx", + }, + DefaultAlertRuleIdentityResourceId = new ResourceIdentifier("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"), + }, + Identity = new ManagedServiceIdentityV4(ManagedServiceIdentityType.SystemAssigned), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, watcherName, data); + WatcherResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WatcherData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_WatchersGetMaximumSet() + { + // Generated from example definition: 2025-01-02/Watchers_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Watcher_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WatcherResource + WatcherCollection collection = resourceGroupResource.GetWatchers(); + + // invoke the operation + string watcherName = "myWatcher"; + WatcherResource result = await collection.GetAsync(watcherName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WatcherData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_WatchersListByResourceGroupMaximumSet() + { + // Generated from example definition: 2025-01-02/Watchers_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "Watcher_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WatcherResource + WatcherCollection collection = resourceGroupResource.GetWatchers(); + + // invoke the operation and iterate over the result + await foreach (WatcherResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WatcherData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_WatchersGetMaximumSet() + { + // Generated from example definition: 2025-01-02/Watchers_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Watcher_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WatcherResource + WatcherCollection collection = resourceGroupResource.GetWatchers(); + + // invoke the operation + string watcherName = "myWatcher"; + bool result = await collection.ExistsAsync(watcherName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_WatchersGetMaximumSet() + { + // Generated from example definition: 2025-01-02/Watchers_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Watcher_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WatcherResource + WatcherCollection collection = resourceGroupResource.GetWatchers(); + + // invoke the operation + string watcherName = "myWatcher"; + NullableResponse response = await collection.GetIfExistsAsync(watcherName); + WatcherResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WatcherData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_WatcherResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_WatcherResource.cs new file mode 100644 index 000000000000..db6444b0f51d --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/samples/Generated/Samples/Sample_WatcherResource.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseWatcher.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseWatcher.Samples +{ + public partial class Sample_WatcherResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_WatchersGetMaximumSet() + { + // Generated from example definition: 2025-01-02/Watchers_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Watcher_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "myWatcher"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // invoke the operation + WatcherResource result = await watcher.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WatcherData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_WatchersDeleteMaximumSet() + { + // Generated from example definition: 2025-01-02/Watchers_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "Watcher_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // invoke the operation + await watcher.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_WatchersUpdateMaximumSet() + { + // Generated from example definition: 2025-01-02/Watchers_Update_MaximumSet_Gen.json + // this example is just showing the usage of "Watcher_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // invoke the operation + WatcherPatch patch = new WatcherPatch + { + Identity = new ManagedServiceIdentityV4(ManagedServiceIdentityType.SystemAssigned), + Tags = { }, + Properties = new WatcherUpdateProperties + { + Datastore = new Datastore("https://kustouri-adx.eastus.kusto.windows.net", "https://ingest-kustouri-adx.eastus.kusto.windows.net", "kustoDatabaseName1", "https://portal.azure.com/", KustoOfferingType.Adx) + { + AdxClusterResourceId = new ResourceIdentifier("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"), + KustoClusterDisplayName = "kustoUri-adx", + }, + DefaultAlertRuleIdentityResourceId = new ResourceIdentifier("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/newtest"), + }, + }; + ArmOperation lro = await watcher.UpdateAsync(WaitUntil.Completed, patch); + WatcherResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WatcherData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_WatchersStartMaximumSet() + { + // Generated from example definition: 2025-01-02/Watchers_Start_MaximumSet_Gen.json + // this example is just showing the usage of "Watchers_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "testWatcher"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // invoke the operation + await watcher.StartAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_WatchersStopMaximumSet() + { + // Generated from example definition: 2025-01-02/Watchers_Stop_MaximumSet_Gen.json + // this example is just showing the usage of "Watchers_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WatcherResource created on azure + // for more information of creating WatcherResource, please refer to the document of WatcherResource + string subscriptionId = "A76F9850-996B-40B3-94D4-C98110A0EEC9"; + string resourceGroupName = "rgWatcher"; + string watcherName = "myWatcher"; + ResourceIdentifier watcherResourceId = WatcherResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, watcherName); + WatcherResource watcher = client.GetWatcherResource(watcherResourceId); + + // invoke the operation + await watcher.StopAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Azure.ResourceManager.DatabaseWatcher.csproj b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Azure.ResourceManager.DatabaseWatcher.csproj new file mode 100644 index 000000000000..80105c7a5309 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Azure.ResourceManager.DatabaseWatcher.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider DatabaseWatcher. + 1.0.0-beta.1 + azure;management;arm;resource manager;databasewatcher + Azure.ResourceManager.DatabaseWatcher + + diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResource.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResource.Serialization.cs new file mode 100644 index 000000000000..f6ae198f9d4c --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + public partial class AlertRuleResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AlertRuleResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + AlertRuleResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResource.cs new file mode 100644 index 000000000000..fd418580c368 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResource.cs @@ -0,0 +1,355 @@ +// 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.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// + /// A Class representing an AlertRuleResource 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 GetAlertRuleResource method. + /// Otherwise you can get one from its parent resource using the GetAlertRuleResource method. + /// + public partial class AlertRuleResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The watcherName. + /// The alertRuleResourceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string watcherName, string alertRuleResourceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _alertRuleResourceClientDiagnostics; + private readonly AlertRuleResourcesRestOperations _alertRuleResourceRestClient; + private readonly AlertRuleResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DatabaseWatcher/watchers/alertRuleResources"; + + /// Initializes a new instance of the class for mocking. + protected AlertRuleResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AlertRuleResource(ArmClient client, AlertRuleResourceData 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 AlertRuleResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _alertRuleResourceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseWatcher", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string alertRuleResourceApiVersion); + _alertRuleResourceRestClient = new AlertRuleResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, alertRuleResourceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 AlertRuleResourceData 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 AlertRuleResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _alertRuleResourceClientDiagnostics.CreateScope("AlertRuleResource.Get"); + scope.Start(); + try + { + var response = await _alertRuleResourceRestClient.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 AlertRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AlertRuleResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _alertRuleResourceClientDiagnostics.CreateScope("AlertRuleResource.Get"); + scope.Start(); + try + { + var response = _alertRuleResourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AlertRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a AlertRuleResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_Delete + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _alertRuleResourceClientDiagnostics.CreateScope("AlertRuleResource.Delete"); + scope.Start(); + try + { + var response = await _alertRuleResourceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _alertRuleResourceRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new DatabaseWatcherArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a AlertRuleResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_Delete + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _alertRuleResourceClientDiagnostics.CreateScope("AlertRuleResource.Delete"); + scope.Start(); + try + { + var response = _alertRuleResourceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _alertRuleResourceRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new DatabaseWatcherArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AlertRuleResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AlertRuleResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _alertRuleResourceClientDiagnostics.CreateScope("AlertRuleResource.Update"); + scope.Start(); + try + { + var response = await _alertRuleResourceRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _alertRuleResourceRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new DatabaseWatcherArmOperation(Response.FromValue(new AlertRuleResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AlertRuleResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AlertRuleResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _alertRuleResourceClientDiagnostics.CreateScope("AlertRuleResource.Update"); + scope.Start(); + try + { + var response = _alertRuleResourceRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _alertRuleResourceRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new DatabaseWatcherArmOperation(Response.FromValue(new AlertRuleResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResourceCollection.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResourceCollection.cs new file mode 100644 index 000000000000..de00e95cf4cb --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResourceCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// + /// 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 GetAlertRuleResources method from an instance of . + /// + public partial class AlertRuleResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _alertRuleResourceClientDiagnostics; + private readonly AlertRuleResourcesRestOperations _alertRuleResourceRestClient; + + /// Initializes a new instance of the class for mocking. + protected AlertRuleResourceCollection() + { + } + + /// 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 AlertRuleResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _alertRuleResourceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseWatcher", AlertRuleResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AlertRuleResource.ResourceType, out string alertRuleResourceApiVersion); + _alertRuleResourceRestClient = new AlertRuleResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, alertRuleResourceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WatcherResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WatcherResource.ResourceType), nameof(id)); + } + + /// + /// Create a AlertRuleResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 alert rule proxy resource name. + /// Resource create parameters. + /// 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 alertRuleResourceName, AlertRuleResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(alertRuleResourceName, nameof(alertRuleResourceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _alertRuleResourceClientDiagnostics.CreateScope("AlertRuleResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _alertRuleResourceRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, alertRuleResourceName, data, cancellationToken).ConfigureAwait(false); + var uri = _alertRuleResourceRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, alertRuleResourceName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new DatabaseWatcherArmOperation(Response.FromValue(new AlertRuleResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AlertRuleResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 alert rule proxy resource name. + /// Resource create parameters. + /// 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 alertRuleResourceName, AlertRuleResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(alertRuleResourceName, nameof(alertRuleResourceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _alertRuleResourceClientDiagnostics.CreateScope("AlertRuleResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _alertRuleResourceRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, alertRuleResourceName, data, cancellationToken); + var uri = _alertRuleResourceRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, alertRuleResourceName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new DatabaseWatcherArmOperation(Response.FromValue(new AlertRuleResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AlertRuleResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The alert rule proxy resource 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 alertRuleResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(alertRuleResourceName, nameof(alertRuleResourceName)); + + using var scope = _alertRuleResourceClientDiagnostics.CreateScope("AlertRuleResourceCollection.Get"); + scope.Start(); + try + { + var response = await _alertRuleResourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, alertRuleResourceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AlertRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AlertRuleResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The alert rule proxy resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string alertRuleResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(alertRuleResourceName, nameof(alertRuleResourceName)); + + using var scope = _alertRuleResourceClientDiagnostics.CreateScope("AlertRuleResourceCollection.Get"); + scope.Start(); + try + { + var response = _alertRuleResourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, alertRuleResourceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AlertRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List AlertRuleResource resources by Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources + /// + /// + /// Operation Id + /// AlertRuleResource_ListByParent + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _alertRuleResourceRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _alertRuleResourceRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AlertRuleResource(Client, AlertRuleResourceData.DeserializeAlertRuleResourceData(e)), _alertRuleResourceClientDiagnostics, Pipeline, "AlertRuleResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List AlertRuleResource resources by Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources + /// + /// + /// Operation Id + /// AlertRuleResource_ListByParent + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _alertRuleResourceRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _alertRuleResourceRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AlertRuleResource(Client, AlertRuleResourceData.DeserializeAlertRuleResourceData(e)), _alertRuleResourceClientDiagnostics, Pipeline, "AlertRuleResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The alert rule proxy resource 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 alertRuleResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(alertRuleResourceName, nameof(alertRuleResourceName)); + + using var scope = _alertRuleResourceClientDiagnostics.CreateScope("AlertRuleResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _alertRuleResourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, alertRuleResourceName, 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.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The alert rule proxy resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string alertRuleResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(alertRuleResourceName, nameof(alertRuleResourceName)); + + using var scope = _alertRuleResourceClientDiagnostics.CreateScope("AlertRuleResourceCollection.Exists"); + scope.Start(); + try + { + var response = _alertRuleResourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, alertRuleResourceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The alert rule proxy resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string alertRuleResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(alertRuleResourceName, nameof(alertRuleResourceName)); + + using var scope = _alertRuleResourceClientDiagnostics.CreateScope("AlertRuleResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _alertRuleResourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, alertRuleResourceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AlertRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The alert rule proxy resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string alertRuleResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(alertRuleResourceName, nameof(alertRuleResourceName)); + + using var scope = _alertRuleResourceClientDiagnostics.CreateScope("AlertRuleResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _alertRuleResourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, alertRuleResourceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AlertRuleResource(Client, response.Value), 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/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResourceData.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResourceData.Serialization.cs new file mode 100644 index 000000000000..9856d86abb7b --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResourceData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DatabaseWatcher.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + public partial class AlertRuleResourceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AlertRuleResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + AlertRuleResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AlertRuleResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAlertRuleResourceData(document.RootElement, options); + } + + internal static AlertRuleResourceData DeserializeAlertRuleResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AlertRuleResourceProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = AlertRuleResourceProperties.DeserializeAlertRuleResourceProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AlertRuleResourceData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AlertRuleResourceData)} does not support writing '{options.Format}' format."); + } + } + + AlertRuleResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAlertRuleResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AlertRuleResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResourceData.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResourceData.cs new file mode 100644 index 000000000000..496720664a3a --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/AlertRuleResourceData.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; +using Azure.ResourceManager.DatabaseWatcher.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// + /// A class representing the AlertRuleResource data model. + /// Concrete proxy resource types can be created by aliasing this type using a specific property type. + /// + public partial class AlertRuleResourceData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AlertRuleResourceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal AlertRuleResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AlertRuleResourceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public AlertRuleResourceProperties Properties { get; set; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/ArmDatabaseWatcherModelFactory.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/ArmDatabaseWatcherModelFactory.cs new file mode 100644 index 000000000000..338627741f12 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/ArmDatabaseWatcherModelFactory.cs @@ -0,0 +1,312 @@ +// 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; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + /// Model factory for models. + public static partial class ArmDatabaseWatcherModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static SharedPrivateLinkResourceData SharedPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SharedPrivateLinkResourceProperties properties = null) + { + return new SharedPrivateLinkResourceData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource ID of the resource the shared private link resource is for. + /// The group id from the provider of resource the shared private link resource is for. + /// The request message for requesting approval of the shared private link resource. + /// The DNS zone segment to be included in the DNS name of the shared private link. Value is required for Azure Data Explorer clusters and SQL managed instances, and must be omitted for SQL logical servers and key vaults. The value is the second segment of the host FQDN name of the resource that the shared private link resource is for. For example: if the host name is 'adx-cluster-21187695.eastus.kusto.windows.net', then the value is 'eastus'; if the host name is 'sql-mi-23961134.767d5869f605.database.windows.net', then the value is '767d5869f605'. + /// Status of the shared private link resource. Can be Pending, Approved, Rejected or Disconnected. + /// The provisioning state of the resource. + /// A new instance for mocking. + public static SharedPrivateLinkResourceProperties SharedPrivateLinkResourceProperties(ResourceIdentifier privateLinkResourceId = null, string groupId = null, string requestMessage = null, string dnsZone = null, SharedPrivateLinkResourceStatus? status = null, ResourceProvisioningState? provisioningState = null) + { + return new SharedPrivateLinkResourceProperties( + privateLinkResourceId, + groupId, + requestMessage, + dnsZone, + status, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// The resource-specific properties for this resource. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// A new instance for mocking. + public static TargetData TargetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TargetProperties properties = null) + { + return new TargetData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Discriminator property for TargetProperties. + /// The type of authentication to use when connecting to a target. + /// To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored. + /// The FQDN host name of the server to use in the connection string when connecting to a target. For example, for an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net'; for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'. Port number and instance name must be specified separately. + /// The provisioning state of the resource. + /// A new instance for mocking. + public static TargetProperties TargetProperties(string targetType = null, TargetAuthenticationType targetAuthenticationType = default, VaultSecret targetVault = null, string connectionServerName = null, ResourceProvisioningState? provisioningState = null) + { + return new UnknownTargetProperties( + targetType, + targetAuthenticationType, + targetVault, + connectionServerName, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The type of authentication to use when connecting to a target. + /// To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored. + /// The FQDN host name of the server to use in the connection string when connecting to a target. For example, for an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net'; for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'. Port number and instance name must be specified separately. + /// The provisioning state of the resource. + /// The Azure resource ID of an Azure SQL DB database target. + /// Set to true to monitor a high availability replica of specified target, if any. + /// A new instance for mocking. + public static SqlDbSingleDatabaseTargetProperties SqlDbSingleDatabaseTargetProperties(TargetAuthenticationType targetAuthenticationType = default, VaultSecret targetVault = null, string connectionServerName = null, ResourceProvisioningState? provisioningState = null, ResourceIdentifier sqlDbResourceId = null, bool? readIntent = null) + { + return new SqlDbSingleDatabaseTargetProperties( + "SqlDb", + targetAuthenticationType, + targetVault, + connectionServerName, + provisioningState, + serializedAdditionalRawData: null, + sqlDbResourceId, + readIntent); + } + + /// Initializes a new instance of . + /// The type of authentication to use when connecting to a target. + /// To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored. + /// The FQDN host name of the server to use in the connection string when connecting to a target. For example, for an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net'; for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'. Port number and instance name must be specified separately. + /// The provisioning state of the resource. + /// The Azure resource ID of an Azure SQL DB elastic pool target. + /// The Azure resource ID of the anchor database used to connect to an elastic pool. + /// Set to true to monitor a high availability replica of specified target, if any. + /// A new instance for mocking. + public static SqlDbElasticPoolTargetProperties SqlDbElasticPoolTargetProperties(TargetAuthenticationType targetAuthenticationType = default, VaultSecret targetVault = null, string connectionServerName = null, ResourceProvisioningState? provisioningState = null, ResourceIdentifier sqlEpResourceId = null, ResourceIdentifier anchorDatabaseResourceId = null, bool? readIntent = null) + { + return new SqlDbElasticPoolTargetProperties( + "SqlEp", + targetAuthenticationType, + targetVault, + connectionServerName, + provisioningState, + serializedAdditionalRawData: null, + sqlEpResourceId, + anchorDatabaseResourceId, + readIntent); + } + + /// Initializes a new instance of . + /// The type of authentication to use when connecting to a target. + /// To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored. + /// The FQDN host name of the server to use in the connection string when connecting to a target. For example, for an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net'; for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'. Port number and instance name must be specified separately. + /// The provisioning state of the resource. + /// The Azure resource ID of an Azure SQL Managed Instance target. + /// The TCP port number to optionally use in the connection string when connecting to an Azure SQL Managed Instance target. + /// Set to true to monitor a high availability replica of specified target, if any. + /// A new instance for mocking. + public static SqlMiTargetProperties SqlMiTargetProperties(TargetAuthenticationType targetAuthenticationType = default, VaultSecret targetVault = null, string connectionServerName = null, ResourceProvisioningState? provisioningState = null, ResourceIdentifier sqlMiResourceId = null, int? connectionTcpPort = null, bool? readIntent = null) + { + return new SqlMiTargetProperties( + "SqlMi", + targetAuthenticationType, + targetVault, + connectionServerName, + provisioningState, + serializedAdditionalRawData: null, + sqlMiResourceId, + connectionTcpPort, + readIntent); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static HealthValidationData HealthValidationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, HealthValidationProperties properties = null) + { + return new HealthValidationData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The start time of health validation, in UTC. + /// The end time of health validation, in UTC. + /// The current health validation status. + /// The list of issues found by health validation. + /// The provisioning state of the health validation resource. + /// A new instance for mocking. + public static HealthValidationProperties HealthValidationProperties(DateTimeOffset startOn = default, DateTimeOffset endOn = default, ValidationStatus status = default, IEnumerable issues = null, ResourceProvisioningState? provisioningState = null) + { + issues ??= new List(); + + return new HealthValidationProperties( + startOn, + endOn, + status, + issues?.ToList(), + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The error code of the issue. + /// The error message of the issue. + /// The additional details for the issue. + /// The recommendation for resolving the issue. + /// The URL related to resolving the issue. + /// The resource ID of the Azure resource related to the issue. + /// The type of the Azure resource related to the issue. + /// A new instance for mocking. + public static ValidationIssue ValidationIssue(string errorCode = null, string errorMessage = null, string additionalDetails = null, string recommendationMessage = null, Uri recommendationUri = null, ResourceIdentifier relatedResourceId = null, string relatedResourceType = null) + { + return new ValidationIssue( + errorCode, + errorMessage, + additionalDetails, + recommendationMessage, + recommendationUri, + relatedResourceId, + relatedResourceType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static AlertRuleResourceData AlertRuleResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AlertRuleResourceProperties properties = null) + { + return new AlertRuleResourceData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource ID of the alert rule resource. + /// The properties with which the alert rule resource was created. + /// The creation time of the alert rule resource. + /// The provisioning state of the alert rule resource. + /// The template ID associated with alert rule resource. + /// The alert rule template version. + /// A new instance for mocking. + public static AlertRuleResourceProperties AlertRuleResourceProperties(ResourceIdentifier alertRuleResourceId = null, AlertRuleCreationProperty createdWithProperties = default, DateTimeOffset createdOn = default, ResourceProvisioningState? provisioningState = null, string alertRuleTemplateId = null, string alertRuleTemplateVersion = null) + { + return new AlertRuleResourceProperties( + alertRuleResourceId, + createdWithProperties, + createdOn, + provisioningState, + alertRuleTemplateId, + alertRuleTemplateVersion, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// A new instance for mocking. + public static WatcherData WatcherData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, WatcherProperties properties = null, ManagedServiceIdentityV4 identity = null) + { + tags ??= new Dictionary(); + + return new WatcherData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + identity, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The data store for collected monitoring data. + /// The monitoring collection status of the watcher. + /// The provisioning state of the resource watcher. + /// The resource ID of a user-assigned managed identity that will be assigned to a new alert rule. + /// A new instance for mocking. + public static WatcherProperties WatcherProperties(Datastore datastore = null, WatcherStatus? status = null, DatabaseWatcherProvisioningState? provisioningState = null, ResourceIdentifier defaultAlertRuleIdentityResourceId = null) + { + return new WatcherProperties(datastore, status, provisioningState, defaultAlertRuleIdentityResourceId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// The type of managed identity assigned to this resource. + /// The identities assigned to this resource by the user. + /// A new instance for mocking. + public static ManagedServiceIdentityV4 ManagedServiceIdentityV4(Guid? principalId = null, Guid? tenantId = null, ManagedServiceIdentityType type = default, IDictionary userAssignedIdentities = null) + { + userAssignedIdentities ??= new Dictionary(); + + return new ManagedServiceIdentityV4(principalId, tenantId, type, userAssignedIdentities, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/DatabaseWatcherExtensions.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/DatabaseWatcherExtensions.cs new file mode 100644 index 000000000000..6e392bbd6658 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/DatabaseWatcherExtensions.cs @@ -0,0 +1,295 @@ +// 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.Core; +using Azure.ResourceManager.DatabaseWatcher.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// A class to add extension methods to Azure.ResourceManager.DatabaseWatcher. + public static partial class DatabaseWatcherExtensions + { + private static MockableDatabaseWatcherArmClient GetMockableDatabaseWatcherArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableDatabaseWatcherArmClient(client0)); + } + + private static MockableDatabaseWatcherResourceGroupResource GetMockableDatabaseWatcherResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableDatabaseWatcherResourceGroupResource(client, resource.Id)); + } + + private static MockableDatabaseWatcherSubscriptionResource GetMockableDatabaseWatcherSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableDatabaseWatcherSubscriptionResource(client, resource.Id)); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WatcherResource GetWatcherResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDatabaseWatcherArmClient(client).GetWatcherResource(id); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AlertRuleResource GetAlertRuleResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDatabaseWatcherArmClient(client).GetAlertRuleResource(id); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static HealthValidationResource GetHealthValidationResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDatabaseWatcherArmClient(client).GetHealthValidationResource(id); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static TargetResource GetTargetResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDatabaseWatcherArmClient(client).GetTargetResource(id); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SharedPrivateLinkResource GetSharedPrivateLinkResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDatabaseWatcherArmClient(client).GetSharedPrivateLinkResource(id); + } + + /// + /// Gets a collection of WatcherResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of WatcherResources and their operations over a WatcherResource. + public static WatcherCollection GetWatchers(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDatabaseWatcherResourceGroupResource(resourceGroupResource).GetWatchers(); + } + + /// + /// Get a Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The database watcher name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetWatcherAsync(this ResourceGroupResource resourceGroupResource, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableDatabaseWatcherResourceGroupResource(resourceGroupResource).GetWatcherAsync(watcherName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The database watcher name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetWatcher(this ResourceGroupResource resourceGroupResource, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDatabaseWatcherResourceGroupResource(resourceGroupResource).GetWatcher(watcherName, cancellationToken); + } + + /// + /// List Watcher resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DatabaseWatcher/watchers + /// + /// + /// Operation Id + /// Watcher_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetWatchersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDatabaseWatcherSubscriptionResource(subscriptionResource).GetWatchersAsync(cancellationToken); + } + + /// + /// List Watcher resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DatabaseWatcher/watchers + /// + /// + /// Operation Id + /// Watcher_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetWatchers(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDatabaseWatcherSubscriptionResource(subscriptionResource).GetWatchers(cancellationToken); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/MockableDatabaseWatcherArmClient.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/MockableDatabaseWatcherArmClient.cs new file mode 100644 index 000000000000..43c0fc1c282d --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/MockableDatabaseWatcherArmClient.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableDatabaseWatcherArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableDatabaseWatcherArmClient() + { + } + + /// 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 MockableDatabaseWatcherArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableDatabaseWatcherArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual WatcherResource GetWatcherResource(ResourceIdentifier id) + { + WatcherResource.ValidateResourceId(id); + return new WatcherResource(Client, id); + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual AlertRuleResource GetAlertRuleResource(ResourceIdentifier id) + { + AlertRuleResource.ValidateResourceId(id); + return new AlertRuleResource(Client, id); + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual HealthValidationResource GetHealthValidationResource(ResourceIdentifier id) + { + HealthValidationResource.ValidateResourceId(id); + return new HealthValidationResource(Client, id); + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual TargetResource GetTargetResource(ResourceIdentifier id) + { + TargetResource.ValidateResourceId(id); + return new TargetResource(Client, id); + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual SharedPrivateLinkResource GetSharedPrivateLinkResource(ResourceIdentifier id) + { + SharedPrivateLinkResource.ValidateResourceId(id); + return new SharedPrivateLinkResource(Client, id); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/MockableDatabaseWatcherResourceGroupResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/MockableDatabaseWatcherResourceGroupResource.cs new file mode 100644 index 000000000000..9efa41ebf78d --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/MockableDatabaseWatcherResourceGroupResource.cs @@ -0,0 +1,105 @@ +// 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.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableDatabaseWatcherResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableDatabaseWatcherResourceGroupResource() + { + } + + /// 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 MockableDatabaseWatcherResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of WatcherResources in the ResourceGroupResource. + /// An object representing collection of WatcherResources and their operations over a WatcherResource. + public virtual WatcherCollection GetWatchers() + { + return GetCachedClient(client => new WatcherCollection(client, Id)); + } + + /// + /// Get a Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database watcher name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWatcherAsync(string watcherName, CancellationToken cancellationToken = default) + { + return await GetWatchers().GetAsync(watcherName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database watcher name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWatcher(string watcherName, CancellationToken cancellationToken = default) + { + return GetWatchers().Get(watcherName, cancellationToken); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/MockableDatabaseWatcherSubscriptionResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/MockableDatabaseWatcherSubscriptionResource.cs new file mode 100644 index 000000000000..9b9e305ea5a0 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Extensions/MockableDatabaseWatcherSubscriptionResource.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseWatcher.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableDatabaseWatcherSubscriptionResource : ArmResource + { + private ClientDiagnostics _watcherClientDiagnostics; + private WatchersRestOperations _watcherRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableDatabaseWatcherSubscriptionResource() + { + } + + /// 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 MockableDatabaseWatcherSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics WatcherClientDiagnostics => _watcherClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DatabaseWatcher", WatcherResource.ResourceType.Namespace, Diagnostics); + private WatchersRestOperations WatcherRestClient => _watcherRestClient ??= new WatchersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(WatcherResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List Watcher resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DatabaseWatcher/watchers + /// + /// + /// Operation Id + /// Watcher_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetWatchersAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => WatcherRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => WatcherRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WatcherResource(Client, WatcherData.DeserializeWatcherData(e)), WatcherClientDiagnostics, Pipeline, "MockableDatabaseWatcherSubscriptionResource.GetWatchers", "value", "nextLink", cancellationToken); + } + + /// + /// List Watcher resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DatabaseWatcher/watchers + /// + /// + /// Operation Id + /// Watcher_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetWatchers(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => WatcherRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => WatcherRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WatcherResource(Client, WatcherData.DeserializeWatcherData(e)), WatcherClientDiagnostics, Pipeline, "MockableDatabaseWatcherSubscriptionResource.GetWatchers", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationCollection.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationCollection.cs new file mode 100644 index 000000000000..b9af214f6894 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// + /// 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 GetHealthValidations method from an instance of . + /// + public partial class HealthValidationCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _healthValidationClientDiagnostics; + private readonly HealthValidationsRestOperations _healthValidationRestClient; + + /// Initializes a new instance of the class for mocking. + protected HealthValidationCollection() + { + } + + /// 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 HealthValidationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _healthValidationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseWatcher", HealthValidationResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(HealthValidationResource.ResourceType, out string healthValidationApiVersion); + _healthValidationRestClient = new HealthValidationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, healthValidationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WatcherResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WatcherResource.ResourceType), nameof(id)); + } + + /// + /// Get a HealthValidation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/healthValidations/{healthValidationName} + /// + /// + /// Operation Id + /// HealthValidation_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The health validation resource 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 healthValidationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(healthValidationName, nameof(healthValidationName)); + + using var scope = _healthValidationClientDiagnostics.CreateScope("HealthValidationCollection.Get"); + scope.Start(); + try + { + var response = await _healthValidationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, healthValidationName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new HealthValidationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a HealthValidation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/healthValidations/{healthValidationName} + /// + /// + /// Operation Id + /// HealthValidation_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The health validation resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string healthValidationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(healthValidationName, nameof(healthValidationName)); + + using var scope = _healthValidationClientDiagnostics.CreateScope("HealthValidationCollection.Get"); + scope.Start(); + try + { + var response = _healthValidationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, healthValidationName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new HealthValidationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List HealthValidation resources by Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/healthValidations + /// + /// + /// Operation Id + /// HealthValidation_ListByParent + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _healthValidationRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _healthValidationRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HealthValidationResource(Client, HealthValidationData.DeserializeHealthValidationData(e)), _healthValidationClientDiagnostics, Pipeline, "HealthValidationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List HealthValidation resources by Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/healthValidations + /// + /// + /// Operation Id + /// HealthValidation_ListByParent + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _healthValidationRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _healthValidationRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HealthValidationResource(Client, HealthValidationData.DeserializeHealthValidationData(e)), _healthValidationClientDiagnostics, Pipeline, "HealthValidationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/healthValidations/{healthValidationName} + /// + /// + /// Operation Id + /// HealthValidation_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The health validation resource 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 healthValidationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(healthValidationName, nameof(healthValidationName)); + + using var scope = _healthValidationClientDiagnostics.CreateScope("HealthValidationCollection.Exists"); + scope.Start(); + try + { + var response = await _healthValidationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, healthValidationName, 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.DatabaseWatcher/watchers/{watcherName}/healthValidations/{healthValidationName} + /// + /// + /// Operation Id + /// HealthValidation_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The health validation resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string healthValidationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(healthValidationName, nameof(healthValidationName)); + + using var scope = _healthValidationClientDiagnostics.CreateScope("HealthValidationCollection.Exists"); + scope.Start(); + try + { + var response = _healthValidationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, healthValidationName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/healthValidations/{healthValidationName} + /// + /// + /// Operation Id + /// HealthValidation_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The health validation resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string healthValidationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(healthValidationName, nameof(healthValidationName)); + + using var scope = _healthValidationClientDiagnostics.CreateScope("HealthValidationCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _healthValidationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, healthValidationName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new HealthValidationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/healthValidations/{healthValidationName} + /// + /// + /// Operation Id + /// HealthValidation_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The health validation resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string healthValidationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(healthValidationName, nameof(healthValidationName)); + + using var scope = _healthValidationClientDiagnostics.CreateScope("HealthValidationCollection.GetIfExists"); + scope.Start(); + try + { + var response = _healthValidationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, healthValidationName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new HealthValidationResource(Client, response.Value), 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/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationData.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationData.Serialization.cs new file mode 100644 index 000000000000..6df9757869db --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DatabaseWatcher.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + public partial class HealthValidationData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HealthValidationData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + HealthValidationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HealthValidationData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHealthValidationData(document.RootElement, options); + } + + internal static HealthValidationData DeserializeHealthValidationData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + HealthValidationProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = HealthValidationProperties.DeserializeHealthValidationProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HealthValidationData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HealthValidationData)} does not support writing '{options.Format}' format."); + } + } + + HealthValidationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHealthValidationData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HealthValidationData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationData.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationData.cs new file mode 100644 index 000000000000..d261752d66de --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationData.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; +using Azure.ResourceManager.DatabaseWatcher.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// + /// A class representing the HealthValidation data model. + /// Concrete proxy resource types can be created by aliasing this type using a specific property type. + /// + public partial class HealthValidationData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal HealthValidationData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal HealthValidationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, HealthValidationProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public HealthValidationProperties Properties { get; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationResource.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationResource.Serialization.cs new file mode 100644 index 000000000000..86d73ed6ee91 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + public partial class HealthValidationResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + HealthValidationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + HealthValidationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationResource.cs new file mode 100644 index 000000000000..c43c0dfacf3d --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/HealthValidationResource.cs @@ -0,0 +1,255 @@ +// 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.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// + /// A Class representing a HealthValidation 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 GetHealthValidationResource method. + /// Otherwise you can get one from its parent resource using the GetHealthValidation method. + /// + public partial class HealthValidationResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The watcherName. + /// The healthValidationName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string watcherName, string healthValidationName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/healthValidations/{healthValidationName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _healthValidationClientDiagnostics; + private readonly HealthValidationsRestOperations _healthValidationRestClient; + private readonly HealthValidationData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DatabaseWatcher/watchers/healthValidations"; + + /// Initializes a new instance of the class for mocking. + protected HealthValidationResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal HealthValidationResource(ArmClient client, HealthValidationData 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 HealthValidationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _healthValidationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseWatcher", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string healthValidationApiVersion); + _healthValidationRestClient = new HealthValidationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, healthValidationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 HealthValidationData 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 HealthValidation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/healthValidations/{healthValidationName} + /// + /// + /// Operation Id + /// HealthValidation_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _healthValidationClientDiagnostics.CreateScope("HealthValidationResource.Get"); + scope.Start(); + try + { + var response = await _healthValidationRestClient.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 HealthValidationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a HealthValidation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/healthValidations/{healthValidationName} + /// + /// + /// Operation Id + /// HealthValidation_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _healthValidationClientDiagnostics.CreateScope("HealthValidationResource.Get"); + scope.Start(); + try + { + var response = _healthValidationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new HealthValidationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts health validation for a watcher. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/healthValidations/{healthValidationName}/startValidation + /// + /// + /// Operation Id + /// HealthValidations_StartValidation + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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> StartValidationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _healthValidationClientDiagnostics.CreateScope("HealthValidationResource.StartValidation"); + scope.Start(); + try + { + var response = await _healthValidationRestClient.StartValidationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseWatcherArmOperation(new HealthValidationOperationSource(Client), _healthValidationClientDiagnostics, Pipeline, _healthValidationRestClient.CreateStartValidationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts health validation for a watcher. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/healthValidations/{healthValidationName}/startValidation + /// + /// + /// Operation Id + /// HealthValidations_StartValidation + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 StartValidation(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _healthValidationClientDiagnostics.CreateScope("HealthValidationResource.StartValidation"); + scope.Start(); + try + { + var response = _healthValidationRestClient.StartValidation(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DatabaseWatcherArmOperation(new HealthValidationOperationSource(Client), _healthValidationClientDiagnostics, Pipeline, _healthValidationRestClient.CreateStartValidationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/Argument.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..32f9b26aaec4 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..6afbde7e464c --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/ChangeTrackingList.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..7d07be2128e8 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// 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.Linq; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..c66b779c62c5 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/Optional.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..78fe76f53503 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/Optional.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; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..e46e08cbf3ee --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/DatabaseWatcherArmOperation.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/DatabaseWatcherArmOperation.cs new file mode 100644 index 000000000000..0380185acc37 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/DatabaseWatcherArmOperation.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseWatcher +{ +#pragma warning disable SA1649 // File name should match first type name + internal class DatabaseWatcherArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of DatabaseWatcherArmOperation for mocking. + protected DatabaseWatcherArmOperation() + { + } + + internal DatabaseWatcherArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal DatabaseWatcherArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DatabaseWatcherArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + 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/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/DatabaseWatcherArmOperationOfT.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/DatabaseWatcherArmOperationOfT.cs new file mode 100644 index 000000000000..7bc2029706fc --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/DatabaseWatcherArmOperationOfT.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseWatcher +{ +#pragma warning disable SA1649 // File name should match first type name + internal class DatabaseWatcherArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of DatabaseWatcherArmOperation for mocking. + protected DatabaseWatcherArmOperation() + { + } + + internal DatabaseWatcherArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal DatabaseWatcherArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "DatabaseWatcherArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + 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/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/HealthValidationOperationSource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/HealthValidationOperationSource.cs new file mode 100644 index 000000000000..ef2f6b59812e --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/HealthValidationOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + internal class HealthValidationOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal HealthValidationOperationSource(ArmClient client) + { + _client = client; + } + + HealthValidationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new HealthValidationResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new HealthValidationResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/SharedPrivateLinkResourceOperationSource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/SharedPrivateLinkResourceOperationSource.cs new file mode 100644 index 000000000000..129311479cc2 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/SharedPrivateLinkResourceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + internal class SharedPrivateLinkResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SharedPrivateLinkResourceOperationSource(ArmClient client) + { + _client = client; + } + + SharedPrivateLinkResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new SharedPrivateLinkResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new SharedPrivateLinkResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/WatcherOperationSource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/WatcherOperationSource.cs new file mode 100644 index 000000000000..e4a3627a8037 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/LongRunningOperation/WatcherOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + internal class WatcherOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal WatcherOperationSource(ArmClient client) + { + _client = client; + } + + WatcherResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new WatcherResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new WatcherResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleCreationProperty.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleCreationProperty.cs new file mode 100644 index 000000000000..182479a7ce69 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleCreationProperty.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.DatabaseWatcher.Models +{ + /// The properties with which the alert rule resource was created. + public readonly partial struct AlertRuleCreationProperty : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AlertRuleCreationProperty(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatedWithActionGroupValue = "CreatedWithActionGroup"; + private const string NoneValue = "None"; + + /// The alert rule was created with an action group. + public static AlertRuleCreationProperty CreatedWithActionGroup { get; } = new AlertRuleCreationProperty(CreatedWithActionGroupValue); + /// The alert rule was created with no properties. + public static AlertRuleCreationProperty None { get; } = new AlertRuleCreationProperty(NoneValue); + /// Determines if two values are the same. + public static bool operator ==(AlertRuleCreationProperty left, AlertRuleCreationProperty right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AlertRuleCreationProperty left, AlertRuleCreationProperty right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AlertRuleCreationProperty(string value) => new AlertRuleCreationProperty(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AlertRuleCreationProperty other && Equals(other); + /// + public bool Equals(AlertRuleCreationProperty other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceListResult.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceListResult.Serialization.cs new file mode 100644 index 000000000000..378efd40cd81 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + internal partial class AlertRuleResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AlertRuleResourceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AlertRuleResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AlertRuleResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAlertRuleResourceListResult(document.RootElement, options); + } + + internal static AlertRuleResourceListResult DeserializeAlertRuleResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AlertRuleResourceData.DeserializeAlertRuleResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AlertRuleResourceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AlertRuleResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + AlertRuleResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAlertRuleResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AlertRuleResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceListResult.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceListResult.cs new file mode 100644 index 000000000000..3a2a86a9d0e8 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + /// The response of a AlertRuleResource list operation. + internal partial class AlertRuleResourceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The AlertRuleResource items on this page. + /// is null. + internal AlertRuleResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AlertRuleResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AlertRuleResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AlertRuleResourceListResult() + { + } + + /// The AlertRuleResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceProperties.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceProperties.Serialization.cs new file mode 100644 index 000000000000..640ac4dc6d7a --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceProperties.Serialization.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + public partial class AlertRuleResourceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AlertRuleResourceProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("alertRuleResourceId"u8); + writer.WriteStringValue(AlertRuleResourceId); + writer.WritePropertyName("createdWithProperties"u8); + writer.WriteStringValue(CreatedWithProperties.ToString()); + writer.WritePropertyName("creationTime"u8); + writer.WriteStringValue(CreatedOn, "O"); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WritePropertyName("alertRuleTemplateId"u8); + writer.WriteStringValue(AlertRuleTemplateId); + writer.WritePropertyName("alertRuleTemplateVersion"u8); + writer.WriteStringValue(AlertRuleTemplateVersion); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AlertRuleResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AlertRuleResourceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAlertRuleResourceProperties(document.RootElement, options); + } + + internal static AlertRuleResourceProperties DeserializeAlertRuleResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier alertRuleResourceId = default; + AlertRuleCreationProperty createdWithProperties = default; + DateTimeOffset creationTime = default; + ResourceProvisioningState? provisioningState = default; + string alertRuleTemplateId = default; + string alertRuleTemplateVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("alertRuleResourceId"u8)) + { + alertRuleResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("createdWithProperties"u8)) + { + createdWithProperties = new AlertRuleCreationProperty(property.Value.GetString()); + continue; + } + if (property.NameEquals("creationTime"u8)) + { + creationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("alertRuleTemplateId"u8)) + { + alertRuleTemplateId = property.Value.GetString(); + continue; + } + if (property.NameEquals("alertRuleTemplateVersion"u8)) + { + alertRuleTemplateVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AlertRuleResourceProperties( + alertRuleResourceId, + createdWithProperties, + creationTime, + provisioningState, + alertRuleTemplateId, + alertRuleTemplateVersion, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AlertRuleResourceProperties)} does not support writing '{options.Format}' format."); + } + } + + AlertRuleResourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAlertRuleResourceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AlertRuleResourceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceProperties.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceProperties.cs new file mode 100644 index 000000000000..81d7429e72f0 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/AlertRuleResourceProperties.cs @@ -0,0 +1,106 @@ +// 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.DatabaseWatcher.Models +{ + /// The generic properties of the alert rule proxy resource. + public partial class AlertRuleResourceProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The resource ID of the alert rule resource. + /// The properties with which the alert rule resource was created. + /// The creation time of the alert rule resource. + /// The template ID associated with alert rule resource. + /// The alert rule template version. + /// , or is null. + public AlertRuleResourceProperties(ResourceIdentifier alertRuleResourceId, AlertRuleCreationProperty createdWithProperties, DateTimeOffset createdOn, string alertRuleTemplateId, string alertRuleTemplateVersion) + { + Argument.AssertNotNull(alertRuleResourceId, nameof(alertRuleResourceId)); + Argument.AssertNotNull(alertRuleTemplateId, nameof(alertRuleTemplateId)); + Argument.AssertNotNull(alertRuleTemplateVersion, nameof(alertRuleTemplateVersion)); + + AlertRuleResourceId = alertRuleResourceId; + CreatedWithProperties = createdWithProperties; + CreatedOn = createdOn; + AlertRuleTemplateId = alertRuleTemplateId; + AlertRuleTemplateVersion = alertRuleTemplateVersion; + } + + /// Initializes a new instance of . + /// The resource ID of the alert rule resource. + /// The properties with which the alert rule resource was created. + /// The creation time of the alert rule resource. + /// The provisioning state of the alert rule resource. + /// The template ID associated with alert rule resource. + /// The alert rule template version. + /// Keeps track of any properties unknown to the library. + internal AlertRuleResourceProperties(ResourceIdentifier alertRuleResourceId, AlertRuleCreationProperty createdWithProperties, DateTimeOffset createdOn, ResourceProvisioningState? provisioningState, string alertRuleTemplateId, string alertRuleTemplateVersion, IDictionary serializedAdditionalRawData) + { + AlertRuleResourceId = alertRuleResourceId; + CreatedWithProperties = createdWithProperties; + CreatedOn = createdOn; + ProvisioningState = provisioningState; + AlertRuleTemplateId = alertRuleTemplateId; + AlertRuleTemplateVersion = alertRuleTemplateVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AlertRuleResourceProperties() + { + } + + /// The resource ID of the alert rule resource. + public ResourceIdentifier AlertRuleResourceId { get; set; } + /// The properties with which the alert rule resource was created. + public AlertRuleCreationProperty CreatedWithProperties { get; set; } + /// The creation time of the alert rule resource. + public DateTimeOffset CreatedOn { get; set; } + /// The provisioning state of the alert rule resource. + public ResourceProvisioningState? ProvisioningState { get; } + /// The template ID associated with alert rule resource. + public string AlertRuleTemplateId { get; set; } + /// The alert rule template version. + public string AlertRuleTemplateVersion { get; set; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/DatabaseWatcherProvisioningState.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/DatabaseWatcherProvisioningState.cs new file mode 100644 index 000000000000..1d26cbf74b16 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/DatabaseWatcherProvisioningState.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.DatabaseWatcher.Models +{ + /// The status of the last provisioning operation performed on the resource. + public readonly partial struct DatabaseWatcherProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DatabaseWatcherProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static DatabaseWatcherProvisioningState Succeeded { get; } = new DatabaseWatcherProvisioningState(SucceededValue); + /// Resource creation failed. + public static DatabaseWatcherProvisioningState Failed { get; } = new DatabaseWatcherProvisioningState(FailedValue); + /// Resource creation was canceled. + public static DatabaseWatcherProvisioningState Canceled { get; } = new DatabaseWatcherProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(DatabaseWatcherProvisioningState left, DatabaseWatcherProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatabaseWatcherProvisioningState left, DatabaseWatcherProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DatabaseWatcherProvisioningState(string value) => new DatabaseWatcherProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatabaseWatcherProvisioningState other && Equals(other); + /// + public bool Equals(DatabaseWatcherProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/Datastore.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/Datastore.Serialization.cs new file mode 100644 index 000000000000..7c05248cf098 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/Datastore.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + public partial class Datastore : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Datastore)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AdxClusterResourceId)) + { + writer.WritePropertyName("adxClusterResourceId"u8); + writer.WriteStringValue(AdxClusterResourceId); + } + if (Optional.IsDefined(KustoClusterDisplayName)) + { + writer.WritePropertyName("kustoClusterDisplayName"u8); + writer.WriteStringValue(KustoClusterDisplayName); + } + writer.WritePropertyName("kustoClusterUri"u8); + writer.WriteStringValue(KustoClusterUri); + writer.WritePropertyName("kustoDataIngestionUri"u8); + writer.WriteStringValue(KustoDataIngestionUri); + writer.WritePropertyName("kustoDatabaseName"u8); + writer.WriteStringValue(KustoDatabaseName); + writer.WritePropertyName("kustoManagementUrl"u8); + writer.WriteStringValue(KustoManagementUri); + writer.WritePropertyName("kustoOfferingType"u8); + writer.WriteStringValue(KustoOfferingType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + Datastore IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Datastore)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatastore(document.RootElement, options); + } + + internal static Datastore DeserializeDatastore(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier adxClusterResourceId = default; + string kustoClusterDisplayName = default; + string kustoClusterUri = default; + string kustoDataIngestionUri = default; + string kustoDatabaseName = default; + string kustoManagementUrl = default; + KustoOfferingType kustoOfferingType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("adxClusterResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + adxClusterResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("kustoClusterDisplayName"u8)) + { + kustoClusterDisplayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("kustoClusterUri"u8)) + { + kustoClusterUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("kustoDataIngestionUri"u8)) + { + kustoDataIngestionUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("kustoDatabaseName"u8)) + { + kustoDatabaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("kustoManagementUrl"u8)) + { + kustoManagementUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("kustoOfferingType"u8)) + { + kustoOfferingType = new KustoOfferingType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Datastore( + adxClusterResourceId, + kustoClusterDisplayName, + kustoClusterUri, + kustoDataIngestionUri, + kustoDatabaseName, + kustoManagementUrl, + kustoOfferingType, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(Datastore)} does not support writing '{options.Format}' format."); + } + } + + Datastore IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatastore(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Datastore)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/Datastore.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/Datastore.cs new file mode 100644 index 000000000000..a5fb7745f3a7 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/Datastore.cs @@ -0,0 +1,111 @@ +// 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.DatabaseWatcher.Models +{ + /// The properties of a data store. + public partial class Datastore + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Kusto cluster URI. + /// The Kusto data ingestion URI. + /// The name of a Kusto database. + /// The Kusto management URL. + /// The type of a Kusto offering. + /// , , or is null. + public Datastore(string kustoClusterUri, string kustoDataIngestionUri, string kustoDatabaseName, string kustoManagementUri, KustoOfferingType kustoOfferingType) + { + Argument.AssertNotNull(kustoClusterUri, nameof(kustoClusterUri)); + Argument.AssertNotNull(kustoDataIngestionUri, nameof(kustoDataIngestionUri)); + Argument.AssertNotNull(kustoDatabaseName, nameof(kustoDatabaseName)); + Argument.AssertNotNull(kustoManagementUri, nameof(kustoManagementUri)); + + KustoClusterUri = kustoClusterUri; + KustoDataIngestionUri = kustoDataIngestionUri; + KustoDatabaseName = kustoDatabaseName; + KustoManagementUri = kustoManagementUri; + KustoOfferingType = kustoOfferingType; + } + + /// Initializes a new instance of . + /// The Azure resource ID of an Azure Data Explorer cluster. + /// The Kusto cluster display name. + /// The Kusto cluster URI. + /// The Kusto data ingestion URI. + /// The name of a Kusto database. + /// The Kusto management URL. + /// The type of a Kusto offering. + /// Keeps track of any properties unknown to the library. + internal Datastore(ResourceIdentifier adxClusterResourceId, string kustoClusterDisplayName, string kustoClusterUri, string kustoDataIngestionUri, string kustoDatabaseName, string kustoManagementUri, KustoOfferingType kustoOfferingType, IDictionary serializedAdditionalRawData) + { + AdxClusterResourceId = adxClusterResourceId; + KustoClusterDisplayName = kustoClusterDisplayName; + KustoClusterUri = kustoClusterUri; + KustoDataIngestionUri = kustoDataIngestionUri; + KustoDatabaseName = kustoDatabaseName; + KustoManagementUri = kustoManagementUri; + KustoOfferingType = kustoOfferingType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal Datastore() + { + } + + /// The Azure resource ID of an Azure Data Explorer cluster. + public ResourceIdentifier AdxClusterResourceId { get; set; } + /// The Kusto cluster display name. + public string KustoClusterDisplayName { get; set; } + /// The Kusto cluster URI. + public string KustoClusterUri { get; set; } + /// The Kusto data ingestion URI. + public string KustoDataIngestionUri { get; set; } + /// The name of a Kusto database. + public string KustoDatabaseName { get; set; } + /// The Kusto management URL. + public string KustoManagementUri { get; set; } + /// The type of a Kusto offering. + public KustoOfferingType KustoOfferingType { get; set; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationListResult.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationListResult.Serialization.cs new file mode 100644 index 000000000000..bc5b32767079 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + internal partial class HealthValidationListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HealthValidationListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HealthValidationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HealthValidationListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHealthValidationListResult(document.RootElement, options); + } + + internal static HealthValidationListResult DeserializeHealthValidationListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HealthValidationData.DeserializeHealthValidationData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HealthValidationListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HealthValidationListResult)} does not support writing '{options.Format}' format."); + } + } + + HealthValidationListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHealthValidationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HealthValidationListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationListResult.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationListResult.cs new file mode 100644 index 000000000000..7de6b1d74262 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + /// The response of a HealthValidation list operation. + internal partial class HealthValidationListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The HealthValidation items on this page. + /// is null. + internal HealthValidationListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The HealthValidation items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal HealthValidationListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal HealthValidationListResult() + { + } + + /// The HealthValidation items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationProperties.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationProperties.Serialization.cs new file mode 100644 index 000000000000..9246663dbdd6 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationProperties.Serialization.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + public partial class HealthValidationProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HealthValidationProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn, "O"); + } + if (options.Format != "W") + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn, "O"); + } + if (options.Format != "W") + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + } + if (options.Format != "W") + { + writer.WritePropertyName("issues"u8); + writer.WriteStartArray(); + foreach (var item in Issues) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HealthValidationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HealthValidationProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHealthValidationProperties(document.RootElement, options); + } + + internal static HealthValidationProperties DeserializeHealthValidationProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset startTime = default; + DateTimeOffset endTime = default; + ValidationStatus status = default; + IReadOnlyList issues = default; + ResourceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new ValidationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("issues"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ValidationIssue.DeserializeValidationIssue(item, options)); + } + issues = array; + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ResourceProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HealthValidationProperties( + startTime, + endTime, + status, + issues, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HealthValidationProperties)} does not support writing '{options.Format}' format."); + } + } + + HealthValidationProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHealthValidationProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HealthValidationProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationProperties.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationProperties.cs new file mode 100644 index 000000000000..963f55c00df1 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/HealthValidationProperties.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.Linq; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + /// The generic properties of the health validation resource. + public partial class HealthValidationProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The start time of health validation, in UTC. + /// The end time of health validation, in UTC. + /// The current health validation status. + /// The list of issues found by health validation. + internal HealthValidationProperties(DateTimeOffset startOn, DateTimeOffset endOn, ValidationStatus status, IEnumerable issues) + { + StartOn = startOn; + EndOn = endOn; + Status = status; + Issues = issues.ToList(); + } + + /// Initializes a new instance of . + /// The start time of health validation, in UTC. + /// The end time of health validation, in UTC. + /// The current health validation status. + /// The list of issues found by health validation. + /// The provisioning state of the health validation resource. + /// Keeps track of any properties unknown to the library. + internal HealthValidationProperties(DateTimeOffset startOn, DateTimeOffset endOn, ValidationStatus status, IReadOnlyList issues, ResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + StartOn = startOn; + EndOn = endOn; + Status = status; + Issues = issues; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal HealthValidationProperties() + { + } + + /// The start time of health validation, in UTC. + public DateTimeOffset StartOn { get; } + /// The end time of health validation, in UTC. + public DateTimeOffset EndOn { get; } + /// The current health validation status. + public ValidationStatus Status { get; } + /// The list of issues found by health validation. + public IReadOnlyList Issues { get; } + /// The provisioning state of the health validation resource. + public ResourceProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/KustoOfferingType.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/KustoOfferingType.cs new file mode 100644 index 000000000000..5650f0cb4d19 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/KustoOfferingType.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.DatabaseWatcher.Models +{ + /// The type of Kusto offering. + public readonly partial struct KustoOfferingType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public KustoOfferingType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AdxValue = "adx"; + private const string FreeValue = "free"; + private const string FabricValue = "fabric"; + + /// The Azure Data Explorer cluster Kusto offering. + public static KustoOfferingType Adx { get; } = new KustoOfferingType(AdxValue); + /// The free Azure Data Explorer cluster Kusto offering. + public static KustoOfferingType Free { get; } = new KustoOfferingType(FreeValue); + /// The Fabric Real-Time Analytics Kusto offering. + public static KustoOfferingType Fabric { get; } = new KustoOfferingType(FabricValue); + /// Determines if two values are the same. + public static bool operator ==(KustoOfferingType left, KustoOfferingType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(KustoOfferingType left, KustoOfferingType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator KustoOfferingType(string value) => new KustoOfferingType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is KustoOfferingType other && Equals(other); + /// + public bool Equals(KustoOfferingType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ManagedServiceIdentityType.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ManagedServiceIdentityType.cs new file mode 100644 index 000000000000..bf830748c396 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ManagedServiceIdentityType.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.DatabaseWatcher.Models +{ + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + public readonly partial struct ManagedServiceIdentityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ManagedServiceIdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string SystemAssignedValue = "SystemAssigned"; + private const string UserAssignedValue = "UserAssigned"; + private const string SystemAndUserAssignedValue = "SystemAssigned, UserAssigned"; + + /// No managed identity. + public static ManagedServiceIdentityType None { get; } = new ManagedServiceIdentityType(NoneValue); + /// System assigned managed identity. + public static ManagedServiceIdentityType SystemAssigned { get; } = new ManagedServiceIdentityType(SystemAssignedValue); + /// User assigned managed identity. + public static ManagedServiceIdentityType UserAssigned { get; } = new ManagedServiceIdentityType(UserAssignedValue); + /// System and user assigned managed identity. + public static ManagedServiceIdentityType SystemAndUserAssigned { get; } = new ManagedServiceIdentityType(SystemAndUserAssignedValue); + /// Determines if two values are the same. + public static bool operator ==(ManagedServiceIdentityType left, ManagedServiceIdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ManagedServiceIdentityType left, ManagedServiceIdentityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ManagedServiceIdentityType(string value) => new ManagedServiceIdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ManagedServiceIdentityType other && Equals(other); + /// + public bool Equals(ManagedServiceIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ManagedServiceIdentityV4.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ManagedServiceIdentityV4.Serialization.cs new file mode 100644 index 000000000000..1d9b55caf536 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ManagedServiceIdentityV4.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + public partial class ManagedServiceIdentityV4 : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManagedServiceIdentityV4)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(PrincipalId)) + { + writer.WritePropertyName("principalId"u8); + writer.WriteStringValue(PrincipalId.Value); + } + if (options.Format != "W" && Optional.IsDefined(TenantId)) + { + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId.Value); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (Optional.IsCollectionDefined(UserAssignedIdentities)) + { + writer.WritePropertyName("userAssignedIdentities"u8); + writer.WriteStartObject(); + foreach (var item in UserAssignedIdentities) + { + writer.WritePropertyName(item.Key); + JsonSerializer.Serialize(writer, item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ManagedServiceIdentityV4 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManagedServiceIdentityV4)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeManagedServiceIdentityV4(document.RootElement, options); + } + + internal static ManagedServiceIdentityV4 DeserializeManagedServiceIdentityV4(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid? principalId = default; + Guid? tenantId = default; + ManagedServiceIdentityType type = default; + IDictionary userAssignedIdentities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("principalId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + principalId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("tenantId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenantId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ManagedServiceIdentityType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, JsonSerializer.Deserialize(property0.Value.GetRawText())); + } + userAssignedIdentities = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ManagedServiceIdentityV4(principalId, tenantId, type, userAssignedIdentities ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ManagedServiceIdentityV4)} does not support writing '{options.Format}' format."); + } + } + + ManagedServiceIdentityV4 IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeManagedServiceIdentityV4(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ManagedServiceIdentityV4)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ManagedServiceIdentityV4.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ManagedServiceIdentityV4.cs new file mode 100644 index 000000000000..284c3a903ae7 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ManagedServiceIdentityV4.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + /// Managed service identity (system assigned and/or user assigned identities). + public partial class ManagedServiceIdentityV4 + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The type of managed identity assigned to this resource. + public ManagedServiceIdentityV4(ManagedServiceIdentityType type) + { + Type = type; + UserAssignedIdentities = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// The type of managed identity assigned to this resource. + /// The identities assigned to this resource by the user. + /// Keeps track of any properties unknown to the library. + internal ManagedServiceIdentityV4(Guid? principalId, Guid? tenantId, ManagedServiceIdentityType type, IDictionary userAssignedIdentities, IDictionary serializedAdditionalRawData) + { + PrincipalId = principalId; + TenantId = tenantId; + Type = type; + UserAssignedIdentities = userAssignedIdentities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ManagedServiceIdentityV4() + { + } + + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + public Guid? PrincipalId { get; } + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + public Guid? TenantId { get; } + /// The type of managed identity assigned to this resource. + public ManagedServiceIdentityType Type { get; set; } + /// The identities assigned to this resource by the user. + public IDictionary UserAssignedIdentities { get; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ResourceProvisioningState.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ResourceProvisioningState.cs new file mode 100644 index 000000000000..ef613439b6ab --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ResourceProvisioningState.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.DatabaseWatcher.Models +{ + /// The provisioning state of a resource type. + public readonly partial struct ResourceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static ResourceProvisioningState Succeeded { get; } = new ResourceProvisioningState(SucceededValue); + /// Resource creation failed. + public static ResourceProvisioningState Failed { get; } = new ResourceProvisioningState(FailedValue); + /// Resource creation was canceled. + public static ResourceProvisioningState Canceled { get; } = new ResourceProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceProvisioningState left, ResourceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceProvisioningState left, ResourceProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ResourceProvisioningState(string value) => new ResourceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceProvisioningState other && Equals(other); + /// + public bool Equals(ResourceProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceListResult.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceListResult.Serialization.cs new file mode 100644 index 000000000000..20d1fbd6e25e --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + internal partial class SharedPrivateLinkResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SharedPrivateLinkResourceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SharedPrivateLinkResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SharedPrivateLinkResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSharedPrivateLinkResourceListResult(document.RootElement, options); + } + + internal static SharedPrivateLinkResourceListResult DeserializeSharedPrivateLinkResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SharedPrivateLinkResourceData.DeserializeSharedPrivateLinkResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SharedPrivateLinkResourceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SharedPrivateLinkResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + SharedPrivateLinkResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSharedPrivateLinkResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SharedPrivateLinkResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceListResult.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceListResult.cs new file mode 100644 index 000000000000..bc7a9e3ee202 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + /// The response of a SharedPrivateLinkResource list operation. + internal partial class SharedPrivateLinkResourceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The SharedPrivateLinkResource items on this page. + /// is null. + internal SharedPrivateLinkResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SharedPrivateLinkResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SharedPrivateLinkResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SharedPrivateLinkResourceListResult() + { + } + + /// The SharedPrivateLinkResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceProperties.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceProperties.Serialization.cs new file mode 100644 index 000000000000..62a8af2e41c5 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceProperties.Serialization.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + public partial class SharedPrivateLinkResourceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SharedPrivateLinkResourceProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("privateLinkResourceId"u8); + writer.WriteStringValue(PrivateLinkResourceId); + writer.WritePropertyName("groupId"u8); + writer.WriteStringValue(GroupId); + writer.WritePropertyName("requestMessage"u8); + writer.WriteStringValue(RequestMessage); + if (Optional.IsDefined(DnsZone)) + { + writer.WritePropertyName("dnsZone"u8); + writer.WriteStringValue(DnsZone); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SharedPrivateLinkResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SharedPrivateLinkResourceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSharedPrivateLinkResourceProperties(document.RootElement, options); + } + + internal static SharedPrivateLinkResourceProperties DeserializeSharedPrivateLinkResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier privateLinkResourceId = default; + string groupId = default; + string requestMessage = default; + string dnsZone = default; + SharedPrivateLinkResourceStatus? status = default; + ResourceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("privateLinkResourceId"u8)) + { + privateLinkResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("groupId"u8)) + { + groupId = property.Value.GetString(); + continue; + } + if (property.NameEquals("requestMessage"u8)) + { + requestMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("dnsZone"u8)) + { + dnsZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SharedPrivateLinkResourceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ResourceProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SharedPrivateLinkResourceProperties( + privateLinkResourceId, + groupId, + requestMessage, + dnsZone, + status, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SharedPrivateLinkResourceProperties)} does not support writing '{options.Format}' format."); + } + } + + SharedPrivateLinkResourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSharedPrivateLinkResourceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SharedPrivateLinkResourceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceProperties.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceProperties.cs new file mode 100644 index 000000000000..e7a80cc7cca3 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceProperties.cs @@ -0,0 +1,102 @@ +// 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.DatabaseWatcher.Models +{ + /// The generic properties of a Shared Private Link resource. + public partial class SharedPrivateLinkResourceProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The resource ID of the resource the shared private link resource is for. + /// The group id from the provider of resource the shared private link resource is for. + /// The request message for requesting approval of the shared private link resource. + /// , or is null. + public SharedPrivateLinkResourceProperties(ResourceIdentifier privateLinkResourceId, string groupId, string requestMessage) + { + Argument.AssertNotNull(privateLinkResourceId, nameof(privateLinkResourceId)); + Argument.AssertNotNull(groupId, nameof(groupId)); + Argument.AssertNotNull(requestMessage, nameof(requestMessage)); + + PrivateLinkResourceId = privateLinkResourceId; + GroupId = groupId; + RequestMessage = requestMessage; + } + + /// Initializes a new instance of . + /// The resource ID of the resource the shared private link resource is for. + /// The group id from the provider of resource the shared private link resource is for. + /// The request message for requesting approval of the shared private link resource. + /// The DNS zone segment to be included in the DNS name of the shared private link. Value is required for Azure Data Explorer clusters and SQL managed instances, and must be omitted for SQL logical servers and key vaults. The value is the second segment of the host FQDN name of the resource that the shared private link resource is for. For example: if the host name is 'adx-cluster-21187695.eastus.kusto.windows.net', then the value is 'eastus'; if the host name is 'sql-mi-23961134.767d5869f605.database.windows.net', then the value is '767d5869f605'. + /// Status of the shared private link resource. Can be Pending, Approved, Rejected or Disconnected. + /// The provisioning state of the resource. + /// Keeps track of any properties unknown to the library. + internal SharedPrivateLinkResourceProperties(ResourceIdentifier privateLinkResourceId, string groupId, string requestMessage, string dnsZone, SharedPrivateLinkResourceStatus? status, ResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + PrivateLinkResourceId = privateLinkResourceId; + GroupId = groupId; + RequestMessage = requestMessage; + DnsZone = dnsZone; + Status = status; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SharedPrivateLinkResourceProperties() + { + } + + /// The resource ID of the resource the shared private link resource is for. + public ResourceIdentifier PrivateLinkResourceId { get; set; } + /// The group id from the provider of resource the shared private link resource is for. + public string GroupId { get; set; } + /// The request message for requesting approval of the shared private link resource. + public string RequestMessage { get; set; } + /// The DNS zone segment to be included in the DNS name of the shared private link. Value is required for Azure Data Explorer clusters and SQL managed instances, and must be omitted for SQL logical servers and key vaults. The value is the second segment of the host FQDN name of the resource that the shared private link resource is for. For example: if the host name is 'adx-cluster-21187695.eastus.kusto.windows.net', then the value is 'eastus'; if the host name is 'sql-mi-23961134.767d5869f605.database.windows.net', then the value is '767d5869f605'. + public string DnsZone { get; set; } + /// Status of the shared private link resource. Can be Pending, Approved, Rejected or Disconnected. + public SharedPrivateLinkResourceStatus? Status { get; } + /// The provisioning state of the resource. + public ResourceProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceStatus.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceStatus.cs new file mode 100644 index 000000000000..b0ac514fd1d4 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SharedPrivateLinkResourceStatus.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.DatabaseWatcher.Models +{ + /// Status of the shared private link resource. Can be Pending, Approved, Rejected or Disconnected. + public readonly partial struct SharedPrivateLinkResourceStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SharedPrivateLinkResourceStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PendingValue = "Pending"; + private const string ApprovedValue = "Approved"; + private const string RejectedValue = "Rejected"; + private const string DisconnectedValue = "Disconnected"; + + /// The shared private link connection request was not yet authorized by the resource owner. + public static SharedPrivateLinkResourceStatus Pending { get; } = new SharedPrivateLinkResourceStatus(PendingValue); + /// The shared private link connection request was approved by the resource owner. + public static SharedPrivateLinkResourceStatus Approved { get; } = new SharedPrivateLinkResourceStatus(ApprovedValue); + /// The shared private link connection request was rejected by the resource owner. + public static SharedPrivateLinkResourceStatus Rejected { get; } = new SharedPrivateLinkResourceStatus(RejectedValue); + /// The shared private link connection request was disconnected by the resource owner. + public static SharedPrivateLinkResourceStatus Disconnected { get; } = new SharedPrivateLinkResourceStatus(DisconnectedValue); + /// Determines if two values are the same. + public static bool operator ==(SharedPrivateLinkResourceStatus left, SharedPrivateLinkResourceStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SharedPrivateLinkResourceStatus left, SharedPrivateLinkResourceStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SharedPrivateLinkResourceStatus(string value) => new SharedPrivateLinkResourceStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SharedPrivateLinkResourceStatus other && Equals(other); + /// + public bool Equals(SharedPrivateLinkResourceStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbElasticPoolTargetProperties.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbElasticPoolTargetProperties.Serialization.cs new file mode 100644 index 000000000000..2835faf104a2 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbElasticPoolTargetProperties.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + public partial class SqlDbElasticPoolTargetProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlDbElasticPoolTargetProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("sqlEpResourceId"u8); + writer.WriteStringValue(SqlEpResourceId); + writer.WritePropertyName("anchorDatabaseResourceId"u8); + writer.WriteStringValue(AnchorDatabaseResourceId); + if (Optional.IsDefined(ReadIntent)) + { + writer.WritePropertyName("readIntent"u8); + writer.WriteBooleanValue(ReadIntent.Value); + } + } + + SqlDbElasticPoolTargetProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlDbElasticPoolTargetProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlDbElasticPoolTargetProperties(document.RootElement, options); + } + + internal static SqlDbElasticPoolTargetProperties DeserializeSqlDbElasticPoolTargetProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier sqlEpResourceId = default; + ResourceIdentifier anchorDatabaseResourceId = default; + bool? readIntent = default; + string targetType = default; + TargetAuthenticationType targetAuthenticationType = default; + VaultSecret targetVault = default; + string connectionServerName = default; + ResourceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sqlEpResourceId"u8)) + { + sqlEpResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("anchorDatabaseResourceId"u8)) + { + anchorDatabaseResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("readIntent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + readIntent = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("targetType"u8)) + { + targetType = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetAuthenticationType"u8)) + { + targetAuthenticationType = new TargetAuthenticationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetVault"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVault = VaultSecret.DeserializeVaultSecret(property.Value, options); + continue; + } + if (property.NameEquals("connectionServerName"u8)) + { + connectionServerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ResourceProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SqlDbElasticPoolTargetProperties( + targetType, + targetAuthenticationType, + targetVault, + connectionServerName, + provisioningState, + serializedAdditionalRawData, + sqlEpResourceId, + anchorDatabaseResourceId, + readIntent); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SqlDbElasticPoolTargetProperties)} does not support writing '{options.Format}' format."); + } + } + + SqlDbElasticPoolTargetProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSqlDbElasticPoolTargetProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SqlDbElasticPoolTargetProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbElasticPoolTargetProperties.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbElasticPoolTargetProperties.cs new file mode 100644 index 000000000000..3b1bc634e486 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbElasticPoolTargetProperties.cs @@ -0,0 +1,64 @@ +// 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.DatabaseWatcher.Models +{ + /// The properties specific to an elastic pool in Azure SQL Database. + public partial class SqlDbElasticPoolTargetProperties : TargetProperties + { + /// Initializes a new instance of . + /// The type of authentication to use when connecting to a target. + /// The FQDN host name of the server to use in the connection string when connecting to a target. For example, for an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net'; for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'. Port number and instance name must be specified separately. + /// The Azure resource ID of an Azure SQL DB elastic pool target. + /// The Azure resource ID of the anchor database used to connect to an elastic pool. + /// , or is null. + public SqlDbElasticPoolTargetProperties(TargetAuthenticationType targetAuthenticationType, string connectionServerName, ResourceIdentifier sqlEpResourceId, ResourceIdentifier anchorDatabaseResourceId) : base(targetAuthenticationType, connectionServerName) + { + Argument.AssertNotNull(connectionServerName, nameof(connectionServerName)); + Argument.AssertNotNull(sqlEpResourceId, nameof(sqlEpResourceId)); + Argument.AssertNotNull(anchorDatabaseResourceId, nameof(anchorDatabaseResourceId)); + + SqlEpResourceId = sqlEpResourceId; + AnchorDatabaseResourceId = anchorDatabaseResourceId; + TargetType = "SqlEp"; + } + + /// Initializes a new instance of . + /// Discriminator property for TargetProperties. + /// The type of authentication to use when connecting to a target. + /// To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored. + /// The FQDN host name of the server to use in the connection string when connecting to a target. For example, for an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net'; for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'. Port number and instance name must be specified separately. + /// The provisioning state of the resource. + /// Keeps track of any properties unknown to the library. + /// The Azure resource ID of an Azure SQL DB elastic pool target. + /// The Azure resource ID of the anchor database used to connect to an elastic pool. + /// Set to true to monitor a high availability replica of specified target, if any. + internal SqlDbElasticPoolTargetProperties(string targetType, TargetAuthenticationType targetAuthenticationType, VaultSecret targetVault, string connectionServerName, ResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData, ResourceIdentifier sqlEpResourceId, ResourceIdentifier anchorDatabaseResourceId, bool? readIntent) : base(targetType, targetAuthenticationType, targetVault, connectionServerName, provisioningState, serializedAdditionalRawData) + { + SqlEpResourceId = sqlEpResourceId; + AnchorDatabaseResourceId = anchorDatabaseResourceId; + ReadIntent = readIntent; + TargetType = targetType ?? "SqlEp"; + } + + /// Initializes a new instance of for deserialization. + internal SqlDbElasticPoolTargetProperties() + { + } + + /// The Azure resource ID of an Azure SQL DB elastic pool target. + public ResourceIdentifier SqlEpResourceId { get; set; } + /// The Azure resource ID of the anchor database used to connect to an elastic pool. + public ResourceIdentifier AnchorDatabaseResourceId { get; set; } + /// Set to true to monitor a high availability replica of specified target, if any. + public bool? ReadIntent { get; set; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbSingleDatabaseTargetProperties.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbSingleDatabaseTargetProperties.Serialization.cs new file mode 100644 index 000000000000..236285c2234f --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbSingleDatabaseTargetProperties.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + public partial class SqlDbSingleDatabaseTargetProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlDbSingleDatabaseTargetProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("sqlDbResourceId"u8); + writer.WriteStringValue(SqlDbResourceId); + if (Optional.IsDefined(ReadIntent)) + { + writer.WritePropertyName("readIntent"u8); + writer.WriteBooleanValue(ReadIntent.Value); + } + } + + SqlDbSingleDatabaseTargetProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlDbSingleDatabaseTargetProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlDbSingleDatabaseTargetProperties(document.RootElement, options); + } + + internal static SqlDbSingleDatabaseTargetProperties DeserializeSqlDbSingleDatabaseTargetProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier sqlDbResourceId = default; + bool? readIntent = default; + string targetType = default; + TargetAuthenticationType targetAuthenticationType = default; + VaultSecret targetVault = default; + string connectionServerName = default; + ResourceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sqlDbResourceId"u8)) + { + sqlDbResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("readIntent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + readIntent = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("targetType"u8)) + { + targetType = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetAuthenticationType"u8)) + { + targetAuthenticationType = new TargetAuthenticationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetVault"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVault = VaultSecret.DeserializeVaultSecret(property.Value, options); + continue; + } + if (property.NameEquals("connectionServerName"u8)) + { + connectionServerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ResourceProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SqlDbSingleDatabaseTargetProperties( + targetType, + targetAuthenticationType, + targetVault, + connectionServerName, + provisioningState, + serializedAdditionalRawData, + sqlDbResourceId, + readIntent); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SqlDbSingleDatabaseTargetProperties)} does not support writing '{options.Format}' format."); + } + } + + SqlDbSingleDatabaseTargetProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSqlDbSingleDatabaseTargetProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SqlDbSingleDatabaseTargetProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbSingleDatabaseTargetProperties.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbSingleDatabaseTargetProperties.cs new file mode 100644 index 000000000000..e91b17ceb4bc --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlDbSingleDatabaseTargetProperties.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.DatabaseWatcher.Models +{ + /// The properties specific to a database in Azure SQL Database. + public partial class SqlDbSingleDatabaseTargetProperties : TargetProperties + { + /// Initializes a new instance of . + /// The type of authentication to use when connecting to a target. + /// The FQDN host name of the server to use in the connection string when connecting to a target. For example, for an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net'; for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'. Port number and instance name must be specified separately. + /// The Azure resource ID of an Azure SQL DB database target. + /// or is null. + public SqlDbSingleDatabaseTargetProperties(TargetAuthenticationType targetAuthenticationType, string connectionServerName, ResourceIdentifier sqlDbResourceId) : base(targetAuthenticationType, connectionServerName) + { + Argument.AssertNotNull(connectionServerName, nameof(connectionServerName)); + Argument.AssertNotNull(sqlDbResourceId, nameof(sqlDbResourceId)); + + SqlDbResourceId = sqlDbResourceId; + TargetType = "SqlDb"; + } + + /// Initializes a new instance of . + /// Discriminator property for TargetProperties. + /// The type of authentication to use when connecting to a target. + /// To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored. + /// The FQDN host name of the server to use in the connection string when connecting to a target. For example, for an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net'; for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'. Port number and instance name must be specified separately. + /// The provisioning state of the resource. + /// Keeps track of any properties unknown to the library. + /// The Azure resource ID of an Azure SQL DB database target. + /// Set to true to monitor a high availability replica of specified target, if any. + internal SqlDbSingleDatabaseTargetProperties(string targetType, TargetAuthenticationType targetAuthenticationType, VaultSecret targetVault, string connectionServerName, ResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData, ResourceIdentifier sqlDbResourceId, bool? readIntent) : base(targetType, targetAuthenticationType, targetVault, connectionServerName, provisioningState, serializedAdditionalRawData) + { + SqlDbResourceId = sqlDbResourceId; + ReadIntent = readIntent; + TargetType = targetType ?? "SqlDb"; + } + + /// Initializes a new instance of for deserialization. + internal SqlDbSingleDatabaseTargetProperties() + { + } + + /// The Azure resource ID of an Azure SQL DB database target. + public ResourceIdentifier SqlDbResourceId { get; set; } + /// Set to true to monitor a high availability replica of specified target, if any. + public bool? ReadIntent { get; set; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlMiTargetProperties.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlMiTargetProperties.Serialization.cs new file mode 100644 index 000000000000..4ddc297df049 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlMiTargetProperties.Serialization.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + public partial class SqlMiTargetProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlMiTargetProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("sqlMiResourceId"u8); + writer.WriteStringValue(SqlMiResourceId); + if (Optional.IsDefined(ConnectionTcpPort)) + { + writer.WritePropertyName("connectionTcpPort"u8); + writer.WriteNumberValue(ConnectionTcpPort.Value); + } + if (Optional.IsDefined(ReadIntent)) + { + writer.WritePropertyName("readIntent"u8); + writer.WriteBooleanValue(ReadIntent.Value); + } + } + + SqlMiTargetProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlMiTargetProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlMiTargetProperties(document.RootElement, options); + } + + internal static SqlMiTargetProperties DeserializeSqlMiTargetProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier sqlMiResourceId = default; + int? connectionTcpPort = default; + bool? readIntent = default; + string targetType = default; + TargetAuthenticationType targetAuthenticationType = default; + VaultSecret targetVault = default; + string connectionServerName = default; + ResourceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sqlMiResourceId"u8)) + { + sqlMiResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("connectionTcpPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionTcpPort = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("readIntent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + readIntent = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("targetType"u8)) + { + targetType = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetAuthenticationType"u8)) + { + targetAuthenticationType = new TargetAuthenticationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetVault"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVault = VaultSecret.DeserializeVaultSecret(property.Value, options); + continue; + } + if (property.NameEquals("connectionServerName"u8)) + { + connectionServerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ResourceProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SqlMiTargetProperties( + targetType, + targetAuthenticationType, + targetVault, + connectionServerName, + provisioningState, + serializedAdditionalRawData, + sqlMiResourceId, + connectionTcpPort, + readIntent); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SqlMiTargetProperties)} does not support writing '{options.Format}' format."); + } + } + + SqlMiTargetProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSqlMiTargetProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SqlMiTargetProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlMiTargetProperties.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlMiTargetProperties.cs new file mode 100644 index 000000000000..42d4e454cc90 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/SqlMiTargetProperties.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.DatabaseWatcher.Models +{ + /// The properties specific to Azure SQL Managed Instance targets. + public partial class SqlMiTargetProperties : TargetProperties + { + /// Initializes a new instance of . + /// The type of authentication to use when connecting to a target. + /// The FQDN host name of the server to use in the connection string when connecting to a target. For example, for an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net'; for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'. Port number and instance name must be specified separately. + /// The Azure resource ID of an Azure SQL Managed Instance target. + /// or is null. + public SqlMiTargetProperties(TargetAuthenticationType targetAuthenticationType, string connectionServerName, ResourceIdentifier sqlMiResourceId) : base(targetAuthenticationType, connectionServerName) + { + Argument.AssertNotNull(connectionServerName, nameof(connectionServerName)); + Argument.AssertNotNull(sqlMiResourceId, nameof(sqlMiResourceId)); + + SqlMiResourceId = sqlMiResourceId; + TargetType = "SqlMi"; + } + + /// Initializes a new instance of . + /// Discriminator property for TargetProperties. + /// The type of authentication to use when connecting to a target. + /// To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored. + /// The FQDN host name of the server to use in the connection string when connecting to a target. For example, for an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net'; for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'. Port number and instance name must be specified separately. + /// The provisioning state of the resource. + /// Keeps track of any properties unknown to the library. + /// The Azure resource ID of an Azure SQL Managed Instance target. + /// The TCP port number to optionally use in the connection string when connecting to an Azure SQL Managed Instance target. + /// Set to true to monitor a high availability replica of specified target, if any. + internal SqlMiTargetProperties(string targetType, TargetAuthenticationType targetAuthenticationType, VaultSecret targetVault, string connectionServerName, ResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData, ResourceIdentifier sqlMiResourceId, int? connectionTcpPort, bool? readIntent) : base(targetType, targetAuthenticationType, targetVault, connectionServerName, provisioningState, serializedAdditionalRawData) + { + SqlMiResourceId = sqlMiResourceId; + ConnectionTcpPort = connectionTcpPort; + ReadIntent = readIntent; + TargetType = targetType ?? "SqlMi"; + } + + /// Initializes a new instance of for deserialization. + internal SqlMiTargetProperties() + { + } + + /// The Azure resource ID of an Azure SQL Managed Instance target. + public ResourceIdentifier SqlMiResourceId { get; set; } + /// The TCP port number to optionally use in the connection string when connecting to an Azure SQL Managed Instance target. + public int? ConnectionTcpPort { get; set; } + /// Set to true to monitor a high availability replica of specified target, if any. + public bool? ReadIntent { get; set; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetAuthenticationType.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetAuthenticationType.cs new file mode 100644 index 000000000000..c75adb8f1d8a --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetAuthenticationType.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.DatabaseWatcher.Models +{ + /// The type of authentication to use when connecting to a target. + public readonly partial struct TargetAuthenticationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TargetAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AadValue = "Aad"; + private const string SqlValue = "Sql"; + + /// The Azure Active Directory authentication. + public static TargetAuthenticationType Aad { get; } = new TargetAuthenticationType(AadValue); + /// The SQL password authentication. + public static TargetAuthenticationType Sql { get; } = new TargetAuthenticationType(SqlValue); + /// Determines if two values are the same. + public static bool operator ==(TargetAuthenticationType left, TargetAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TargetAuthenticationType left, TargetAuthenticationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator TargetAuthenticationType(string value) => new TargetAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TargetAuthenticationType other && Equals(other); + /// + public bool Equals(TargetAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetListResult.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetListResult.Serialization.cs new file mode 100644 index 000000000000..18b53c59a3b2 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + internal partial class TargetListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TargetListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TargetListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TargetListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTargetListResult(document.RootElement, options); + } + + internal static TargetListResult DeserializeTargetListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TargetData.DeserializeTargetData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TargetListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TargetListResult)} does not support writing '{options.Format}' format."); + } + } + + TargetListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTargetListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TargetListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetListResult.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetListResult.cs new file mode 100644 index 000000000000..259a91b4264e --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + /// The response of a Target list operation. + internal partial class TargetListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Target items on this page. + /// is null. + internal TargetListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Target items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal TargetListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TargetListResult() + { + } + + /// The Target items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetProperties.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetProperties.Serialization.cs new file mode 100644 index 000000000000..234ab3854601 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + [PersistableModelProxy(typeof(UnknownTargetProperties))] + public partial class TargetProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TargetProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("targetType"u8); + writer.WriteStringValue(TargetType); + writer.WritePropertyName("targetAuthenticationType"u8); + writer.WriteStringValue(TargetAuthenticationType.ToString()); + if (Optional.IsDefined(TargetVault)) + { + writer.WritePropertyName("targetVault"u8); + writer.WriteObjectValue(TargetVault, options); + } + writer.WritePropertyName("connectionServerName"u8); + writer.WriteStringValue(ConnectionServerName); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TargetProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TargetProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTargetProperties(document.RootElement, options); + } + + internal static TargetProperties DeserializeTargetProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("targetType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "SqlDb": return SqlDbSingleDatabaseTargetProperties.DeserializeSqlDbSingleDatabaseTargetProperties(element, options); + case "SqlEp": return SqlDbElasticPoolTargetProperties.DeserializeSqlDbElasticPoolTargetProperties(element, options); + case "SqlMi": return SqlMiTargetProperties.DeserializeSqlMiTargetProperties(element, options); + } + } + return UnknownTargetProperties.DeserializeUnknownTargetProperties(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TargetProperties)} does not support writing '{options.Format}' format."); + } + } + + TargetProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTargetProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TargetProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetProperties.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetProperties.cs new file mode 100644 index 000000000000..d1adb92b5d4d --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/TargetProperties.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + /// + /// The generic properties of a target. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class TargetProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The type of authentication to use when connecting to a target. + /// The FQDN host name of the server to use in the connection string when connecting to a target. For example, for an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net'; for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'. Port number and instance name must be specified separately. + /// is null. + protected TargetProperties(TargetAuthenticationType targetAuthenticationType, string connectionServerName) + { + Argument.AssertNotNull(connectionServerName, nameof(connectionServerName)); + + TargetAuthenticationType = targetAuthenticationType; + ConnectionServerName = connectionServerName; + } + + /// Initializes a new instance of . + /// Discriminator property for TargetProperties. + /// The type of authentication to use when connecting to a target. + /// To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored. + /// The FQDN host name of the server to use in the connection string when connecting to a target. For example, for an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net'; for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'. Port number and instance name must be specified separately. + /// The provisioning state of the resource. + /// Keeps track of any properties unknown to the library. + internal TargetProperties(string targetType, TargetAuthenticationType targetAuthenticationType, VaultSecret targetVault, string connectionServerName, ResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + TargetType = targetType; + TargetAuthenticationType = targetAuthenticationType; + TargetVault = targetVault; + ConnectionServerName = connectionServerName; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TargetProperties() + { + } + + /// Discriminator property for TargetProperties. + internal string TargetType { get; set; } + /// The type of authentication to use when connecting to a target. + public TargetAuthenticationType TargetAuthenticationType { get; set; } + /// To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored. + public VaultSecret TargetVault { get; set; } + /// The FQDN host name of the server to use in the connection string when connecting to a target. For example, for an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net'; for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'. Port number and instance name must be specified separately. + public string ConnectionServerName { get; set; } + /// The provisioning state of the resource. + public ResourceProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/UnknownTargetProperties.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/UnknownTargetProperties.Serialization.cs new file mode 100644 index 000000000000..a2ed5973cf35 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/UnknownTargetProperties.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + internal partial class UnknownTargetProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TargetProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + TargetProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TargetProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTargetProperties(document.RootElement, options); + } + + internal static UnknownTargetProperties DeserializeUnknownTargetProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string targetType = "Unknown"; + TargetAuthenticationType targetAuthenticationType = default; + VaultSecret targetVault = default; + string connectionServerName = default; + ResourceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targetType"u8)) + { + targetType = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetAuthenticationType"u8)) + { + targetAuthenticationType = new TargetAuthenticationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetVault"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVault = VaultSecret.DeserializeVaultSecret(property.Value, options); + continue; + } + if (property.NameEquals("connectionServerName"u8)) + { + connectionServerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ResourceProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownTargetProperties( + targetType, + targetAuthenticationType, + targetVault, + connectionServerName, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TargetProperties)} does not support writing '{options.Format}' format."); + } + } + + TargetProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTargetProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TargetProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/UnknownTargetProperties.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/UnknownTargetProperties.cs new file mode 100644 index 000000000000..76b54f72ec12 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/UnknownTargetProperties.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + /// Unknown version of TargetProperties. + internal partial class UnknownTargetProperties : TargetProperties + { + /// Initializes a new instance of . + /// Discriminator property for TargetProperties. + /// The type of authentication to use when connecting to a target. + /// To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored. + /// The FQDN host name of the server to use in the connection string when connecting to a target. For example, for an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net'; for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'. Port number and instance name must be specified separately. + /// The provisioning state of the resource. + /// Keeps track of any properties unknown to the library. + internal UnknownTargetProperties(string targetType, TargetAuthenticationType targetAuthenticationType, VaultSecret targetVault, string connectionServerName, ResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(targetType, targetAuthenticationType, targetVault, connectionServerName, provisioningState, serializedAdditionalRawData) + { + TargetType = targetType ?? "Unknown"; + } + + /// Initializes a new instance of for deserialization. + internal UnknownTargetProperties() + { + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ValidationIssue.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ValidationIssue.Serialization.cs new file mode 100644 index 000000000000..12c003918436 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ValidationIssue.Serialization.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + public partial class ValidationIssue : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ValidationIssue)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("errorCode"u8); + writer.WriteStringValue(ErrorCode); + } + if (options.Format != "W") + { + writer.WritePropertyName("errorMessage"u8); + writer.WriteStringValue(ErrorMessage); + } + if (options.Format != "W" && Optional.IsDefined(AdditionalDetails)) + { + writer.WritePropertyName("additionalDetails"u8); + writer.WriteStringValue(AdditionalDetails); + } + if (options.Format != "W") + { + writer.WritePropertyName("recommendationMessage"u8); + writer.WriteStringValue(RecommendationMessage); + } + if (options.Format != "W" && Optional.IsDefined(RecommendationUri)) + { + writer.WritePropertyName("recommendationUrl"u8); + writer.WriteStringValue(RecommendationUri.AbsoluteUri); + } + if (options.Format != "W" && Optional.IsDefined(RelatedResourceId)) + { + writer.WritePropertyName("relatedResourceId"u8); + writer.WriteStringValue(RelatedResourceId); + } + if (options.Format != "W" && Optional.IsDefined(RelatedResourceType)) + { + writer.WritePropertyName("relatedResourceType"u8); + writer.WriteStringValue(RelatedResourceType); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ValidationIssue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ValidationIssue)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeValidationIssue(document.RootElement, options); + } + + internal static ValidationIssue DeserializeValidationIssue(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string errorCode = default; + string errorMessage = default; + string additionalDetails = default; + string recommendationMessage = default; + Uri recommendationUrl = default; + ResourceIdentifier relatedResourceId = default; + string relatedResourceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("errorCode"u8)) + { + errorCode = property.Value.GetString(); + continue; + } + if (property.NameEquals("errorMessage"u8)) + { + errorMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("additionalDetails"u8)) + { + additionalDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("recommendationMessage"u8)) + { + recommendationMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("recommendationUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recommendationUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("relatedResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + relatedResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("relatedResourceType"u8)) + { + relatedResourceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ValidationIssue( + errorCode, + errorMessage, + additionalDetails, + recommendationMessage, + recommendationUrl, + relatedResourceId, + relatedResourceType, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ValidationIssue)} does not support writing '{options.Format}' format."); + } + } + + ValidationIssue IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeValidationIssue(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ValidationIssue)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ValidationIssue.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ValidationIssue.cs new file mode 100644 index 000000000000..5cf33b03fc68 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ValidationIssue.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + /// The model of a health validation issue. + public partial class ValidationIssue + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The error code of the issue. + /// The error message of the issue. + /// The recommendation for resolving the issue. + internal ValidationIssue(string errorCode, string errorMessage, string recommendationMessage) + { + ErrorCode = errorCode; + ErrorMessage = errorMessage; + RecommendationMessage = recommendationMessage; + } + + /// Initializes a new instance of . + /// The error code of the issue. + /// The error message of the issue. + /// The additional details for the issue. + /// The recommendation for resolving the issue. + /// The URL related to resolving the issue. + /// The resource ID of the Azure resource related to the issue. + /// The type of the Azure resource related to the issue. + /// Keeps track of any properties unknown to the library. + internal ValidationIssue(string errorCode, string errorMessage, string additionalDetails, string recommendationMessage, Uri recommendationUri, ResourceIdentifier relatedResourceId, string relatedResourceType, IDictionary serializedAdditionalRawData) + { + ErrorCode = errorCode; + ErrorMessage = errorMessage; + AdditionalDetails = additionalDetails; + RecommendationMessage = recommendationMessage; + RecommendationUri = recommendationUri; + RelatedResourceId = relatedResourceId; + RelatedResourceType = relatedResourceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ValidationIssue() + { + } + + /// The error code of the issue. + public string ErrorCode { get; } + /// The error message of the issue. + public string ErrorMessage { get; } + /// The additional details for the issue. + public string AdditionalDetails { get; } + /// The recommendation for resolving the issue. + public string RecommendationMessage { get; } + /// The URL related to resolving the issue. + public Uri RecommendationUri { get; } + /// The resource ID of the Azure resource related to the issue. + public ResourceIdentifier RelatedResourceId { get; } + /// The type of the Azure resource related to the issue. + public string RelatedResourceType { get; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ValidationStatus.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ValidationStatus.cs new file mode 100644 index 000000000000..91cdfb16fa7a --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/ValidationStatus.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.DatabaseWatcher.Models +{ + /// Health validation status. + public readonly partial struct ValidationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ValidationStatus(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"; + private const string CanceledValue = "Canceled"; + private const string TimedOutValue = "TimedOut"; + + /// Health validation has not started. + public static ValidationStatus NotStarted { get; } = new ValidationStatus(NotStartedValue); + /// Health validation is running. + public static ValidationStatus Running { get; } = new ValidationStatus(RunningValue); + /// Health validation completed successfully. + public static ValidationStatus Succeeded { get; } = new ValidationStatus(SucceededValue); + /// Health validation failed. + public static ValidationStatus Failed { get; } = new ValidationStatus(FailedValue); + /// Health validation was canceled. + public static ValidationStatus Canceled { get; } = new ValidationStatus(CanceledValue); + /// Health validation timed out. + public static ValidationStatus TimedOut { get; } = new ValidationStatus(TimedOutValue); + /// Determines if two values are the same. + public static bool operator ==(ValidationStatus left, ValidationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ValidationStatus left, ValidationStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ValidationStatus(string value) => new ValidationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ValidationStatus other && Equals(other); + /// + public bool Equals(ValidationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/VaultSecret.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/VaultSecret.Serialization.cs new file mode 100644 index 000000000000..1a9f1d4ae2bb --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/VaultSecret.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + public partial class VaultSecret : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VaultSecret)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AkvResourceId)) + { + writer.WritePropertyName("akvResourceId"u8); + writer.WriteStringValue(AkvResourceId); + } + if (Optional.IsDefined(AkvTargetUser)) + { + writer.WritePropertyName("akvTargetUser"u8); + writer.WriteStringValue(AkvTargetUser); + } + if (Optional.IsDefined(AkvTargetPassword)) + { + writer.WritePropertyName("akvTargetPassword"u8); + writer.WriteStringValue(AkvTargetPassword); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VaultSecret IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VaultSecret)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVaultSecret(document.RootElement, options); + } + + internal static VaultSecret DeserializeVaultSecret(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier akvResourceId = default; + string akvTargetUser = default; + string akvTargetPassword = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("akvResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + akvResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("akvTargetUser"u8)) + { + akvTargetUser = property.Value.GetString(); + continue; + } + if (property.NameEquals("akvTargetPassword"u8)) + { + akvTargetPassword = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VaultSecret(akvResourceId, akvTargetUser, akvTargetPassword, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VaultSecret)} does not support writing '{options.Format}' format."); + } + } + + VaultSecret IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVaultSecret(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VaultSecret)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/VaultSecret.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/VaultSecret.cs new file mode 100644 index 000000000000..0a2c32493558 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/VaultSecret.cs @@ -0,0 +1,74 @@ +// 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.DatabaseWatcher.Models +{ + /// The vault specific details required if using SQL authentication to connect to a target. + public partial class VaultSecret + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public VaultSecret() + { + } + + /// Initializes a new instance of . + /// The Azure resource ID of the Key Vault instance storing database authentication secrets. + /// The path to the Key Vault secret storing the login name (aka user name, aka account name) for authentication to a target. + /// The path to the Key Vault secret storing the password for authentication to a target. + /// Keeps track of any properties unknown to the library. + internal VaultSecret(ResourceIdentifier akvResourceId, string akvTargetUser, string akvTargetPassword, IDictionary serializedAdditionalRawData) + { + AkvResourceId = akvResourceId; + AkvTargetUser = akvTargetUser; + AkvTargetPassword = akvTargetPassword; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Azure resource ID of the Key Vault instance storing database authentication secrets. + public ResourceIdentifier AkvResourceId { get; set; } + /// The path to the Key Vault secret storing the login name (aka user name, aka account name) for authentication to a target. + public string AkvTargetUser { get; set; } + /// The path to the Key Vault secret storing the password for authentication to a target. + public string AkvTargetPassword { get; set; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherListResult.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherListResult.Serialization.cs new file mode 100644 index 000000000000..9c0150c8dce8 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + internal partial class WatcherListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WatcherListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WatcherListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WatcherListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWatcherListResult(document.RootElement, options); + } + + internal static WatcherListResult DeserializeWatcherListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WatcherData.DeserializeWatcherData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WatcherListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WatcherListResult)} does not support writing '{options.Format}' format."); + } + } + + WatcherListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWatcherListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WatcherListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherListResult.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherListResult.cs new file mode 100644 index 000000000000..13fbd3c33992 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + /// The response of a Watcher list operation. + internal partial class WatcherListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Watcher items on this page. + /// is null. + internal WatcherListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Watcher items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal WatcherListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WatcherListResult() + { + } + + /// The Watcher items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherPatch.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherPatch.Serialization.cs new file mode 100644 index 000000000000..5b18a8ec9074 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherPatch.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + public partial class WatcherPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WatcherPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WatcherPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WatcherPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWatcherPatch(document.RootElement, options); + } + + internal static WatcherPatch DeserializeWatcherPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedServiceIdentityV4 identity = default; + IDictionary tags = default; + WatcherUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ManagedServiceIdentityV4.DeserializeManagedServiceIdentityV4(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = WatcherUpdateProperties.DeserializeWatcherUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WatcherPatch(identity, tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WatcherPatch)} does not support writing '{options.Format}' format."); + } + } + + WatcherPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWatcherPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WatcherPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherPatch.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherPatch.cs new file mode 100644 index 000000000000..59324b3e1f44 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherPatch.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + /// The type used for update operations of the Watcher. + public partial class WatcherPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WatcherPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The managed service identities assigned to this resource. + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal WatcherPatch(ManagedServiceIdentityV4 identity, IDictionary tags, WatcherUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Identity = identity; + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The managed service identities assigned to this resource. + public ManagedServiceIdentityV4 Identity { get; set; } + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public WatcherUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherProperties.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherProperties.Serialization.cs new file mode 100644 index 000000000000..a21811677e93 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherProperties.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + public partial class WatcherProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WatcherProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Datastore)) + { + writer.WritePropertyName("datastore"u8); + writer.WriteObjectValue(Datastore, options); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(DefaultAlertRuleIdentityResourceId)) + { + writer.WritePropertyName("defaultAlertRuleIdentityResourceId"u8); + writer.WriteStringValue(DefaultAlertRuleIdentityResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WatcherProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WatcherProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWatcherProperties(document.RootElement, options); + } + + internal static WatcherProperties DeserializeWatcherProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Datastore datastore = default; + WatcherStatus? status = default; + DatabaseWatcherProvisioningState? provisioningState = default; + ResourceIdentifier defaultAlertRuleIdentityResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("datastore"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + datastore = Datastore.DeserializeDatastore(property.Value, options); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new WatcherStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DatabaseWatcherProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("defaultAlertRuleIdentityResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultAlertRuleIdentityResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WatcherProperties(datastore, status, provisioningState, defaultAlertRuleIdentityResourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WatcherProperties)} does not support writing '{options.Format}' format."); + } + } + + WatcherProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWatcherProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WatcherProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherProperties.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherProperties.cs new file mode 100644 index 000000000000..1d6b63a67ef7 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherProperties.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.DatabaseWatcher.Models +{ + /// The RP specific properties of the resource. + public partial class WatcherProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WatcherProperties() + { + } + + /// Initializes a new instance of . + /// The data store for collected monitoring data. + /// The monitoring collection status of the watcher. + /// The provisioning state of the resource watcher. + /// The resource ID of a user-assigned managed identity that will be assigned to a new alert rule. + /// Keeps track of any properties unknown to the library. + internal WatcherProperties(Datastore datastore, WatcherStatus? status, DatabaseWatcherProvisioningState? provisioningState, ResourceIdentifier defaultAlertRuleIdentityResourceId, IDictionary serializedAdditionalRawData) + { + Datastore = datastore; + Status = status; + ProvisioningState = provisioningState; + DefaultAlertRuleIdentityResourceId = defaultAlertRuleIdentityResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The data store for collected monitoring data. + public Datastore Datastore { get; set; } + /// The monitoring collection status of the watcher. + public WatcherStatus? Status { get; } + /// The provisioning state of the resource watcher. + public DatabaseWatcherProvisioningState? ProvisioningState { get; } + /// The resource ID of a user-assigned managed identity that will be assigned to a new alert rule. + public ResourceIdentifier DefaultAlertRuleIdentityResourceId { get; set; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherStatus.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherStatus.cs new file mode 100644 index 000000000000..302a581fe79e --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherStatus.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.DatabaseWatcher.Models +{ + /// The monitoring collection status of a watcher. + public readonly partial struct WatcherStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WatcherStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StartingValue = "Starting"; + private const string RunningValue = "Running"; + private const string StoppingValue = "Stopping"; + private const string StoppedValue = "Stopped"; + private const string DeletingValue = "Deleting"; + + /// Denotes the watcher is in a starting state. + public static WatcherStatus Starting { get; } = new WatcherStatus(StartingValue); + /// Denotes the watcher is in a running state. + public static WatcherStatus Running { get; } = new WatcherStatus(RunningValue); + /// Denotes the watcher is in a stopping state. + public static WatcherStatus Stopping { get; } = new WatcherStatus(StoppingValue); + /// Denotes the watcher is in a stopped state. + public static WatcherStatus Stopped { get; } = new WatcherStatus(StoppedValue); + /// Denotes the watcher is in a deleting state. + public static WatcherStatus Deleting { get; } = new WatcherStatus(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(WatcherStatus left, WatcherStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WatcherStatus left, WatcherStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator WatcherStatus(string value) => new WatcherStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WatcherStatus other && Equals(other); + /// + public bool Equals(WatcherStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherUpdateProperties.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..904e21e1d53d --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherUpdateProperties.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + public partial class WatcherUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WatcherUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Datastore)) + { + writer.WritePropertyName("datastore"u8); + writer.WriteObjectValue(Datastore, options); + } + if (Optional.IsDefined(DefaultAlertRuleIdentityResourceId)) + { + writer.WritePropertyName("defaultAlertRuleIdentityResourceId"u8); + writer.WriteStringValue(DefaultAlertRuleIdentityResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WatcherUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WatcherUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWatcherUpdateProperties(document.RootElement, options); + } + + internal static WatcherUpdateProperties DeserializeWatcherUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Datastore datastore = default; + ResourceIdentifier defaultAlertRuleIdentityResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("datastore"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + datastore = Datastore.DeserializeDatastore(property.Value, options); + continue; + } + if (property.NameEquals("defaultAlertRuleIdentityResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultAlertRuleIdentityResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WatcherUpdateProperties(datastore, defaultAlertRuleIdentityResourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WatcherUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + WatcherUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWatcherUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WatcherUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherUpdateProperties.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherUpdateProperties.cs new file mode 100644 index 000000000000..efbe98de6d9e --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/Models/WatcherUpdateProperties.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseWatcher.Models +{ + /// The updatable properties of the Watcher. + public partial class WatcherUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WatcherUpdateProperties() + { + } + + /// Initializes a new instance of . + /// The data store for collected monitoring data. + /// The resource ID of a user-assigned managed identity that will be assigned to a new alert rule. + /// Keeps track of any properties unknown to the library. + internal WatcherUpdateProperties(Datastore datastore, ResourceIdentifier defaultAlertRuleIdentityResourceId, IDictionary serializedAdditionalRawData) + { + Datastore = datastore; + DefaultAlertRuleIdentityResourceId = defaultAlertRuleIdentityResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The data store for collected monitoring data. + public Datastore Datastore { get; set; } + /// The resource ID of a user-assigned managed identity that will be assigned to a new alert rule. + public ResourceIdentifier DefaultAlertRuleIdentityResourceId { get; set; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/ProviderConstants.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..4bbac7bcb68c --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/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.DatabaseWatcher +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/AlertRuleResourcesRestOperations.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/AlertRuleResourcesRestOperations.cs new file mode 100644 index 000000000000..32d12dcacca6 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/AlertRuleResourcesRestOperations.cs @@ -0,0 +1,523 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DatabaseWatcher.Models; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + internal partial class AlertRuleResourcesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AlertRuleResourcesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public AlertRuleResourcesRestOperations(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 ?? "2025-01-02"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string watcherName, string alertRuleResourceName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/alertRuleResources/", false); + uri.AppendPath(alertRuleResourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string watcherName, string alertRuleResourceName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/alertRuleResources/", false); + uri.AppendPath(alertRuleResourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a AlertRuleResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The alert rule proxy resource 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 watcherName, string alertRuleResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(alertRuleResourceName, nameof(alertRuleResourceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, watcherName, alertRuleResourceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AlertRuleResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AlertRuleResourceData.DeserializeAlertRuleResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AlertRuleResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a AlertRuleResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The alert rule proxy resource 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 watcherName, string alertRuleResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(alertRuleResourceName, nameof(alertRuleResourceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, watcherName, alertRuleResourceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AlertRuleResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AlertRuleResourceData.DeserializeAlertRuleResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AlertRuleResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string watcherName, string alertRuleResourceName, AlertRuleResourceData data) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/alertRuleResources/", false); + uri.AppendPath(alertRuleResourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string watcherName, string alertRuleResourceName, AlertRuleResourceData 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/alertRuleResources/", false); + uri.AppendPath(alertRuleResourceName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a AlertRuleResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The alert rule proxy resource name. + /// Resource create parameters. + /// 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 watcherName, string alertRuleResourceName, AlertRuleResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(alertRuleResourceName, nameof(alertRuleResourceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, watcherName, alertRuleResourceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + AlertRuleResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AlertRuleResourceData.DeserializeAlertRuleResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a AlertRuleResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The alert rule proxy resource name. + /// Resource create parameters. + /// 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 watcherName, string alertRuleResourceName, AlertRuleResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(alertRuleResourceName, nameof(alertRuleResourceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, watcherName, alertRuleResourceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + AlertRuleResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AlertRuleResourceData.DeserializeAlertRuleResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string watcherName, string alertRuleResourceName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/alertRuleResources/", false); + uri.AppendPath(alertRuleResourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string watcherName, string alertRuleResourceName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/alertRuleResources/", false); + uri.AppendPath(alertRuleResourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a AlertRuleResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The alert rule proxy resource 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 watcherName, string alertRuleResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(alertRuleResourceName, nameof(alertRuleResourceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, watcherName, alertRuleResourceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a AlertRuleResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The alert rule proxy resource 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 watcherName, string alertRuleResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(alertRuleResourceName, nameof(alertRuleResourceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, watcherName, alertRuleResourceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/alertRuleResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByParentRequest(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/alertRuleResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AlertRuleResource resources by Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentAsync(string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, watcherName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AlertRuleResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AlertRuleResourceListResult.DeserializeAlertRuleResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AlertRuleResource resources by Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParent(string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, watcherName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AlertRuleResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AlertRuleResourceListResult.DeserializeAlertRuleResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string watcherName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string watcherName) + { + 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 AlertRuleResource resources by Watcher. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, watcherName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AlertRuleResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AlertRuleResourceListResult.DeserializeAlertRuleResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AlertRuleResource resources by Watcher. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, watcherName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AlertRuleResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AlertRuleResourceListResult.DeserializeAlertRuleResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/HealthValidationsRestOperations.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/HealthValidationsRestOperations.cs new file mode 100644 index 000000000000..3de3538979e1 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/HealthValidationsRestOperations.cs @@ -0,0 +1,415 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DatabaseWatcher.Models; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + internal partial class HealthValidationsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of HealthValidationsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public HealthValidationsRestOperations(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 ?? "2025-01-02"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string watcherName, string healthValidationName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/healthValidations/", false); + uri.AppendPath(healthValidationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string watcherName, string healthValidationName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/healthValidations/", false); + uri.AppendPath(healthValidationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a HealthValidation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The health validation resource 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 watcherName, string healthValidationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(healthValidationName, nameof(healthValidationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, watcherName, healthValidationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + HealthValidationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = HealthValidationData.DeserializeHealthValidationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((HealthValidationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a HealthValidation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The health validation resource 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 watcherName, string healthValidationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(healthValidationName, nameof(healthValidationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, watcherName, healthValidationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + HealthValidationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = HealthValidationData.DeserializeHealthValidationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((HealthValidationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/healthValidations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByParentRequest(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/healthValidations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List HealthValidation resources by Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentAsync(string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, watcherName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + HealthValidationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = HealthValidationListResult.DeserializeHealthValidationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List HealthValidation resources by Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParent(string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, watcherName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + HealthValidationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = HealthValidationListResult.DeserializeHealthValidationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStartValidationRequestUri(string subscriptionId, string resourceGroupName, string watcherName, string healthValidationName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/healthValidations/", false); + uri.AppendPath(healthValidationName, true); + uri.AppendPath("/startValidation", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStartValidationRequest(string subscriptionId, string resourceGroupName, string watcherName, string healthValidationName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/healthValidations/", false); + uri.AppendPath(healthValidationName, true); + uri.AppendPath("/startValidation", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Starts health validation for a watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The health validation resource name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StartValidationAsync(string subscriptionId, string resourceGroupName, string watcherName, string healthValidationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(healthValidationName, nameof(healthValidationName)); + + using var message = CreateStartValidationRequest(subscriptionId, resourceGroupName, watcherName, healthValidationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts health validation for a watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The health validation resource name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response StartValidation(string subscriptionId, string resourceGroupName, string watcherName, string healthValidationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(healthValidationName, nameof(healthValidationName)); + + using var message = CreateStartValidationRequest(subscriptionId, resourceGroupName, watcherName, healthValidationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string watcherName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string watcherName) + { + 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 HealthValidation resources by Watcher. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, watcherName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + HealthValidationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = HealthValidationListResult.DeserializeHealthValidationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List HealthValidation resources by Watcher. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, watcherName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + HealthValidationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = HealthValidationListResult.DeserializeHealthValidationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/SharedPrivateLinkResourcesRestOperations.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/SharedPrivateLinkResourcesRestOperations.cs new file mode 100644 index 000000000000..599cd88a46bd --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/SharedPrivateLinkResourcesRestOperations.cs @@ -0,0 +1,513 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DatabaseWatcher.Models; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + internal partial class SharedPrivateLinkResourcesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SharedPrivateLinkResourcesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SharedPrivateLinkResourcesRestOperations(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 ?? "2025-01-02"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string watcherName, string sharedPrivateLinkResourceName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/sharedPrivateLinkResources/", false); + uri.AppendPath(sharedPrivateLinkResourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string watcherName, string sharedPrivateLinkResourceName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/sharedPrivateLinkResources/", false); + uri.AppendPath(sharedPrivateLinkResourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a SharedPrivateLinkResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The Shared Private Link resource 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 watcherName, string sharedPrivateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(sharedPrivateLinkResourceName, nameof(sharedPrivateLinkResourceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, watcherName, sharedPrivateLinkResourceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SharedPrivateLinkResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SharedPrivateLinkResourceData.DeserializeSharedPrivateLinkResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SharedPrivateLinkResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a SharedPrivateLinkResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The Shared Private Link resource 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 watcherName, string sharedPrivateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(sharedPrivateLinkResourceName, nameof(sharedPrivateLinkResourceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, watcherName, sharedPrivateLinkResourceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SharedPrivateLinkResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SharedPrivateLinkResourceData.DeserializeSharedPrivateLinkResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SharedPrivateLinkResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string watcherName, string sharedPrivateLinkResourceName, SharedPrivateLinkResourceData data) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/sharedPrivateLinkResources/", false); + uri.AppendPath(sharedPrivateLinkResourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string watcherName, string sharedPrivateLinkResourceName, SharedPrivateLinkResourceData 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/sharedPrivateLinkResources/", false); + uri.AppendPath(sharedPrivateLinkResourceName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a SharedPrivateLinkResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The Shared Private Link resource name. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string watcherName, string sharedPrivateLinkResourceName, SharedPrivateLinkResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(sharedPrivateLinkResourceName, nameof(sharedPrivateLinkResourceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, watcherName, sharedPrivateLinkResourceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a SharedPrivateLinkResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The Shared Private Link resource name. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string watcherName, string sharedPrivateLinkResourceName, SharedPrivateLinkResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(sharedPrivateLinkResourceName, nameof(sharedPrivateLinkResourceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, watcherName, sharedPrivateLinkResourceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string watcherName, string sharedPrivateLinkResourceName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/sharedPrivateLinkResources/", false); + uri.AppendPath(sharedPrivateLinkResourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string watcherName, string sharedPrivateLinkResourceName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/sharedPrivateLinkResources/", false); + uri.AppendPath(sharedPrivateLinkResourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a SharedPrivateLinkResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The Shared Private Link resource 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 watcherName, string sharedPrivateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(sharedPrivateLinkResourceName, nameof(sharedPrivateLinkResourceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, watcherName, sharedPrivateLinkResourceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a SharedPrivateLinkResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The Shared Private Link resource 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 watcherName, string sharedPrivateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(sharedPrivateLinkResourceName, nameof(sharedPrivateLinkResourceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, watcherName, sharedPrivateLinkResourceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByWatcherRequestUri(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/sharedPrivateLinkResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByWatcherRequest(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/sharedPrivateLinkResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List SharedPrivateLinkResource resources by Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByWatcherAsync(string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByWatcherRequest(subscriptionId, resourceGroupName, watcherName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SharedPrivateLinkResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SharedPrivateLinkResourceListResult.DeserializeSharedPrivateLinkResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List SharedPrivateLinkResource resources by Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByWatcher(string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByWatcherRequest(subscriptionId, resourceGroupName, watcherName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SharedPrivateLinkResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SharedPrivateLinkResourceListResult.DeserializeSharedPrivateLinkResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByWatcherNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string watcherName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByWatcherNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string watcherName) + { + 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 SharedPrivateLinkResource resources by Watcher. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByWatcherNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByWatcherNextPageRequest(nextLink, subscriptionId, resourceGroupName, watcherName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SharedPrivateLinkResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SharedPrivateLinkResourceListResult.DeserializeSharedPrivateLinkResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List SharedPrivateLinkResource resources by Watcher. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByWatcherNextPage(string nextLink, string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByWatcherNextPageRequest(nextLink, subscriptionId, resourceGroupName, watcherName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SharedPrivateLinkResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SharedPrivateLinkResourceListResult.DeserializeSharedPrivateLinkResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/TargetsRestOperations.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/TargetsRestOperations.cs new file mode 100644 index 000000000000..64aa4cc689bf --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/TargetsRestOperations.cs @@ -0,0 +1,523 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DatabaseWatcher.Models; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + internal partial class TargetsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of TargetsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public TargetsRestOperations(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 ?? "2025-01-02"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string watcherName, string targetName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string watcherName, string targetName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Target. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The target resource 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 watcherName, string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, watcherName, targetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TargetData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = TargetData.DeserializeTargetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((TargetData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Target. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The target resource 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 watcherName, string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, watcherName, targetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TargetData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = TargetData.DeserializeTargetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((TargetData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string watcherName, string targetName, TargetData data) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string watcherName, string targetName, TargetData 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/targets/", false); + uri.AppendPath(targetName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Target. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The target resource name. + /// Resource create parameters. + /// 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 watcherName, string targetName, TargetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, watcherName, targetName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + TargetData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = TargetData.DeserializeTargetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Target. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The target resource name. + /// Resource create parameters. + /// 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 watcherName, string targetName, TargetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, watcherName, targetName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + TargetData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = TargetData.DeserializeTargetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string watcherName, string targetName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string watcherName, string targetName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/targets/", false); + uri.AppendPath(targetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Target. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The target resource 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 watcherName, string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, watcherName, targetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Target. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The target resource 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 watcherName, string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, watcherName, targetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByWatcherRequestUri(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/targets", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByWatcherRequest(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/targets", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Target resources by Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByWatcherAsync(string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByWatcherRequest(subscriptionId, resourceGroupName, watcherName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TargetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = TargetListResult.DeserializeTargetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Target resources by Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByWatcher(string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByWatcherRequest(subscriptionId, resourceGroupName, watcherName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TargetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = TargetListResult.DeserializeTargetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByWatcherNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string watcherName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByWatcherNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string watcherName) + { + 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 Target resources by Watcher. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByWatcherNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByWatcherNextPageRequest(nextLink, subscriptionId, resourceGroupName, watcherName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TargetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = TargetListResult.DeserializeTargetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Target resources by Watcher. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByWatcherNextPage(string nextLink, string subscriptionId, string resourceGroupName, string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateListByWatcherNextPageRequest(nextLink, subscriptionId, resourceGroupName, watcherName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TargetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = TargetListResult.DeserializeTargetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/WatchersRestOperations.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/WatchersRestOperations.cs new file mode 100644 index 000000000000..c9840ea34879 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/RestOperations/WatchersRestOperations.cs @@ -0,0 +1,895 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DatabaseWatcher.Models; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + internal partial class WatchersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WatchersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public WatchersRestOperations(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 ?? "2025-01-02"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher 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 watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, watcherName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WatcherData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WatcherData.DeserializeWatcherData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WatcherData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher 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 watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, watcherName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WatcherData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WatcherData.DeserializeWatcherData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WatcherData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string watcherName, WatcherData data) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string watcherName, WatcherData 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// Resource create parameters. + /// 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 watcherName, WatcherData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, watcherName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// Resource create parameters. + /// 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 watcherName, WatcherData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, watcherName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string watcherName, WatcherPatch 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string watcherName, WatcherPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The resource properties to be updated. + /// 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 watcherName, WatcherPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, watcherName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// The resource properties to be updated. + /// 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 watcherName, WatcherPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, watcherName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher 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 watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, watcherName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher 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 watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, watcherName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + 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.DatabaseWatcher/watchers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(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.DatabaseWatcher/watchers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Watcher resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WatcherListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WatcherListResult.DeserializeWatcherListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Watcher resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WatcherListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WatcherListResult.DeserializeWatcherListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DatabaseWatcher/watchers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + 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.DatabaseWatcher/watchers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Watcher resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + WatcherListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WatcherListResult.DeserializeWatcherListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Watcher resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + WatcherListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WatcherListResult.DeserializeWatcherListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, 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; + } + + /// The action to start monitoring all targets configured for a database watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// 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 watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, watcherName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// The action to start monitoring all targets configured for a database watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// 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 watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, watcherName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string watcherName) + { + 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.DatabaseWatcher/watchers/", false); + uri.AppendPath(watcherName, 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; + } + + /// The action to stop monitoring all targets configured for a database watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// 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 watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, watcherName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// The action to stop monitoring all targets configured for a database watcher. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database watcher name. + /// 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 watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, watcherName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(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; + } + + /// List Watcher resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(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 = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WatcherListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WatcherListResult.DeserializeWatcherListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Watcher resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(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 = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WatcherListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WatcherListResult.DeserializeWatcherListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + 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; + } + + /// List Watcher resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + WatcherListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WatcherListResult.DeserializeWatcherListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Watcher resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + WatcherListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WatcherListResult.DeserializeWatcherListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResource.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResource.Serialization.cs new file mode 100644 index 000000000000..f50fbe916eab --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + public partial class SharedPrivateLinkResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SharedPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SharedPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResource.cs new file mode 100644 index 000000000000..9a49a30dacff --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResource.cs @@ -0,0 +1,347 @@ +// 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.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// + /// A Class representing a SharedPrivateLinkResource 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 GetSharedPrivateLinkResource method. + /// Otherwise you can get one from its parent resource using the GetSharedPrivateLinkResource method. + /// + public partial class SharedPrivateLinkResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The watcherName. + /// The sharedPrivateLinkResourceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string watcherName, string sharedPrivateLinkResourceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sharedPrivateLinkResourceClientDiagnostics; + private readonly SharedPrivateLinkResourcesRestOperations _sharedPrivateLinkResourceRestClient; + private readonly SharedPrivateLinkResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DatabaseWatcher/watchers/sharedPrivateLinkResources"; + + /// Initializes a new instance of the class for mocking. + protected SharedPrivateLinkResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SharedPrivateLinkResource(ArmClient client, SharedPrivateLinkResourceData 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 SharedPrivateLinkResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sharedPrivateLinkResourceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseWatcher", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sharedPrivateLinkResourceApiVersion); + _sharedPrivateLinkResourceRestClient = new SharedPrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sharedPrivateLinkResourceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 SharedPrivateLinkResourceData 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 SharedPrivateLinkResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sharedPrivateLinkResourceClientDiagnostics.CreateScope("SharedPrivateLinkResource.Get"); + scope.Start(); + try + { + var response = await _sharedPrivateLinkResourceRestClient.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 SharedPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a SharedPrivateLinkResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sharedPrivateLinkResourceClientDiagnostics.CreateScope("SharedPrivateLinkResource.Get"); + scope.Start(); + try + { + var response = _sharedPrivateLinkResourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SharedPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a SharedPrivateLinkResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Delete + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sharedPrivateLinkResourceClientDiagnostics.CreateScope("SharedPrivateLinkResource.Delete"); + scope.Start(); + try + { + var response = await _sharedPrivateLinkResourceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseWatcherArmOperation(_sharedPrivateLinkResourceClientDiagnostics, Pipeline, _sharedPrivateLinkResourceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a SharedPrivateLinkResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Delete + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sharedPrivateLinkResourceClientDiagnostics.CreateScope("SharedPrivateLinkResource.Delete"); + scope.Start(); + try + { + var response = _sharedPrivateLinkResourceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DatabaseWatcherArmOperation(_sharedPrivateLinkResourceClientDiagnostics, Pipeline, _sharedPrivateLinkResourceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a SharedPrivateLinkResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Create + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SharedPrivateLinkResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sharedPrivateLinkResourceClientDiagnostics.CreateScope("SharedPrivateLinkResource.Update"); + scope.Start(); + try + { + var response = await _sharedPrivateLinkResourceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseWatcherArmOperation(new SharedPrivateLinkResourceOperationSource(Client), _sharedPrivateLinkResourceClientDiagnostics, Pipeline, _sharedPrivateLinkResourceRestClient.CreateCreateRequest(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 a SharedPrivateLinkResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Create + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SharedPrivateLinkResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sharedPrivateLinkResourceClientDiagnostics.CreateScope("SharedPrivateLinkResource.Update"); + scope.Start(); + try + { + var response = _sharedPrivateLinkResourceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new DatabaseWatcherArmOperation(new SharedPrivateLinkResourceOperationSource(Client), _sharedPrivateLinkResourceClientDiagnostics, Pipeline, _sharedPrivateLinkResourceRestClient.CreateCreateRequest(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/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResourceCollection.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResourceCollection.cs new file mode 100644 index 000000000000..381ddc746320 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResourceCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// + /// 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 GetSharedPrivateLinkResources method from an instance of . + /// + public partial class SharedPrivateLinkResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _sharedPrivateLinkResourceClientDiagnostics; + private readonly SharedPrivateLinkResourcesRestOperations _sharedPrivateLinkResourceRestClient; + + /// Initializes a new instance of the class for mocking. + protected SharedPrivateLinkResourceCollection() + { + } + + /// 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 SharedPrivateLinkResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sharedPrivateLinkResourceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseWatcher", SharedPrivateLinkResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SharedPrivateLinkResource.ResourceType, out string sharedPrivateLinkResourceApiVersion); + _sharedPrivateLinkResourceRestClient = new SharedPrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sharedPrivateLinkResourceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WatcherResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WatcherResource.ResourceType), nameof(id)); + } + + /// + /// Create a SharedPrivateLinkResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Create + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 Shared Private Link resource name. + /// Resource create parameters. + /// 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 sharedPrivateLinkResourceName, SharedPrivateLinkResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sharedPrivateLinkResourceName, nameof(sharedPrivateLinkResourceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sharedPrivateLinkResourceClientDiagnostics.CreateScope("SharedPrivateLinkResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sharedPrivateLinkResourceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sharedPrivateLinkResourceName, data, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseWatcherArmOperation(new SharedPrivateLinkResourceOperationSource(Client), _sharedPrivateLinkResourceClientDiagnostics, Pipeline, _sharedPrivateLinkResourceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sharedPrivateLinkResourceName, 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 SharedPrivateLinkResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Create + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 Shared Private Link resource name. + /// Resource create parameters. + /// 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 sharedPrivateLinkResourceName, SharedPrivateLinkResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sharedPrivateLinkResourceName, nameof(sharedPrivateLinkResourceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sharedPrivateLinkResourceClientDiagnostics.CreateScope("SharedPrivateLinkResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sharedPrivateLinkResourceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sharedPrivateLinkResourceName, data, cancellationToken); + var operation = new DatabaseWatcherArmOperation(new SharedPrivateLinkResourceOperationSource(Client), _sharedPrivateLinkResourceClientDiagnostics, Pipeline, _sharedPrivateLinkResourceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sharedPrivateLinkResourceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a SharedPrivateLinkResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Shared Private Link resource 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 sharedPrivateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sharedPrivateLinkResourceName, nameof(sharedPrivateLinkResourceName)); + + using var scope = _sharedPrivateLinkResourceClientDiagnostics.CreateScope("SharedPrivateLinkResourceCollection.Get"); + scope.Start(); + try + { + var response = await _sharedPrivateLinkResourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sharedPrivateLinkResourceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SharedPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a SharedPrivateLinkResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Shared Private Link resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string sharedPrivateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sharedPrivateLinkResourceName, nameof(sharedPrivateLinkResourceName)); + + using var scope = _sharedPrivateLinkResourceClientDiagnostics.CreateScope("SharedPrivateLinkResourceCollection.Get"); + scope.Start(); + try + { + var response = _sharedPrivateLinkResourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sharedPrivateLinkResourceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SharedPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List SharedPrivateLinkResource resources by Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_ListByWatcher + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sharedPrivateLinkResourceRestClient.CreateListByWatcherRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sharedPrivateLinkResourceRestClient.CreateListByWatcherNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SharedPrivateLinkResource(Client, SharedPrivateLinkResourceData.DeserializeSharedPrivateLinkResourceData(e)), _sharedPrivateLinkResourceClientDiagnostics, Pipeline, "SharedPrivateLinkResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List SharedPrivateLinkResource resources by Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_ListByWatcher + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sharedPrivateLinkResourceRestClient.CreateListByWatcherRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sharedPrivateLinkResourceRestClient.CreateListByWatcherNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SharedPrivateLinkResource(Client, SharedPrivateLinkResourceData.DeserializeSharedPrivateLinkResourceData(e)), _sharedPrivateLinkResourceClientDiagnostics, Pipeline, "SharedPrivateLinkResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Shared Private Link resource 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 sharedPrivateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sharedPrivateLinkResourceName, nameof(sharedPrivateLinkResourceName)); + + using var scope = _sharedPrivateLinkResourceClientDiagnostics.CreateScope("SharedPrivateLinkResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _sharedPrivateLinkResourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sharedPrivateLinkResourceName, 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.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Shared Private Link resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string sharedPrivateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sharedPrivateLinkResourceName, nameof(sharedPrivateLinkResourceName)); + + using var scope = _sharedPrivateLinkResourceClientDiagnostics.CreateScope("SharedPrivateLinkResourceCollection.Exists"); + scope.Start(); + try + { + var response = _sharedPrivateLinkResourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sharedPrivateLinkResourceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Shared Private Link resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string sharedPrivateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sharedPrivateLinkResourceName, nameof(sharedPrivateLinkResourceName)); + + using var scope = _sharedPrivateLinkResourceClientDiagnostics.CreateScope("SharedPrivateLinkResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _sharedPrivateLinkResourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sharedPrivateLinkResourceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SharedPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Shared Private Link resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string sharedPrivateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sharedPrivateLinkResourceName, nameof(sharedPrivateLinkResourceName)); + + using var scope = _sharedPrivateLinkResourceClientDiagnostics.CreateScope("SharedPrivateLinkResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _sharedPrivateLinkResourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sharedPrivateLinkResourceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SharedPrivateLinkResource(Client, response.Value), 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/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResourceData.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResourceData.Serialization.cs new file mode 100644 index 000000000000..910066428f15 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResourceData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DatabaseWatcher.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + public partial class SharedPrivateLinkResourceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SharedPrivateLinkResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + SharedPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SharedPrivateLinkResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSharedPrivateLinkResourceData(document.RootElement, options); + } + + internal static SharedPrivateLinkResourceData DeserializeSharedPrivateLinkResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SharedPrivateLinkResourceProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SharedPrivateLinkResourceProperties.DeserializeSharedPrivateLinkResourceProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SharedPrivateLinkResourceData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SharedPrivateLinkResourceData)} does not support writing '{options.Format}' format."); + } + } + + SharedPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSharedPrivateLinkResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SharedPrivateLinkResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResourceData.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResourceData.cs new file mode 100644 index 000000000000..45f2b1b41d87 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/SharedPrivateLinkResourceData.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; +using Azure.ResourceManager.DatabaseWatcher.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// + /// A class representing the SharedPrivateLinkResource data model. + /// Concrete proxy resource types can be created by aliasing this type using a specific property type. + /// + public partial class SharedPrivateLinkResourceData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SharedPrivateLinkResourceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal SharedPrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SharedPrivateLinkResourceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public SharedPrivateLinkResourceProperties Properties { get; set; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetCollection.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetCollection.cs new file mode 100644 index 000000000000..4dbbaeab8572 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// + /// 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 GetTargets method from an instance of . + /// + public partial class TargetCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _targetClientDiagnostics; + private readonly TargetsRestOperations _targetRestClient; + + /// Initializes a new instance of the class for mocking. + protected TargetCollection() + { + } + + /// 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 TargetCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _targetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseWatcher", TargetResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(TargetResource.ResourceType, out string targetApiVersion); + _targetRestClient = new TargetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, targetApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WatcherResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WatcherResource.ResourceType), nameof(id)); + } + + /// + /// Create a Target + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 resource name. + /// Resource create parameters. + /// 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 targetName, TargetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _targetClientDiagnostics.CreateScope("TargetCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _targetRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, targetName, data, cancellationToken).ConfigureAwait(false); + var uri = _targetRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, targetName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new DatabaseWatcherArmOperation(Response.FromValue(new TargetResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Target + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 resource name. + /// Resource create parameters. + /// 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 targetName, TargetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _targetClientDiagnostics.CreateScope("TargetCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _targetRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, targetName, data, cancellationToken); + var uri = _targetRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, targetName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new DatabaseWatcherArmOperation(Response.FromValue(new TargetResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Target + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The target resource 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 targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var scope = _targetClientDiagnostics.CreateScope("TargetCollection.Get"); + scope.Start(); + try + { + var response = await _targetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, targetName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TargetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Target + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The target resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var scope = _targetClientDiagnostics.CreateScope("TargetCollection.Get"); + scope.Start(); + try + { + var response = _targetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, targetName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TargetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Target resources by Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets + /// + /// + /// Operation Id + /// Target_ListByWatcher + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _targetRestClient.CreateListByWatcherRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _targetRestClient.CreateListByWatcherNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new TargetResource(Client, TargetData.DeserializeTargetData(e)), _targetClientDiagnostics, Pipeline, "TargetCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Target resources by Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets + /// + /// + /// Operation Id + /// Target_ListByWatcher + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _targetRestClient.CreateListByWatcherRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _targetRestClient.CreateListByWatcherNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new TargetResource(Client, TargetData.DeserializeTargetData(e)), _targetClientDiagnostics, Pipeline, "TargetCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The target resource 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 targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var scope = _targetClientDiagnostics.CreateScope("TargetCollection.Exists"); + scope.Start(); + try + { + var response = await _targetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, targetName, 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.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The target resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var scope = _targetClientDiagnostics.CreateScope("TargetCollection.Exists"); + scope.Start(); + try + { + var response = _targetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, targetName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The target resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var scope = _targetClientDiagnostics.CreateScope("TargetCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _targetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, targetName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new TargetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The target resource name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string targetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(targetName, nameof(targetName)); + + using var scope = _targetClientDiagnostics.CreateScope("TargetCollection.GetIfExists"); + scope.Start(); + try + { + var response = _targetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, targetName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new TargetResource(Client, response.Value), 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/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetData.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetData.Serialization.cs new file mode 100644 index 000000000000..433d59dcf7ab --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DatabaseWatcher.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + public partial class TargetData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TargetData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + TargetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TargetData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTargetData(document.RootElement, options); + } + + internal static TargetData DeserializeTargetData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TargetProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = TargetProperties.DeserializeTargetProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TargetData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TargetData)} does not support writing '{options.Format}' format."); + } + } + + TargetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTargetData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TargetData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetData.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetData.cs new file mode 100644 index 000000000000..04dda036ff16 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetData.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DatabaseWatcher.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// + /// A class representing the Target data model. + /// Concrete proxy resource types can be created by aliasing this type using a specific property type. + /// + public partial class TargetData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TargetData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// The resource-specific properties for this resource. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Keeps track of any properties unknown to the library. + internal TargetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, TargetProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The resource-specific properties for this resource. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public TargetProperties Properties { get; set; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetResource.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetResource.Serialization.cs new file mode 100644 index 000000000000..64a7c916ca21 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + public partial class TargetResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + TargetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + TargetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetResource.cs new file mode 100644 index 000000000000..654e6c42cde4 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/TargetResource.cs @@ -0,0 +1,355 @@ +// 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.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// + /// A Class representing a Target 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 GetTargetResource method. + /// Otherwise you can get one from its parent resource using the GetTarget method. + /// + public partial class TargetResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The watcherName. + /// The targetName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string watcherName, string targetName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _targetClientDiagnostics; + private readonly TargetsRestOperations _targetRestClient; + private readonly TargetData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DatabaseWatcher/watchers/targets"; + + /// Initializes a new instance of the class for mocking. + protected TargetResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal TargetResource(ArmClient client, TargetData 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 TargetResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _targetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseWatcher", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string targetApiVersion); + _targetRestClient = new TargetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, targetApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 TargetData 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 Target + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _targetClientDiagnostics.CreateScope("TargetResource.Get"); + scope.Start(); + try + { + var response = await _targetRestClient.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 TargetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Target + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _targetClientDiagnostics.CreateScope("TargetResource.Get"); + scope.Start(); + try + { + var response = _targetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TargetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Target + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Delete + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _targetClientDiagnostics.CreateScope("TargetResource.Delete"); + scope.Start(); + try + { + var response = await _targetRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _targetRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new DatabaseWatcherArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Target + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Delete + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _targetClientDiagnostics.CreateScope("TargetResource.Delete"); + scope.Start(); + try + { + var response = _targetRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _targetRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new DatabaseWatcherArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Target + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, TargetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _targetClientDiagnostics.CreateScope("TargetResource.Update"); + scope.Start(); + try + { + var response = await _targetRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _targetRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new DatabaseWatcherArmOperation(Response.FromValue(new TargetResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Target + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, TargetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _targetClientDiagnostics.CreateScope("TargetResource.Update"); + scope.Start(); + try + { + var response = _targetRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _targetRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new DatabaseWatcherArmOperation(Response.FromValue(new TargetResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherCollection.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherCollection.cs new file mode 100644 index 000000000000..4ec24987d6d6 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// + /// 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 GetWatchers method from an instance of . + /// + public partial class WatcherCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _watcherClientDiagnostics; + private readonly WatchersRestOperations _watcherRestClient; + + /// Initializes a new instance of the class for mocking. + protected WatcherCollection() + { + } + + /// 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 WatcherCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _watcherClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseWatcher", WatcherResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WatcherResource.ResourceType, out string watcherApiVersion); + _watcherRestClient = new WatchersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, watcherApiVersion); +#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 Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 database watcher name. + /// Resource create parameters. + /// 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 watcherName, WatcherData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _watcherClientDiagnostics.CreateScope("WatcherCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _watcherRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, watcherName, data, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseWatcherArmOperation(new WatcherOperationSource(Client), _watcherClientDiagnostics, Pipeline, _watcherRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, watcherName, 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 Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 database watcher name. + /// Resource create parameters. + /// 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 watcherName, WatcherData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _watcherClientDiagnostics.CreateScope("WatcherCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _watcherRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, watcherName, data, cancellationToken); + var operation = new DatabaseWatcherArmOperation(new WatcherOperationSource(Client), _watcherClientDiagnostics, Pipeline, _watcherRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, watcherName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database watcher 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 watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var scope = _watcherClientDiagnostics.CreateScope("WatcherCollection.Get"); + scope.Start(); + try + { + var response = await _watcherRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, watcherName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WatcherResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database watcher name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var scope = _watcherClientDiagnostics.CreateScope("WatcherCollection.Get"); + scope.Start(); + try + { + var response = _watcherRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, watcherName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WatcherResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Watcher resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers + /// + /// + /// Operation Id + /// Watcher_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _watcherRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _watcherRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WatcherResource(Client, WatcherData.DeserializeWatcherData(e)), _watcherClientDiagnostics, Pipeline, "WatcherCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Watcher resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers + /// + /// + /// Operation Id + /// Watcher_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _watcherRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _watcherRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WatcherResource(Client, WatcherData.DeserializeWatcherData(e)), _watcherClientDiagnostics, Pipeline, "WatcherCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database watcher 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 watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var scope = _watcherClientDiagnostics.CreateScope("WatcherCollection.Exists"); + scope.Start(); + try + { + var response = await _watcherRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, watcherName, 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.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database watcher name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var scope = _watcherClientDiagnostics.CreateScope("WatcherCollection.Exists"); + scope.Start(); + try + { + var response = _watcherRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, watcherName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database watcher name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var scope = _watcherClientDiagnostics.CreateScope("WatcherCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _watcherRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, watcherName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WatcherResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database watcher name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string watcherName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(watcherName, nameof(watcherName)); + + using var scope = _watcherClientDiagnostics.CreateScope("WatcherCollection.GetIfExists"); + scope.Start(); + try + { + var response = _watcherRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, watcherName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WatcherResource(Client, response.Value), 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/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherData.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherData.Serialization.cs new file mode 100644 index 000000000000..8ece7c18669f --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherData.Serialization.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DatabaseWatcher.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + public partial class WatcherData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WatcherData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + } + + WatcherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WatcherData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWatcherData(document.RootElement, options); + } + + internal static WatcherData DeserializeWatcherData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WatcherProperties properties = default; + ManagedServiceIdentityV4 identity = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = WatcherProperties.DeserializeWatcherProperties(property.Value, options); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ManagedServiceIdentityV4.DeserializeManagedServiceIdentityV4(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + 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"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WatcherData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + identity, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WatcherData)} does not support writing '{options.Format}' format."); + } + } + + WatcherData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWatcherData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WatcherData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherData.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherData.cs new file mode 100644 index 000000000000..db4ed0ffd517 --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherData.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DatabaseWatcher.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// + /// A class representing the Watcher data model. + /// The DatabaseWatcherProviderHub resource. + /// + public partial class WatcherData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public WatcherData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// Keeps track of any properties unknown to the library. + internal WatcherData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, WatcherProperties properties, ManagedServiceIdentityV4 identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WatcherData() + { + } + + /// The resource-specific properties for this resource. + public WatcherProperties Properties { get; set; } + /// The managed service identities assigned to this resource. + public ManagedServiceIdentityV4 Identity { get; set; } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherResource.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherResource.Serialization.cs new file mode 100644 index 000000000000..3d31f027fcdd --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + public partial class WatcherResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WatcherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WatcherData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherResource.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherResource.cs new file mode 100644 index 000000000000..7b83019f45da --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/WatcherResource.cs @@ -0,0 +1,1151 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DatabaseWatcher.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DatabaseWatcher +{ + /// + /// A Class representing a Watcher 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 GetWatcherResource method. + /// Otherwise you can get one from its parent resource using the GetWatcher method. + /// + public partial class WatcherResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The watcherName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string watcherName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _watcherClientDiagnostics; + private readonly WatchersRestOperations _watcherRestClient; + private readonly WatcherData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DatabaseWatcher/watchers"; + + /// Initializes a new instance of the class for mocking. + protected WatcherResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WatcherResource(ArmClient client, WatcherData 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 WatcherResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _watcherClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseWatcher", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string watcherApiVersion); + _watcherRestClient = new WatchersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, watcherApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 WatcherData 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 AlertRuleResources in the Watcher. + /// An object representing collection of AlertRuleResources and their operations over a AlertRuleResource. + public virtual AlertRuleResourceCollection GetAlertRuleResources() + { + return GetCachedClient(client => new AlertRuleResourceCollection(client, Id)); + } + + /// + /// Get a AlertRuleResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The alert rule proxy resource name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAlertRuleResourceAsync(string alertRuleResourceName, CancellationToken cancellationToken = default) + { + return await GetAlertRuleResources().GetAsync(alertRuleResourceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a AlertRuleResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName} + /// + /// + /// Operation Id + /// AlertRuleResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The alert rule proxy resource name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAlertRuleResource(string alertRuleResourceName, CancellationToken cancellationToken = default) + { + return GetAlertRuleResources().Get(alertRuleResourceName, cancellationToken); + } + + /// Gets a collection of HealthValidationResources in the Watcher. + /// An object representing collection of HealthValidationResources and their operations over a HealthValidationResource. + public virtual HealthValidationCollection GetHealthValidations() + { + return GetCachedClient(client => new HealthValidationCollection(client, Id)); + } + + /// + /// Get a HealthValidation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/healthValidations/{healthValidationName} + /// + /// + /// Operation Id + /// HealthValidation_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The health validation resource name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetHealthValidationAsync(string healthValidationName, CancellationToken cancellationToken = default) + { + return await GetHealthValidations().GetAsync(healthValidationName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a HealthValidation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/healthValidations/{healthValidationName} + /// + /// + /// Operation Id + /// HealthValidation_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The health validation resource name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetHealthValidation(string healthValidationName, CancellationToken cancellationToken = default) + { + return GetHealthValidations().Get(healthValidationName, cancellationToken); + } + + /// Gets a collection of TargetResources in the Watcher. + /// An object representing collection of TargetResources and their operations over a TargetResource. + public virtual TargetCollection GetTargets() + { + return GetCachedClient(client => new TargetCollection(client, Id)); + } + + /// + /// Get a Target + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The target resource name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetTargetAsync(string targetName, CancellationToken cancellationToken = default) + { + return await GetTargets().GetAsync(targetName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Target + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName} + /// + /// + /// Operation Id + /// Target_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The target resource name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetTarget(string targetName, CancellationToken cancellationToken = default) + { + return GetTargets().Get(targetName, cancellationToken); + } + + /// Gets a collection of SharedPrivateLinkResources in the Watcher. + /// An object representing collection of SharedPrivateLinkResources and their operations over a SharedPrivateLinkResource. + public virtual SharedPrivateLinkResourceCollection GetSharedPrivateLinkResources() + { + return GetCachedClient(client => new SharedPrivateLinkResourceCollection(client, Id)); + } + + /// + /// Get a SharedPrivateLinkResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Shared Private Link resource name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSharedPrivateLinkResourceAsync(string sharedPrivateLinkResourceName, CancellationToken cancellationToken = default) + { + return await GetSharedPrivateLinkResources().GetAsync(sharedPrivateLinkResourceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a SharedPrivateLinkResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName} + /// + /// + /// Operation Id + /// SharedPrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Shared Private Link resource name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSharedPrivateLinkResource(string sharedPrivateLinkResourceName, CancellationToken cancellationToken = default) + { + return GetSharedPrivateLinkResources().Get(sharedPrivateLinkResourceName, cancellationToken); + } + + /// + /// Get a Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _watcherClientDiagnostics.CreateScope("WatcherResource.Get"); + scope.Start(); + try + { + var response = await _watcherRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WatcherResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _watcherClientDiagnostics.CreateScope("WatcherResource.Get"); + scope.Start(); + try + { + var response = _watcherRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WatcherResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Delete + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _watcherClientDiagnostics.CreateScope("WatcherResource.Delete"); + scope.Start(); + try + { + var response = await _watcherRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseWatcherArmOperation(_watcherClientDiagnostics, Pipeline, _watcherRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Delete + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _watcherClientDiagnostics.CreateScope("WatcherResource.Delete"); + scope.Start(); + try + { + var response = _watcherRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new DatabaseWatcherArmOperation(_watcherClientDiagnostics, Pipeline, _watcherRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Update + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, WatcherPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _watcherClientDiagnostics.CreateScope("WatcherResource.Update"); + scope.Start(); + try + { + var response = await _watcherRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseWatcherArmOperation(new WatcherOperationSource(Client), _watcherClientDiagnostics, Pipeline, _watcherRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Watcher + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Update + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, WatcherPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _watcherClientDiagnostics.CreateScope("WatcherResource.Update"); + scope.Start(); + try + { + var response = _watcherRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new DatabaseWatcherArmOperation(new WatcherOperationSource(Client), _watcherClientDiagnostics, Pipeline, _watcherRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The action to start monitoring all targets configured for a database watcher. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/start + /// + /// + /// Operation Id + /// Watchers_Start + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _watcherClientDiagnostics.CreateScope("WatcherResource.Start"); + scope.Start(); + try + { + var response = await _watcherRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseWatcherArmOperation(_watcherClientDiagnostics, Pipeline, _watcherRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The action to start monitoring all targets configured for a database watcher. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/start + /// + /// + /// Operation Id + /// Watchers_Start + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _watcherClientDiagnostics.CreateScope("WatcherResource.Start"); + scope.Start(); + try + { + var response = _watcherRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new DatabaseWatcherArmOperation(_watcherClientDiagnostics, Pipeline, _watcherRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The action to stop monitoring all targets configured for a database watcher. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/stop + /// + /// + /// Operation Id + /// Watchers_Stop + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _watcherClientDiagnostics.CreateScope("WatcherResource.Stop"); + scope.Start(); + try + { + var response = await _watcherRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseWatcherArmOperation(_watcherClientDiagnostics, Pipeline, _watcherRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The action to stop monitoring all targets configured for a database watcher. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/stop + /// + /// + /// Operation Id + /// Watchers_Stop + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _watcherClientDiagnostics.CreateScope("WatcherResource.Stop"); + scope.Start(); + try + { + var response = _watcherRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new DatabaseWatcherArmOperation(_watcherClientDiagnostics, Pipeline, _watcherRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _watcherClientDiagnostics.CreateScope("WatcherResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _watcherRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new WatcherResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new WatcherPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _watcherClientDiagnostics.CreateScope("WatcherResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _watcherRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new WatcherResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new WatcherPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.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.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _watcherClientDiagnostics.CreateScope("WatcherResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _watcherRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new WatcherResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new WatcherPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.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.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _watcherClientDiagnostics.CreateScope("WatcherResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + 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 = _watcherRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new WatcherResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new WatcherPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _watcherClientDiagnostics.CreateScope("WatcherResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _watcherRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new WatcherResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new WatcherPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName} + /// + /// + /// Operation Id + /// Watcher_Get + /// + /// + /// Default Api Version + /// 2025-01-02 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _watcherClientDiagnostics.CreateScope("WatcherResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _watcherRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new WatcherResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new WatcherPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Properties/AssemblyInfo.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..700c78e5dd7e --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.DatabaseWatcher.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("DatabaseWatcher")] diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Azure.ResourceManager.DatabaseWatcher.Tests.csproj b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Azure.ResourceManager.DatabaseWatcher.Tests.csproj new file mode 100644 index 000000000000..4107c22780fe --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/Azure.ResourceManager.DatabaseWatcher.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/DatabaseWatcherManagementTestBase.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/DatabaseWatcherManagementTestBase.cs new file mode 100644 index 000000000000..752ee1ad5c2e --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/DatabaseWatcherManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.DatabaseWatcher.Tests +{ + public class DatabaseWatcherManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected DatabaseWatcherManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected DatabaseWatcherManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + 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/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/DatabaseWatcherManagementTestEnvironment.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/DatabaseWatcherManagementTestEnvironment.cs new file mode 100644 index 000000000000..8c72583b0fea --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tests/DatabaseWatcherManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.DatabaseWatcher.Tests +{ + public class DatabaseWatcherManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tsp-location.yaml b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tsp-location.yaml new file mode 100644 index 000000000000..41d964825cba --- /dev/null +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/databasewatcher/DatabaseWatcher.Management +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/databasewatcher/ci.mgmt.yml b/sdk/databasewatcher/ci.mgmt.yml new file mode 100644 index 000000000000..939cabda31dd --- /dev/null +++ b/sdk/databasewatcher/ci.mgmt.yml @@ -0,0 +1,26 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/databasewatcher /ci.mgmt.yml + - sdk/databasewatcher /Azure.ResourceManager.DatabaseWatcher / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: databasewatcher + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.DatabaseWatcher + safeName: AzureResourceManagerDatabaseWatcher diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/Configuration.json b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/Configuration.json new file mode 100644 index 000000000000..9f6a21c28492 --- /dev/null +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/Configuration.json @@ -0,0 +1,12 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.DeviceRegistry", + "library-name": "Azure.ResourceManager.DeviceRegistry", + "flavor": "azure", + "use-model-reader-writer": true, + "shared-source-folders": [ + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared", + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "azure-arm": true +} diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tsp-location.yaml b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tsp-location.yaml index d39a7fa40086..2ed32af43a94 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tsp-location.yaml +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tsp-location.yaml @@ -1,3 +1,4 @@ -directory: specification\deviceregistry\DeviceRegistry.Management -commit: df7c9b730f08e00dbe543b57235b36666563ff7d +directory: specification/deviceregistry/DeviceRegistry.Management +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tspCodeModel.json b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tspCodeModel.json new file mode 100644 index 000000000000..375ae471a993 --- /dev/null +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/tspCodeModel.json @@ -0,0 +1,24645 @@ +{ + "$id": "1", + "Name": "Microsoft.DeviceRegistry", + "ApiVersions": [ + "2024-11-01" + ], + "Enums": [ + { + "$id": "2", + "kind": "enum", + "name": "DeviceRegistryProvisioningState", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.ProvisioningState", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + }, + { + "$id": "10", + "kind": "enumvalue", + "name": "Accepted", + "value": "Accepted", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Resource has been accepted by the server.", + "decorators": [] + }, + { + "$id": "12", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Resource is deleting.", + "decorators": [] + } + ], + "namespace": "Microsoft.DeviceRegistry", + "doc": "The provisioning status of the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "14", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "16", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "22", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "24", + "kind": "enum", + "name": "AuthenticationMethod", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AuthenticationMethod", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "26", + "kind": "enumvalue", + "name": "Anonymous", + "value": "Anonymous", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "The user authentication method is anonymous.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "Certificate", + "value": "Certificate", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "The user authentication method is an x509 certificate.", + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "UsernamePassword", + "value": "UsernamePassword", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "The user authentication method is a username and password.", + "decorators": [] + } + ], + "namespace": "Microsoft.DeviceRegistry", + "doc": "The method to authenticate the user of the client at the server.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "32", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "34", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "40", + "kind": "enum", + "name": "DeviceRegistryTopicRetainType", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.TopicRetainType", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "42", + "kind": "enumvalue", + "name": "Keep", + "value": "Keep", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Retain the messages.", + "decorators": [] + }, + { + "$id": "44", + "kind": "enumvalue", + "name": "Never", + "value": "Never", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Never retain messages.", + "decorators": [] + } + ], + "namespace": "Microsoft.DeviceRegistry", + "doc": "Topic retain types.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "46", + "kind": "enum", + "name": "DataPointObservabilityMode", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.DataPointObservabilityMode", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "48", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "46" + }, + "doc": "No mapping to OpenTelemetry.", + "decorators": [] + }, + { + "$id": "50", + "kind": "enumvalue", + "name": "Counter", + "value": "Counter", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "46" + }, + "doc": "Map as counter to OpenTelemetry.", + "decorators": [] + }, + { + "$id": "52", + "kind": "enumvalue", + "name": "Gauge", + "value": "Gauge", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "46" + }, + "doc": "Map as gauge to OpenTelemetry.", + "decorators": [] + }, + { + "$id": "54", + "kind": "enumvalue", + "name": "Histogram", + "value": "Histogram", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "46" + }, + "doc": "Map as histogram to OpenTelemetry.", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "Log", + "value": "Log", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "46" + }, + "doc": "Map as log to OpenTelemetry.", + "decorators": [] + } + ], + "namespace": "Microsoft.DeviceRegistry", + "doc": "Defines the data point observability mode.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "58", + "kind": "enum", + "name": "EventObservabilityMode", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.EventObservabilityMode", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "60", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "No mapping to OpenTelemetry.", + "decorators": [] + }, + { + "$id": "62", + "kind": "enumvalue", + "name": "Log", + "value": "Log", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "Map as log to OpenTelemetry.", + "decorators": [] + } + ], + "namespace": "Microsoft.DeviceRegistry", + "doc": "Defines the event observability mode.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "64", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "66", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "68", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "70", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "Indicates the operation is initiated by a user or system.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "72", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "74", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "72" + }, + "doc": "Actions are for internal-only APIs.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "76", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Versions", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "78", + "kind": "enumvalue", + "name": "v2024_11_01", + "value": "2024-11-01", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "76" + }, + "doc": "Microsoft.DeviceRegistry Resource Provider management API version 2024-11-01.", + "decorators": [] + } + ], + "namespace": "Microsoft.DeviceRegistry", + "doc": "Microsoft.DeviceRegistry Resource Provider supported API versions.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "Models": [ + { + "$id": "80", + "kind": "model", + "name": "DeviceRegistryBillingContainer", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainer", + "usage": "Output,Json", + "doc": "billingContainer Model as Azure resource whose sole purpose is to keep track of billables resources under a subscription.", + "decorators": [], + "baseModel": { + "$id": "81", + "kind": "model", + "name": "ProxyResource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ProxyResource", + "usage": "Output,Json", + "doc": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "decorators": [], + "baseModel": { + "$id": "82", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "83", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "type": { + "$id": "84", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", + "serializationOptions": { + "$id": "86", + "json": { + "$id": "87", + "name": "id" + } + } + }, + { + "$id": "88", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name", + "serializationOptions": { + "$id": "90", + "json": { + "$id": "91", + "name": "name" + } + } + }, + { + "$id": "92", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "93", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "94", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type", + "serializationOptions": { + "$id": "95", + "json": { + "$id": "96", + "name": "type" + } + } + }, + { + "$id": "97", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "98", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "99", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "100", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy", + "serializationOptions": { + "$id": "101", + "json": { + "$id": "102", + "name": "createdBy" + } + } + }, + { + "$id": "103", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "104", + "json": { + "$id": "105", + "name": "createdByType" + } + } + }, + { + "$id": "106", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "107", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt", + "serializationOptions": { + "$id": "109", + "json": { + "$id": "110", + "name": "createdAt" + } + } + }, + { + "$id": "111", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy", + "serializationOptions": { + "$id": "113", + "json": { + "$id": "114", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "115", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "116", + "json": { + "$id": "117", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "118", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "119", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "120", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt", + "serializationOptions": { + "$id": "121", + "json": { + "$id": "122", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "123", + "json": { + "$id": "124", + "name": "systemData" + } + } + } + ] + }, + "properties": [] + }, + "properties": [ + { + "$id": "125", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "126", + "kind": "model", + "name": "BillingContainerProperties", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainerProperties", + "usage": "Output,Json", + "doc": "Defines the billingContainer properties.", + "decorators": [], + "properties": [ + { + "$id": "127", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning state of the resource.", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainerProperties.provisioningState", + "serializationOptions": { + "$id": "128", + "json": { + "$id": "129", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainer.properties", + "serializationOptions": { + "$id": "130", + "json": { + "$id": "131", + "name": "properties" + } + } + }, + { + "$id": "132", + "kind": "property", + "name": "etag", + "serializedName": "etag", + "doc": "Resource ETag", + "type": { + "$id": "133", + "kind": "string", + "name": "eTag", + "crossLanguageDefinitionId": "Azure.Core.eTag", + "baseType": { + "$id": "134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainer.etag", + "serializationOptions": { + "$id": "135", + "json": { + "$id": "136", + "name": "etag" + } + } + } + ] + }, + { + "$ref": "126" + }, + { + "$ref": "81" + }, + { + "$ref": "82" + }, + { + "$ref": "98" + }, + { + "$id": "137", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Error,Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "138", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "139", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "140", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", + "serializationOptions": { + "$id": "142", + "json": { + "$id": "143", + "name": "code" + } + } + }, + { + "$id": "144", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", + "serializationOptions": { + "$id": "146", + "json": { + "$id": "147", + "name": "message" + } + } + }, + { + "$id": "148", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", + "serializationOptions": { + "$id": "150", + "json": { + "$id": "151", + "name": "target" + } + } + }, + { + "$id": "152", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "153", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "139" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "154", + "json": { + "$id": "155", + "name": "details" + } + } + }, + { + "$id": "156", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "157", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "158", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "159", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "160", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", + "serializationOptions": { + "$id": "161", + "json": { + "$id": "162", + "name": "type" + } + } + }, + { + "$id": "163", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "164", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Json,Exception,LroPolling", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", + "serializationOptions": { + "$id": "165", + "json": { + "$id": "166", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "167", + "json": { + "$id": "168", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "169", + "json": { + "$id": "170", + "name": "error" + } + } + } + ] + }, + { + "$ref": "139" + }, + { + "$ref": "158" + }, + { + "$ref": "164" + }, + { + "$id": "171", + "kind": "model", + "name": "BillingContainerListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a BillingContainer list operation.", + "decorators": [], + "properties": [ + { + "$id": "172", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The BillingContainer items on this page", + "type": { + "$id": "173", + "kind": "array", + "name": "ArrayBillingContainer", + "valueType": { + "$ref": "80" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "174", + "json": { + "$id": "175", + "name": "value" + } + } + }, + { + "$id": "176", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "177", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "178", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "179", + "json": { + "$id": "180", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "181", + "kind": "model", + "name": "DeviceRegistryAssetEndpointProfile", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfile", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Asset Endpoint Profile definition.", + "decorators": [], + "baseModel": { + "$id": "182", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$ref": "82" + }, + "properties": [ + { + "$id": "183", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "184", + "kind": "dict", + "keyType": { + "$id": "185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags", + "serializationOptions": { + "$id": "187", + "json": { + "$id": "188", + "name": "tags" + } + } + }, + { + "$id": "189", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location", + "serializationOptions": { + "$id": "191", + "json": { + "$id": "192", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "193", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "194", + "kind": "model", + "name": "DeviceRegistryAssetEndpointProfileProperties", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the Asset Endpoint Profile properties.", + "decorators": [], + "properties": [ + { + "$id": "195", + "kind": "property", + "name": "uuid", + "serializedName": "uuid", + "doc": "Globally unique, immutable, non-reusable id.", + "type": { + "$id": "196", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.uuid", + "serializationOptions": { + "$id": "197", + "json": { + "$id": "198", + "name": "uuid" + } + } + }, + { + "$id": "199", + "kind": "property", + "name": "targetAddress", + "serializedName": "targetAddress", + "doc": "The local valid URI specifying the network address/DNS name of a southbound device. The scheme part of the targetAddress URI specifies the type of the device. The additionalConfiguration field holds further connector type specific configuration.", + "type": { + "$id": "200", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.targetAddress", + "serializationOptions": { + "$id": "201", + "json": { + "$id": "202", + "name": "targetAddress" + } + } + }, + { + "$id": "203", + "kind": "property", + "name": "endpointProfileType", + "serializedName": "endpointProfileType", + "doc": "Defines the configuration for the connector type that is being used with the endpoint profile.", + "type": { + "$id": "204", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.endpointProfileType", + "serializationOptions": { + "$id": "205", + "json": { + "$id": "206", + "name": "endpointProfileType" + } + } + }, + { + "$id": "207", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Defines the client authentication mechanism to the server.", + "type": { + "$id": "208", + "kind": "model", + "name": "DeviceRegistryAuthentication", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Authentication", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Definition of the client authentication mechanism to the server.", + "decorators": [], + "properties": [ + { + "$id": "209", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Defines the method to authenticate the user of the client at the server.", + "type": { + "$ref": "24" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Authentication.method", + "serializationOptions": { + "$id": "210", + "json": { + "$id": "211", + "name": "method" + } + } + }, + { + "$id": "212", + "kind": "property", + "name": "usernamePasswordCredentials", + "serializedName": "usernamePasswordCredentials", + "doc": "Defines the username and password references when UsernamePassword user authentication mode is selected.", + "type": { + "$id": "213", + "kind": "model", + "name": "DeviceRegistryUsernamePasswordCredentials", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.UsernamePasswordCredentials", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The credentials for authentication mode UsernamePassword.", + "decorators": [], + "properties": [ + { + "$id": "214", + "kind": "property", + "name": "usernameSecretName", + "serializedName": "usernameSecretName", + "doc": "The name of the secret containing the username.", + "type": { + "$id": "215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.UsernamePasswordCredentials.usernameSecretName", + "serializationOptions": { + "$id": "216", + "json": { + "$id": "217", + "name": "usernameSecretName" + } + } + }, + { + "$id": "218", + "kind": "property", + "name": "passwordSecretName", + "serializedName": "passwordSecretName", + "doc": "The name of the secret containing the password.", + "type": { + "$id": "219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.UsernamePasswordCredentials.passwordSecretName", + "serializationOptions": { + "$id": "220", + "json": { + "$id": "221", + "name": "passwordSecretName" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Authentication.usernamePasswordCredentials", + "serializationOptions": { + "$id": "222", + "json": { + "$id": "223", + "name": "usernamePasswordCredentials" + } + } + }, + { + "$id": "224", + "kind": "property", + "name": "x509Credentials", + "serializedName": "x509Credentials", + "doc": "Defines the certificate reference when Certificate user authentication mode is selected.", + "type": { + "$id": "225", + "kind": "model", + "name": "DeviceRegistryX509Credentials", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.X509Credentials", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The x509 certificate for authentication mode Certificate.", + "decorators": [], + "properties": [ + { + "$id": "226", + "kind": "property", + "name": "certificateSecretName", + "serializedName": "certificateSecretName", + "doc": "The name of the secret containing the certificate and private key (e.g. stored as .der/.pem or .der/.pfx).", + "type": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.X509Credentials.certificateSecretName", + "serializationOptions": { + "$id": "228", + "json": { + "$id": "229", + "name": "certificateSecretName" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Authentication.x509Credentials", + "serializationOptions": { + "$id": "230", + "json": { + "$id": "231", + "name": "x509Credentials" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.authentication", + "serializationOptions": { + "$id": "232", + "json": { + "$id": "233", + "name": "authentication" + } + } + }, + { + "$id": "234", + "kind": "property", + "name": "additionalConfiguration", + "serializedName": "additionalConfiguration", + "doc": "Stringified JSON that contains connectivity type specific further configuration (e.g. OPC UA, Modbus, ONVIF).", + "type": { + "$id": "235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.additionalConfiguration", + "serializationOptions": { + "$id": "236", + "json": { + "$id": "237", + "name": "additionalConfiguration" + } + } + }, + { + "$id": "238", + "kind": "property", + "name": "discoveredAssetEndpointProfileRef", + "serializedName": "discoveredAssetEndpointProfileRef", + "doc": "Reference to a discovered asset endpoint profile. Populated only if the asset endpoint profile has been created from discovery flow. Discovered asset endpoint profile name must be provided.", + "type": { + "$id": "239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.discoveredAssetEndpointProfileRef", + "serializationOptions": { + "$id": "240", + "json": { + "$id": "241", + "name": "discoveredAssetEndpointProfileRef" + } + } + }, + { + "$id": "242", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Read only object to reflect changes that have occurred on the Edge. Similar to Kubernetes status property for custom resources.", + "type": { + "$id": "243", + "kind": "model", + "name": "AssetEndpointProfileStatus", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileStatus", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the asset endpoint profile status properties.", + "decorators": [], + "properties": [ + { + "$id": "244", + "kind": "property", + "name": "errors", + "serializedName": "errors", + "doc": "Array object to transfer and persist errors that originate from the Edge.", + "type": { + "$id": "245", + "kind": "array", + "name": "ArrayAssetEndpointProfileStatusError", + "valueType": { + "$id": "246", + "kind": "model", + "name": "AssetEndpointProfileStatusError", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileStatusError", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the asset endpoint profile status error properties.", + "decorators": [], + "properties": [ + { + "$id": "247", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "Error code for classification of errors (ex: 400, 404, 500, etc.).", + "type": { + "$id": "248", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileStatusError.code", + "serializationOptions": { + "$id": "249", + "json": { + "$id": "250", + "name": "code" + } + } + }, + { + "$id": "251", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "Human readable helpful error message to provide additional context for error (ex: “targetAddress 'foo' is not a valid url”).", + "type": { + "$id": "252", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileStatusError.message", + "serializationOptions": { + "$id": "253", + "json": { + "$id": "254", + "name": "message" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileStatus.errors", + "serializationOptions": { + "$id": "255", + "json": { + "$id": "256", + "name": "errors" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.status", + "serializationOptions": { + "$id": "257", + "json": { + "$id": "258", + "name": "status" + } + } + }, + { + "$id": "259", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning state of the resource.", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfileProperties.provisioningState", + "serializationOptions": { + "$id": "260", + "json": { + "$id": "261", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfile.properties", + "serializationOptions": { + "$id": "262", + "json": { + "$id": "263", + "name": "properties" + } + } + }, + { + "$id": "264", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "The extended location.", + "type": { + "$id": "265", + "kind": "model", + "name": "DeviceRegistryExtendedLocation", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.ExtendedLocation", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The extended location.", + "decorators": [], + "properties": [ + { + "$id": "266", + "kind": "property", + "name": "ExtendedLocationType", + "serializedName": "type", + "doc": "The extended location type.", + "type": { + "$id": "267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.ExtendedLocation.type", + "serializationOptions": { + "$id": "268", + "json": { + "$id": "269", + "name": "type" + } + } + }, + { + "$id": "270", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The extended location name.", + "type": { + "$id": "271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.ExtendedLocation.name", + "serializationOptions": { + "$id": "272", + "json": { + "$id": "273", + "name": "name" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfile.extendedLocation", + "serializationOptions": { + "$id": "274", + "json": { + "$id": "275", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "194" + }, + { + "$ref": "208" + }, + { + "$ref": "213" + }, + { + "$ref": "225" + }, + { + "$ref": "243" + }, + { + "$ref": "246" + }, + { + "$ref": "265" + }, + { + "$ref": "182" + }, + { + "$id": "276", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "277", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "32" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "278", + "json": { + "$id": "279", + "name": "status" + } + } + }, + { + "$id": "280", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "282", + "json": { + "$id": "283", + "name": "name" + } + } + }, + { + "$id": "284", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "285", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", + "serializationOptions": { + "$id": "287", + "json": { + "$id": "288", + "name": "startTime" + } + } + }, + { + "$id": "289", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "290", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", + "serializationOptions": { + "$id": "292", + "json": { + "$id": "293", + "name": "endTime" + } + } + }, + { + "$id": "294", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "295", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "296", + "json": { + "$id": "297", + "name": "percentComplete" + } + } + }, + { + "$id": "298", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "139" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "299", + "json": { + "$id": "300", + "name": "error" + } + } + } + ] + }, + { + "$id": "301", + "kind": "model", + "name": "AssetEndpointProfileUpdate", + "namespace": "Azure.ResourceManager.Foundations", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the AssetEndpointProfile.", + "decorators": [], + "properties": [ + { + "$id": "302", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "303", + "kind": "dict", + "keyType": { + "$id": "304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.tags", + "serializationOptions": { + "$id": "306", + "json": { + "$id": "307", + "name": "tags" + } + } + }, + { + "$id": "308", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "309", + "kind": "model", + "name": "AssetEndpointProfileUpdateProperties", + "namespace": "Azure.ResourceManager.Foundations", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the AssetEndpointProfile.", + "decorators": [], + "properties": [ + { + "$id": "310", + "kind": "property", + "name": "targetAddress", + "serializedName": "targetAddress", + "doc": "The local valid URI specifying the network address/DNS name of a southbound device. The scheme part of the targetAddress URI specifies the type of the device. The additionalConfiguration field holds further connector type specific configuration.", + "type": { + "$id": "311", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.targetAddress", + "serializationOptions": { + "$id": "312", + "json": { + "$id": "313", + "name": "targetAddress" + } + } + }, + { + "$id": "314", + "kind": "property", + "name": "endpointProfileType", + "serializedName": "endpointProfileType", + "doc": "Defines the configuration for the connector type that is being used with the endpoint profile.", + "type": { + "$id": "315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.endpointProfileType", + "serializationOptions": { + "$id": "316", + "json": { + "$id": "317", + "name": "endpointProfileType" + } + } + }, + { + "$id": "318", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Defines the client authentication mechanism to the server.", + "type": { + "$ref": "208" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.authentication", + "serializationOptions": { + "$id": "319", + "json": { + "$id": "320", + "name": "authentication" + } + } + }, + { + "$id": "321", + "kind": "property", + "name": "additionalConfiguration", + "serializedName": "additionalConfiguration", + "doc": "Stringified JSON that contains connectivity type specific further configuration (e.g. OPC UA, Modbus, ONVIF).", + "type": { + "$id": "322", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.additionalConfiguration", + "serializationOptions": { + "$id": "323", + "json": { + "$id": "324", + "name": "additionalConfiguration" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "325", + "json": { + "$id": "326", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "309" + }, + { + "$id": "327", + "kind": "model", + "name": "AssetEndpointProfileListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a AssetEndpointProfile list operation.", + "decorators": [], + "properties": [ + { + "$id": "328", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The AssetEndpointProfile items on this page", + "type": { + "$id": "329", + "kind": "array", + "name": "ArrayAssetEndpointProfile", + "valueType": { + "$ref": "181" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "330", + "json": { + "$id": "331", + "name": "value" + } + } + }, + { + "$id": "332", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "333", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "334", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "335", + "json": { + "$id": "336", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "337", + "kind": "model", + "name": "DeviceRegistryAsset", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Asset", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Asset definition.", + "decorators": [], + "baseModel": { + "$ref": "182" + }, + "properties": [ + { + "$id": "338", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "339", + "kind": "model", + "name": "AssetProperties", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the asset properties.", + "decorators": [], + "properties": [ + { + "$id": "340", + "kind": "property", + "name": "uuid", + "serializedName": "uuid", + "doc": "Globally unique, immutable, non-reusable id.", + "type": { + "$id": "341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.uuid", + "serializationOptions": { + "$id": "342", + "json": { + "$id": "343", + "name": "uuid" + } + } + }, + { + "$id": "344", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enabled", + "doc": "Enabled/Disabled status of the asset.", + "type": { + "$id": "345", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.enabled", + "serializationOptions": { + "$id": "346", + "json": { + "$id": "347", + "name": "enabled" + } + } + }, + { + "$id": "348", + "kind": "property", + "name": "externalAssetId", + "serializedName": "externalAssetId", + "doc": "Asset id provided by the customer.", + "type": { + "$id": "349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.externalAssetId", + "serializationOptions": { + "$id": "350", + "json": { + "$id": "351", + "name": "externalAssetId" + } + } + }, + { + "$id": "352", + "kind": "property", + "name": "displayName", + "serializedName": "displayName", + "doc": "Human-readable display name.", + "type": { + "$id": "353", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.displayName", + "serializationOptions": { + "$id": "354", + "json": { + "$id": "355", + "name": "displayName" + } + } + }, + { + "$id": "356", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Human-readable description of the asset.", + "type": { + "$id": "357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.description", + "serializationOptions": { + "$id": "358", + "json": { + "$id": "359", + "name": "description" + } + } + }, + { + "$id": "360", + "kind": "property", + "name": "assetEndpointProfileRef", + "serializedName": "assetEndpointProfileRef", + "doc": "A reference to the asset endpoint profile (connection information) used by brokers to connect to an endpoint that provides data points for this asset. Must provide asset endpoint profile name.", + "type": { + "$id": "361", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.assetEndpointProfileRef", + "serializationOptions": { + "$id": "362", + "json": { + "$id": "363", + "name": "assetEndpointProfileRef" + } + } + }, + { + "$id": "364", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "An integer that is incremented each time the resource is modified.", + "type": { + "$id": "365", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.version", + "serializationOptions": { + "$id": "366", + "json": { + "$id": "367", + "name": "version" + } + } + }, + { + "$id": "368", + "kind": "property", + "name": "manufacturer", + "serializedName": "manufacturer", + "doc": "Asset manufacturer name.", + "type": { + "$id": "369", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.manufacturer", + "serializationOptions": { + "$id": "370", + "json": { + "$id": "371", + "name": "manufacturer" + } + } + }, + { + "$id": "372", + "kind": "property", + "name": "manufacturerUri", + "serializedName": "manufacturerUri", + "doc": "Asset manufacturer URI.", + "type": { + "$id": "373", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.manufacturerUri", + "serializationOptions": { + "$id": "374", + "json": { + "$id": "375", + "name": "manufacturerUri" + } + } + }, + { + "$id": "376", + "kind": "property", + "name": "model", + "serializedName": "model", + "doc": "Asset model name.", + "type": { + "$id": "377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.model", + "serializationOptions": { + "$id": "378", + "json": { + "$id": "379", + "name": "model" + } + } + }, + { + "$id": "380", + "kind": "property", + "name": "productCode", + "serializedName": "productCode", + "doc": "Asset product code.", + "type": { + "$id": "381", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.productCode", + "serializationOptions": { + "$id": "382", + "json": { + "$id": "383", + "name": "productCode" + } + } + }, + { + "$id": "384", + "kind": "property", + "name": "hardwareRevision", + "serializedName": "hardwareRevision", + "doc": "Revision number of the hardware.", + "type": { + "$id": "385", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.hardwareRevision", + "serializationOptions": { + "$id": "386", + "json": { + "$id": "387", + "name": "hardwareRevision" + } + } + }, + { + "$id": "388", + "kind": "property", + "name": "softwareRevision", + "serializedName": "softwareRevision", + "doc": "Revision number of the software.", + "type": { + "$id": "389", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.softwareRevision", + "serializationOptions": { + "$id": "390", + "json": { + "$id": "391", + "name": "softwareRevision" + } + } + }, + { + "$id": "392", + "kind": "property", + "name": "documentationUri", + "serializedName": "documentationUri", + "doc": "Reference to the documentation.", + "type": { + "$id": "393", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.documentationUri", + "serializationOptions": { + "$id": "394", + "json": { + "$id": "395", + "name": "documentationUri" + } + } + }, + { + "$id": "396", + "kind": "property", + "name": "serialNumber", + "serializedName": "serialNumber", + "doc": "Asset serial number.", + "type": { + "$id": "397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.serialNumber", + "serializationOptions": { + "$id": "398", + "json": { + "$id": "399", + "name": "serialNumber" + } + } + }, + { + "$id": "400", + "kind": "property", + "name": "attributes", + "serializedName": "attributes", + "doc": "A set of key-value pairs that contain custom attributes set by the customer.", + "type": { + "$id": "401", + "kind": "dict", + "keyType": { + "$id": "402", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "403", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.attributes", + "serializationOptions": { + "$id": "404", + "json": { + "$id": "405", + "name": "attributes" + } + } + }, + { + "$id": "406", + "kind": "property", + "name": "discoveredAssetRefs", + "serializedName": "discoveredAssetRefs", + "doc": "Reference to a list of discovered assets. Populated only if the asset has been created from discovery flow. Discovered asset names must be provided.", + "type": { + "$id": "407", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "408", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.discoveredAssetRefs", + "serializationOptions": { + "$id": "409", + "json": { + "$id": "410", + "name": "discoveredAssetRefs" + } + } + }, + { + "$id": "411", + "kind": "property", + "name": "defaultDatasetsConfiguration", + "serializedName": "defaultDatasetsConfiguration", + "doc": "Stringified JSON that contains connector-specific default configuration for all datasets. Each dataset can have its own configuration that overrides the default settings here.", + "type": { + "$id": "412", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.defaultDatasetsConfiguration", + "serializationOptions": { + "$id": "413", + "json": { + "$id": "414", + "name": "defaultDatasetsConfiguration" + } + } + }, + { + "$id": "415", + "kind": "property", + "name": "defaultEventsConfiguration", + "serializedName": "defaultEventsConfiguration", + "doc": "Stringified JSON that contains connector-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here.", + "type": { + "$id": "416", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.defaultEventsConfiguration", + "serializationOptions": { + "$id": "417", + "json": { + "$id": "418", + "name": "defaultEventsConfiguration" + } + } + }, + { + "$id": "419", + "kind": "property", + "name": "defaultTopic", + "serializedName": "defaultTopic", + "doc": "Object that describes the default topic information for the asset.", + "type": { + "$id": "420", + "kind": "model", + "name": "DeviceRegistryTopic", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Topic", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Object that describes the topic information.", + "decorators": [], + "properties": [ + { + "$id": "421", + "kind": "property", + "name": "path", + "serializedName": "path", + "doc": "The topic path for messages published to an MQTT broker.", + "type": { + "$id": "422", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Topic.path", + "serializationOptions": { + "$id": "423", + "json": { + "$id": "424", + "name": "path" + } + } + }, + { + "$id": "425", + "kind": "property", + "name": "retain", + "serializedName": "retain", + "doc": "When set to 'Keep', messages published to an MQTT broker will have the retain flag set. Default: 'Never'.", + "type": { + "$ref": "40" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Topic.retain", + "serializationOptions": { + "$id": "426", + "json": { + "$id": "427", + "name": "retain" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.defaultTopic", + "serializationOptions": { + "$id": "428", + "json": { + "$id": "429", + "name": "defaultTopic" + } + } + }, + { + "$id": "430", + "kind": "property", + "name": "datasets", + "serializedName": "datasets", + "doc": "Array of datasets that are part of the asset. Each dataset describes the data points that make up the set.", + "type": { + "$id": "431", + "kind": "array", + "name": "ArrayDataset", + "valueType": { + "$id": "432", + "kind": "model", + "name": "DeviceRegistryDataset", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Dataset", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the dataset properties.", + "decorators": [], + "properties": [ + { + "$id": "433", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the dataset.", + "type": { + "$id": "434", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Dataset.name", + "serializationOptions": { + "$id": "435", + "json": { + "$id": "436", + "name": "name" + } + } + }, + { + "$id": "437", + "kind": "property", + "name": "datasetConfiguration", + "serializedName": "datasetConfiguration", + "doc": "Stringified JSON that contains connector-specific JSON string that describes configuration for the specific dataset.", + "type": { + "$id": "438", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Dataset.datasetConfiguration", + "serializationOptions": { + "$id": "439", + "json": { + "$id": "440", + "name": "datasetConfiguration" + } + } + }, + { + "$id": "441", + "kind": "property", + "name": "topic", + "serializedName": "topic", + "doc": "Object that describes the topic information for the specific dataset.", + "type": { + "$ref": "420" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Dataset.topic", + "serializationOptions": { + "$id": "442", + "json": { + "$id": "443", + "name": "topic" + } + } + }, + { + "$id": "444", + "kind": "property", + "name": "dataPoints", + "serializedName": "dataPoints", + "doc": "Array of data points that are part of the dataset. Each data point can have per-data point configuration.", + "type": { + "$id": "445", + "kind": "array", + "name": "ArrayDataPoint", + "valueType": { + "$id": "446", + "kind": "model", + "name": "DeviceRegistryDataPoint", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.DataPoint", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the data point properties.", + "decorators": [], + "baseModel": { + "$id": "447", + "kind": "model", + "name": "DeviceRegistryDataPointBase", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.DataPointBase", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the data point properties.", + "decorators": [], + "properties": [ + { + "$id": "448", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the data point.", + "type": { + "$id": "449", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.DataPointBase.name", + "serializationOptions": { + "$id": "450", + "json": { + "$id": "451", + "name": "name" + } + } + }, + { + "$id": "452", + "kind": "property", + "name": "dataSource", + "serializedName": "dataSource", + "doc": "The address of the source of the data in the asset (e.g. URL) so that a client can access the data source on the asset.", + "type": { + "$id": "453", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.DataPointBase.dataSource", + "serializationOptions": { + "$id": "454", + "json": { + "$id": "455", + "name": "dataSource" + } + } + }, + { + "$id": "456", + "kind": "property", + "name": "dataPointConfiguration", + "serializedName": "dataPointConfiguration", + "doc": "Stringified JSON that contains connector-specific configuration for the data point. For OPC UA, this could include configuration like, publishingInterval, samplingInterval, and queueSize.", + "type": { + "$id": "457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.DataPointBase.dataPointConfiguration", + "serializationOptions": { + "$id": "458", + "json": { + "$id": "459", + "name": "dataPointConfiguration" + } + } + } + ] + }, + "properties": [ + { + "$id": "460", + "kind": "property", + "name": "observabilityMode", + "serializedName": "observabilityMode", + "doc": "An indication of how the data point should be mapped to OpenTelemetry.", + "type": { + "$ref": "46" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.DataPoint.observabilityMode", + "serializationOptions": { + "$id": "461", + "json": { + "$id": "462", + "name": "observabilityMode" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Dataset.dataPoints", + "serializationOptions": { + "$id": "463", + "json": { + "$id": "464", + "name": "dataPoints" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.datasets", + "serializationOptions": { + "$id": "465", + "json": { + "$id": "466", + "name": "datasets" + } + } + }, + { + "$id": "467", + "kind": "property", + "name": "events", + "serializedName": "events", + "doc": "Array of events that are part of the asset. Each event can have per-event configuration.", + "type": { + "$id": "468", + "kind": "array", + "name": "ArrayEvent", + "valueType": { + "$id": "469", + "kind": "model", + "name": "DeviceRegistryEvent", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Event", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the event properties.", + "decorators": [], + "baseModel": { + "$id": "470", + "kind": "model", + "name": "DeviceRegistryEventBase", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.EventBase", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the event properties.", + "decorators": [], + "properties": [ + { + "$id": "471", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the event.", + "type": { + "$id": "472", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.EventBase.name", + "serializationOptions": { + "$id": "473", + "json": { + "$id": "474", + "name": "name" + } + } + }, + { + "$id": "475", + "kind": "property", + "name": "eventNotifier", + "serializedName": "eventNotifier", + "doc": "The address of the notifier of the event in the asset (e.g. URL) so that a client can access the event on the asset.", + "type": { + "$id": "476", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.EventBase.eventNotifier", + "serializationOptions": { + "$id": "477", + "json": { + "$id": "478", + "name": "eventNotifier" + } + } + }, + { + "$id": "479", + "kind": "property", + "name": "eventConfiguration", + "serializedName": "eventConfiguration", + "doc": "Stringified JSON that contains connector-specific configuration for the event. For OPC UA, this could include configuration like, publishingInterval, samplingInterval, and queueSize.", + "type": { + "$id": "480", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.EventBase.eventConfiguration", + "serializationOptions": { + "$id": "481", + "json": { + "$id": "482", + "name": "eventConfiguration" + } + } + }, + { + "$id": "483", + "kind": "property", + "name": "topic", + "serializedName": "topic", + "doc": "Object that describes the topic information for the specific event.", + "type": { + "$ref": "420" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.EventBase.topic", + "serializationOptions": { + "$id": "484", + "json": { + "$id": "485", + "name": "topic" + } + } + } + ] + }, + "properties": [ + { + "$id": "486", + "kind": "property", + "name": "observabilityMode", + "serializedName": "observabilityMode", + "doc": "An indication of how the event should be mapped to OpenTelemetry.", + "type": { + "$ref": "58" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Event.observabilityMode", + "serializationOptions": { + "$id": "487", + "json": { + "$id": "488", + "name": "observabilityMode" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.events", + "serializationOptions": { + "$id": "489", + "json": { + "$id": "490", + "name": "events" + } + } + }, + { + "$id": "491", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Read only object to reflect changes that have occurred on the Edge. Similar to Kubernetes status property for custom resources.", + "type": { + "$id": "492", + "kind": "model", + "name": "DeviceRegistryAssetStatus", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatus", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the asset status properties.", + "decorators": [], + "properties": [ + { + "$id": "493", + "kind": "property", + "name": "errors", + "serializedName": "errors", + "doc": "Array object to transfer and persist errors that originate from the Edge.", + "type": { + "$id": "494", + "kind": "array", + "name": "ArrayAssetStatusError", + "valueType": { + "$id": "495", + "kind": "model", + "name": "DeviceRegistryAssetStatusError", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusError", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the asset status error properties.", + "decorators": [], + "properties": [ + { + "$id": "496", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "Error code for classification of errors (ex: 400, 404, 500, etc.).", + "type": { + "$id": "497", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusError.code", + "serializationOptions": { + "$id": "498", + "json": { + "$id": "499", + "name": "code" + } + } + }, + { + "$id": "500", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "Human readable helpful error message to provide additional context for error (ex: “capability Id 'foo' does not exist”).", + "type": { + "$id": "501", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusError.message", + "serializationOptions": { + "$id": "502", + "json": { + "$id": "503", + "name": "message" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatus.errors", + "serializationOptions": { + "$id": "504", + "json": { + "$id": "505", + "name": "errors" + } + } + }, + { + "$id": "506", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "A read only incremental counter indicating the number of times the configuration has been modified from the perspective of the current actual (Edge) state of the Asset. Edge would be the only writer of this value and would sync back up to the cloud. In steady state, this should equal version.", + "type": { + "$id": "507", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatus.version", + "serializationOptions": { + "$id": "508", + "json": { + "$id": "509", + "name": "version" + } + } + }, + { + "$id": "510", + "kind": "property", + "name": "datasets", + "serializedName": "datasets", + "doc": "Array of dataset statuses that describe the status of each dataset.", + "type": { + "$id": "511", + "kind": "array", + "name": "ArrayAssetStatusDataset", + "valueType": { + "$id": "512", + "kind": "model", + "name": "DeviceRegistryAssetStatusDataset", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusDataset", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the asset status dataset properties.", + "decorators": [], + "properties": [ + { + "$id": "513", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the dataset. Must be unique within the status.datasets array. This name is used to correlate between the spec and status dataset information.", + "type": { + "$id": "514", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusDataset.name", + "serializationOptions": { + "$id": "515", + "json": { + "$id": "516", + "name": "name" + } + } + }, + { + "$id": "517", + "kind": "property", + "name": "messageSchemaReference", + "serializedName": "messageSchemaReference", + "doc": "The message schema reference object.", + "type": { + "$id": "518", + "kind": "model", + "name": "MessageSchemaReference", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.MessageSchemaReference", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the message schema reference properties.", + "decorators": [], + "properties": [ + { + "$id": "519", + "kind": "property", + "name": "schemaRegistryNamespace", + "serializedName": "schemaRegistryNamespace", + "doc": "The message schema registry namespace.", + "type": { + "$id": "520", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.MessageSchemaReference.schemaRegistryNamespace", + "serializationOptions": { + "$id": "521", + "json": { + "$id": "522", + "name": "schemaRegistryNamespace" + } + } + }, + { + "$id": "523", + "kind": "property", + "name": "schemaName", + "serializedName": "schemaName", + "doc": "The message schema name.", + "type": { + "$id": "524", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.MessageSchemaReference.schemaName", + "serializationOptions": { + "$id": "525", + "json": { + "$id": "526", + "name": "schemaName" + } + } + }, + { + "$id": "527", + "kind": "property", + "name": "schemaVersion", + "serializedName": "schemaVersion", + "doc": "The message schema version.", + "type": { + "$id": "528", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.MessageSchemaReference.schemaVersion", + "serializationOptions": { + "$id": "529", + "json": { + "$id": "530", + "name": "schemaVersion" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusDataset.messageSchemaReference", + "serializationOptions": { + "$id": "531", + "json": { + "$id": "532", + "name": "messageSchemaReference" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatus.datasets", + "serializationOptions": { + "$id": "533", + "json": { + "$id": "534", + "name": "datasets" + } + } + }, + { + "$id": "535", + "kind": "property", + "name": "events", + "serializedName": "events", + "doc": "Array of event statuses that describe the status of each event.", + "type": { + "$id": "536", + "kind": "array", + "name": "ArrayAssetStatusEvent", + "valueType": { + "$id": "537", + "kind": "model", + "name": "DeviceRegistryAssetStatusEvent", + "namespace": "Microsoft.DeviceRegistry", + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusEvent", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines the asset status event properties.", + "decorators": [], + "properties": [ + { + "$id": "538", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the event. Must be unique within the status.events array. This name is used to correlate between the spec and status event information.", + "type": { + "$id": "539", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusEvent.name", + "serializationOptions": { + "$id": "540", + "json": { + "$id": "541", + "name": "name" + } + } + }, + { + "$id": "542", + "kind": "property", + "name": "messageSchemaReference", + "serializedName": "messageSchemaReference", + "doc": "The message schema reference object.", + "type": { + "$ref": "518" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatusEvent.messageSchemaReference", + "serializationOptions": { + "$id": "543", + "json": { + "$id": "544", + "name": "messageSchemaReference" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetStatus.events", + "serializationOptions": { + "$id": "545", + "json": { + "$id": "546", + "name": "events" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.status", + "serializationOptions": { + "$id": "547", + "json": { + "$id": "548", + "name": "status" + } + } + }, + { + "$id": "549", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning state of the resource.", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetProperties.provisioningState", + "serializationOptions": { + "$id": "550", + "json": { + "$id": "551", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Asset.properties", + "serializationOptions": { + "$id": "552", + "json": { + "$id": "553", + "name": "properties" + } + } + }, + { + "$id": "554", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "The extended location.", + "type": { + "$ref": "265" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.DeviceRegistry.Asset.extendedLocation", + "serializationOptions": { + "$id": "555", + "json": { + "$id": "556", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "339" + }, + { + "$ref": "420" + }, + { + "$ref": "432" + }, + { + "$ref": "446" + }, + { + "$ref": "447" + }, + { + "$ref": "469" + }, + { + "$ref": "470" + }, + { + "$ref": "492" + }, + { + "$ref": "495" + }, + { + "$ref": "512" + }, + { + "$ref": "518" + }, + { + "$ref": "537" + }, + { + "$id": "557", + "kind": "model", + "name": "AssetUpdate", + "namespace": "Azure.ResourceManager.Foundations", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the Asset.", + "decorators": [], + "properties": [ + { + "$id": "558", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "559", + "kind": "dict", + "keyType": { + "$id": "560", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.tags", + "serializationOptions": { + "$id": "562", + "json": { + "$id": "563", + "name": "tags" + } + } + }, + { + "$id": "564", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "565", + "kind": "model", + "name": "AssetUpdateProperties", + "namespace": "Azure.ResourceManager.Foundations", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the Asset.", + "decorators": [], + "properties": [ + { + "$id": "566", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enabled", + "doc": "Enabled/Disabled status of the asset.", + "type": { + "$id": "567", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.enabled", + "serializationOptions": { + "$id": "568", + "json": { + "$id": "569", + "name": "enabled" + } + } + }, + { + "$id": "570", + "kind": "property", + "name": "displayName", + "serializedName": "displayName", + "doc": "Human-readable display name.", + "type": { + "$id": "571", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.displayName", + "serializationOptions": { + "$id": "572", + "json": { + "$id": "573", + "name": "displayName" + } + } + }, + { + "$id": "574", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Human-readable description of the asset.", + "type": { + "$id": "575", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.description", + "serializationOptions": { + "$id": "576", + "json": { + "$id": "577", + "name": "description" + } + } + }, + { + "$id": "578", + "kind": "property", + "name": "manufacturer", + "serializedName": "manufacturer", + "doc": "Asset manufacturer name.", + "type": { + "$id": "579", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.manufacturer", + "serializationOptions": { + "$id": "580", + "json": { + "$id": "581", + "name": "manufacturer" + } + } + }, + { + "$id": "582", + "kind": "property", + "name": "manufacturerUri", + "serializedName": "manufacturerUri", + "doc": "Asset manufacturer URI.", + "type": { + "$id": "583", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.manufacturerUri", + "serializationOptions": { + "$id": "584", + "json": { + "$id": "585", + "name": "manufacturerUri" + } + } + }, + { + "$id": "586", + "kind": "property", + "name": "model", + "serializedName": "model", + "doc": "Asset model name.", + "type": { + "$id": "587", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.model", + "serializationOptions": { + "$id": "588", + "json": { + "$id": "589", + "name": "model" + } + } + }, + { + "$id": "590", + "kind": "property", + "name": "productCode", + "serializedName": "productCode", + "doc": "Asset product code.", + "type": { + "$id": "591", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.productCode", + "serializationOptions": { + "$id": "592", + "json": { + "$id": "593", + "name": "productCode" + } + } + }, + { + "$id": "594", + "kind": "property", + "name": "hardwareRevision", + "serializedName": "hardwareRevision", + "doc": "Revision number of the hardware.", + "type": { + "$id": "595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.hardwareRevision", + "serializationOptions": { + "$id": "596", + "json": { + "$id": "597", + "name": "hardwareRevision" + } + } + }, + { + "$id": "598", + "kind": "property", + "name": "softwareRevision", + "serializedName": "softwareRevision", + "doc": "Revision number of the software.", + "type": { + "$id": "599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.softwareRevision", + "serializationOptions": { + "$id": "600", + "json": { + "$id": "601", + "name": "softwareRevision" + } + } + }, + { + "$id": "602", + "kind": "property", + "name": "documentationUri", + "serializedName": "documentationUri", + "doc": "Reference to the documentation.", + "type": { + "$id": "603", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.documentationUri", + "serializationOptions": { + "$id": "604", + "json": { + "$id": "605", + "name": "documentationUri" + } + } + }, + { + "$id": "606", + "kind": "property", + "name": "serialNumber", + "serializedName": "serialNumber", + "doc": "Asset serial number.", + "type": { + "$id": "607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.serialNumber", + "serializationOptions": { + "$id": "608", + "json": { + "$id": "609", + "name": "serialNumber" + } + } + }, + { + "$id": "610", + "kind": "property", + "name": "attributes", + "serializedName": "attributes", + "doc": "A set of key-value pairs that contain custom attributes set by the customer.", + "type": { + "$id": "611", + "kind": "dict", + "keyType": { + "$id": "612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "613", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.attributes", + "serializationOptions": { + "$id": "614", + "json": { + "$id": "615", + "name": "attributes" + } + } + }, + { + "$id": "616", + "kind": "property", + "name": "defaultDatasetsConfiguration", + "serializedName": "defaultDatasetsConfiguration", + "doc": "Stringified JSON that contains connector-specific default configuration for all datasets. Each dataset can have its own configuration that overrides the default settings here.", + "type": { + "$id": "617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.defaultDatasetsConfiguration", + "serializationOptions": { + "$id": "618", + "json": { + "$id": "619", + "name": "defaultDatasetsConfiguration" + } + } + }, + { + "$id": "620", + "kind": "property", + "name": "defaultEventsConfiguration", + "serializedName": "defaultEventsConfiguration", + "doc": "Stringified JSON that contains connector-specific default configuration for all events. Each event can have its own configuration that overrides the default settings here.", + "type": { + "$id": "621", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.defaultEventsConfiguration", + "serializationOptions": { + "$id": "622", + "json": { + "$id": "623", + "name": "defaultEventsConfiguration" + } + } + }, + { + "$id": "624", + "kind": "property", + "name": "defaultTopic", + "serializedName": "defaultTopic", + "doc": "Object that describes the default topic information for the asset.", + "type": { + "$ref": "420" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.defaultTopic", + "serializationOptions": { + "$id": "625", + "json": { + "$id": "626", + "name": "defaultTopic" + } + } + }, + { + "$id": "627", + "kind": "property", + "name": "datasets", + "serializedName": "datasets", + "doc": "Array of datasets that are part of the asset. Each dataset describes the data points that make up the set.", + "type": { + "$id": "628", + "kind": "array", + "name": "ArrayDataset", + "valueType": { + "$ref": "432" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.datasets", + "serializationOptions": { + "$id": "629", + "json": { + "$id": "630", + "name": "datasets" + } + } + }, + { + "$id": "631", + "kind": "property", + "name": "events", + "serializedName": "events", + "doc": "Array of events that are part of the asset. Each event can have per-event configuration.", + "type": { + "$id": "632", + "kind": "array", + "name": "ArrayEvent", + "valueType": { + "$ref": "469" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.events", + "serializationOptions": { + "$id": "633", + "json": { + "$id": "634", + "name": "events" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "635", + "json": { + "$id": "636", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "565" + }, + { + "$id": "637", + "kind": "model", + "name": "AssetListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a Asset list operation.", + "decorators": [], + "properties": [ + { + "$id": "638", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Asset items on this page", + "type": { + "$id": "639", + "kind": "array", + "name": "ArrayAsset", + "valueType": { + "$ref": "337" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "640", + "json": { + "$id": "641", + "name": "value" + } + } + }, + { + "$id": "642", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "643", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "644", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "645", + "json": { + "$id": "646", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "647", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult", + "usage": "Output,Json", + "doc": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "decorators": [], + "properties": [ + { + "$id": "648", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "649", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "650", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation", + "usage": "Output,Json", + "doc": "Details of a REST API operation, returned from the Resource Provider Operations API", + "decorators": [], + "properties": [ + { + "$id": "651", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": { + "$id": "652", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name", + "serializationOptions": { + "$id": "653", + "json": { + "$id": "654", + "name": "name" + } + } + }, + { + "$id": "655", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.", + "type": { + "$id": "656", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction", + "serializationOptions": { + "$id": "657", + "json": { + "$id": "658", + "name": "isDataAction" + } + } + }, + { + "$id": "659", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "660", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "661", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": { + "$id": "662", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider", + "serializationOptions": { + "$id": "663", + "json": { + "$id": "664", + "name": "provider" + } + } + }, + { + "$id": "665", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": { + "$id": "666", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource", + "serializationOptions": { + "$id": "667", + "json": { + "$id": "668", + "name": "resource" + } + } + }, + { + "$id": "669", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": { + "$id": "670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation", + "serializationOptions": { + "$id": "671", + "json": { + "$id": "672", + "name": "operation" + } + } + }, + { + "$id": "673", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "674", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description", + "serializationOptions": { + "$id": "675", + "json": { + "$id": "676", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "677", + "json": { + "$id": "678", + "name": "display" + } + } + }, + { + "$id": "679", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": { + "$ref": "64" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin", + "serializationOptions": { + "$id": "680", + "json": { + "$id": "681", + "name": "origin" + } + } + }, + { + "$id": "682", + "kind": "property", + "name": "actionType", + "serializedName": "actionType", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": { + "$ref": "72" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType", + "serializationOptions": { + "$id": "683", + "json": { + "$id": "684", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "685", + "json": { + "$id": "686", + "name": "value" + } + } + }, + { + "$id": "687", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "688", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "689", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.nextLink", + "serializationOptions": { + "$id": "690", + "json": { + "$id": "691", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "650" + }, + { + "$ref": "660" + } + ], + "Clients": [ + { + "$id": "692", + "Name": "DeviceRegistryClient", + "Namespace": "Microsoft.DeviceRegistry", + "Doc": "Microsoft.DeviceRegistry Resource Provider management API.", + "Operations": [], + "Protocol": { + "$id": "693" + }, + "Parameters": [ + { + "$id": "694", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "695", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "696", + "Type": { + "$id": "697", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry" + }, + { + "$id": "698", + "Name": "Operations", + "Namespace": "Microsoft.DeviceRegistry", + "Operations": [ + { + "$id": "699", + "Name": "list", + "ResourceName": "Operations", + "Doc": "List the operations for the provider", + "Accessibility": "public", + "Parameters": [ + { + "$id": "700", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "701", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "702", + "Type": { + "$id": "703", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "704", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "705", + "kind": "constant", + "valueType": { + "$id": "706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "707", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "647" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/providers/Microsoft.DeviceRegistry/operations", + "BufferResponse": true, + "Paging": { + "$id": "708", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "709", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "Decorators": [], + "Examples": [ + { + "$id": "710", + "kind": "http", + "name": "List_Operations", + "description": "List_Operations", + "filePath": "2024-11-01/List_Operations.json", + "parameters": [ + { + "$id": "711", + "parameter": { + "$ref": "700" + }, + "value": { + "$id": "712", + "kind": "string", + "type": { + "$ref": "701" + }, + "value": "2024-11-01" + } + } + ], + "responses": [ + { + "$id": "713", + "response": { + "$ref": "707" + }, + "statusCode": 200, + "bodyValue": { + "$id": "714", + "kind": "model", + "type": { + "$ref": "647" + }, + "value": { + "$id": "715", + "value": { + "$id": "716", + "kind": "array", + "type": { + "$ref": "649" + }, + "value": [ + { + "$id": "717", + "kind": "model", + "type": { + "$ref": "650" + }, + "value": { + "$id": "718", + "name": { + "$id": "719", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "Microsoft.DeviceRegistry/assets/write" + }, + "display": { + "$id": "720", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "721", + "provider": { + "$id": "722", + "kind": "string", + "type": { + "$ref": "662" + }, + "value": "Microsoft Azure Device Registry" + }, + "resource": { + "$id": "723", + "kind": "string", + "type": { + "$ref": "666" + }, + "value": "Asset" + }, + "operation": { + "$id": "724", + "kind": "string", + "type": { + "$ref": "670" + }, + "value": "write" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "725" + }, + "Parent": "DeviceRegistryClient", + "Parameters": [ + { + "$id": "726", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "727", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "728", + "Type": { + "$id": "729", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.Operations" + }, + { + "$id": "730", + "Name": "OperationStatus", + "Namespace": "Microsoft.DeviceRegistry", + "Operations": [], + "Protocol": { + "$id": "731" + }, + "Parent": "DeviceRegistryClient", + "Parameters": [ + { + "$id": "732", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "733", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "734", + "Type": { + "$id": "735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.OperationStatus" + }, + { + "$id": "736", + "Name": "Assets", + "Namespace": "Microsoft.DeviceRegistry", + "Operations": [ + { + "$id": "737", + "Name": "get", + "ResourceName": "Asset", + "Doc": "Get a Asset", + "Accessibility": "public", + "Parameters": [ + { + "$id": "738", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "740", + "Type": { + "$id": "741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "742", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "743", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "744", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "745", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "746", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "747", + "Name": "assetName", + "NameInRequest": "assetName", + "Doc": "Asset name parameter.", + "Type": { + "$id": "748", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "749", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "750", + "kind": "constant", + "valueType": { + "$id": "751", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "752", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "337" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.Assets.get", + "Decorators": [], + "Examples": [ + { + "$id": "753", + "kind": "http", + "name": "Get_Asset", + "description": "Get_Asset", + "filePath": "2024-11-01/Get_Asset.json", + "parameters": [ + { + "$id": "754", + "parameter": { + "$ref": "738" + }, + "value": { + "$id": "755", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "2024-11-01" + } + }, + { + "$id": "756", + "parameter": { + "$ref": "742" + }, + "value": { + "$id": "757", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "758", + "parameter": { + "$ref": "745" + }, + "value": { + "$id": "759", + "kind": "string", + "type": { + "$ref": "746" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "760", + "parameter": { + "$ref": "747" + }, + "value": { + "$id": "761", + "kind": "string", + "type": { + "$ref": "748" + }, + "value": "my-asset" + } + } + ], + "responses": [ + { + "$id": "762", + "response": { + "$ref": "752" + }, + "statusCode": 200, + "bodyValue": { + "$id": "763", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "764", + "id": { + "$id": "765", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "766", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-asset" + }, + "type": { + "$id": "767", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "768", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "769", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "770", + "type": { + "$id": "771", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "772", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "773", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "774", + "site": { + "$id": "775", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "776", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "777", + "createdBy": { + "$id": "778", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "779", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "780", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "781", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "782", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "783", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "784", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "785", + "uuid": { + "$id": "786", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "787", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "788", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "789", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "790", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "791", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "792", + "kind": "number", + "type": { + "$ref": "365" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "793", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "794", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "795", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "796", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "797", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "798", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "799", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "800", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "801", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "802", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "803", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "804", + "path": { + "$id": "805", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "806", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "807", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "808", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "809", + "name": { + "$id": "810", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "811", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "812", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "813", + "path": { + "$id": "814", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "815", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "816", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "817", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "818", + "name": { + "$id": "819", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "820", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "821", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "822", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "823", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "824", + "name": { + "$id": "825", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "826", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "827", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "828", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "829", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "830", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "831", + "name": { + "$id": "832", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "833", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "834", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "835", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "836", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "837", + "path": { + "$id": "838", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "839", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "840", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "841", + "name": { + "$id": "842", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "843", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "844", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "845", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "846", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + }, + { + "$id": "847", + "kind": "http", + "name": "Get_Asset_With_SyncStatus", + "description": "Get_Asset_With_SyncStatus", + "filePath": "2024-11-01/Get_Asset_With_SyncStatus.json", + "parameters": [ + { + "$id": "848", + "parameter": { + "$ref": "738" + }, + "value": { + "$id": "849", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "2024-11-01" + } + }, + { + "$id": "850", + "parameter": { + "$ref": "742" + }, + "value": { + "$id": "851", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "852", + "parameter": { + "$ref": "745" + }, + "value": { + "$id": "853", + "kind": "string", + "type": { + "$ref": "746" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "854", + "parameter": { + "$ref": "747" + }, + "value": { + "$id": "855", + "kind": "string", + "type": { + "$ref": "748" + }, + "value": "my-asset" + } + } + ], + "responses": [ + { + "$id": "856", + "response": { + "$ref": "752" + }, + "statusCode": 200, + "bodyValue": { + "$id": "857", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "858", + "id": { + "$id": "859", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "860", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-asset" + }, + "type": { + "$id": "861", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "862", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "863", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "864", + "type": { + "$id": "865", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "866", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "867", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "868", + "site": { + "$id": "869", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "870", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "871", + "createdBy": { + "$id": "872", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "873", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "874", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "875", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "876", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "877", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "878", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "879", + "uuid": { + "$id": "880", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "881", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "882", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "883", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "884", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "885", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "886", + "kind": "number", + "type": { + "$ref": "365" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "887", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "888", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "889", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "890", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "891", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "892", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "893", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "894", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "895", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "896", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "897", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "898", + "path": { + "$id": "899", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "900", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "901", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "902", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "903", + "name": { + "$id": "904", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "905", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "906", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "907", + "path": { + "$id": "908", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "909", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "910", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "911", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "912", + "name": { + "$id": "913", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "914", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "915", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "916", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "917", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "918", + "name": { + "$id": "919", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "920", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "921", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "922", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "923", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "924", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "925", + "name": { + "$id": "926", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "927", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "928", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "929", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "930", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "931", + "path": { + "$id": "932", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "933", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "934", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "935", + "name": { + "$id": "936", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "937", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "938", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "939", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "status": { + "$id": "940", + "kind": "model", + "type": { + "$ref": "492" + }, + "value": { + "$id": "941", + "errors": { + "$id": "942", + "kind": "array", + "type": { + "$ref": "494" + }, + "value": [ + { + "$id": "943", + "kind": "model", + "type": { + "$ref": "495" + }, + "value": { + "$id": "944", + "code": { + "$id": "945", + "kind": "number", + "type": { + "$ref": "497" + }, + "value": 500 + }, + "message": { + "$id": "946", + "kind": "string", + "type": { + "$ref": "501" + }, + "value": "Internal Server Error" + } + } + } + ] + }, + "version": { + "$id": "947", + "kind": "number", + "type": { + "$ref": "507" + }, + "value": 1 + }, + "datasets": { + "$id": "948", + "kind": "array", + "type": { + "$ref": "511" + }, + "value": [ + { + "$id": "949", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "950", + "name": { + "$id": "951", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "dataset1" + }, + "messageSchemaReference": { + "$id": "952", + "kind": "model", + "type": { + "$ref": "518" + }, + "value": { + "$id": "953", + "schemaRegistryNamespace": { + "$id": "954", + "kind": "string", + "type": { + "$ref": "520" + }, + "value": "schemans" + }, + "schemaName": { + "$id": "955", + "kind": "string", + "type": { + "$ref": "524" + }, + "value": "schema1" + }, + "schemaVersion": { + "$id": "956", + "kind": "string", + "type": { + "$ref": "528" + }, + "value": "1.0.0" + } + } + } + } + } + ] + }, + "events": { + "$id": "957", + "kind": "array", + "type": { + "$ref": "536" + }, + "value": [ + { + "$id": "958", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "959", + "name": { + "$id": "960", + "kind": "string", + "type": { + "$ref": "539" + }, + "value": "event1" + }, + "messageSchemaReference": { + "$id": "961", + "kind": "model", + "type": { + "$ref": "518" + }, + "value": { + "$id": "962", + "schemaRegistryNamespace": { + "$id": "963", + "kind": "string", + "type": { + "$ref": "520" + }, + "value": "schemans" + }, + "schemaName": { + "$id": "964", + "kind": "string", + "type": { + "$ref": "524" + }, + "value": "schema2" + }, + "schemaVersion": { + "$id": "965", + "kind": "string", + "type": { + "$ref": "528" + }, + "value": "1.0.0" + } + } + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "966", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "967", + "Name": "createOrReplace", + "ResourceName": "Asset", + "Doc": "Create a Asset", + "Accessibility": "public", + "Parameters": [ + { + "$id": "968", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "969", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "970", + "Type": { + "$id": "971", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "972", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "973", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "974", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "975", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "976", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "977", + "Name": "assetName", + "NameInRequest": "assetName", + "Doc": "Asset name parameter.", + "Type": { + "$id": "978", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "979", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "980", + "kind": "constant", + "valueType": { + "$id": "981", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "982", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "983", + "kind": "constant", + "valueType": { + "$id": "984", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "985", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "337" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "986", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "337" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "987", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "337" + }, + "Headers": [ + { + "$id": "988", + "Name": "azureAsyncOperation", + "NameInResponse": "Azure-AsyncOperation", + "Doc": "A link to the status monitor", + "Type": { + "$id": "989", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "990", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "991", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "992", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "993", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "337" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.Assets.createOrReplace", + "Decorators": [], + "Examples": [ + { + "$id": "994", + "kind": "http", + "name": "Create_Asset_With_DiscoveredAssetRefs", + "description": "Create_Asset_With_DiscoveredAssetRefs", + "filePath": "2024-11-01/Create_Asset_With_DiscoveredAssetRef.json", + "parameters": [ + { + "$id": "995", + "parameter": { + "$ref": "968" + }, + "value": { + "$id": "996", + "kind": "string", + "type": { + "$ref": "969" + }, + "value": "2024-11-01" + } + }, + { + "$id": "997", + "parameter": { + "$ref": "972" + }, + "value": { + "$id": "998", + "kind": "string", + "type": { + "$ref": "973" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "999", + "parameter": { + "$ref": "975" + }, + "value": { + "$id": "1000", + "kind": "string", + "type": { + "$ref": "976" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "1001", + "parameter": { + "$ref": "977" + }, + "value": { + "$id": "1002", + "kind": "string", + "type": { + "$ref": "978" + }, + "value": "my-asset" + } + }, + { + "$id": "1003", + "parameter": { + "$ref": "985" + }, + "value": { + "$id": "1004", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1005", + "location": { + "$id": "1006", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1007", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "1008", + "type": { + "$id": "1009", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1010", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1011", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "1012", + "site": { + "$id": "1013", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "properties": { + "$id": "1014", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1015", + "enabled": { + "$id": "1016", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "1017", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1018", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1019", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1020", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "manufacturer": { + "$id": "1021", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1022", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1023", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1024", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1025", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1026", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1027", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1028", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "discoveredAssetRefs": { + "$id": "1029", + "kind": "array", + "type": { + "$ref": "407" + }, + "value": [ + { + "$id": "1030", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "discoveredAsset1" + }, + { + "$id": "1031", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "discoveredAsset2" + } + ] + }, + "defaultDatasetsConfiguration": { + "$id": "1032", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1033", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1034", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1035", + "path": { + "$id": "1036", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1037", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1038", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "1039", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "1040", + "name": { + "$id": "1041", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1042", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1043", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1044", + "path": { + "$id": "1045", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1046", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1047", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "1048", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1049", + "name": { + "$id": "1050", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1051", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1052", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1053", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1054", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1055", + "name": { + "$id": "1056", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1057", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1058", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1059", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1060", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "1061", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1062", + "name": { + "$id": "1063", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1064", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1065", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1066", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1067", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1068", + "path": { + "$id": "1069", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1070", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1071", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1072", + "name": { + "$id": "1073", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1074", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1075", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1076", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1077", + "response": { + "$ref": "986" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1078", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1079", + "id": { + "$id": "1080", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1081", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-asset" + }, + "type": { + "$id": "1082", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1083", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1084", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "1085", + "type": { + "$id": "1086", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1087", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1088", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "1089", + "site": { + "$id": "1090", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1091", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "1092", + "createdBy": { + "$id": "1093", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1094", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1095", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1096", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1097", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1098", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1099", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1100", + "uuid": { + "$id": "1101", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1102", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "1103", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1104", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1105", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1106", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1107", + "kind": "number", + "type": { + "$ref": "365" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1108", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1109", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1110", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1111", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1112", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1113", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1114", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1115", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "discoveredAssetRefs": { + "$id": "1116", + "kind": "array", + "type": { + "$ref": "407" + }, + "value": [ + { + "$id": "1117", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "discoveredAsset1" + }, + { + "$id": "1118", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "discoveredAsset2" + } + ] + }, + "defaultDatasetsConfiguration": { + "$id": "1119", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1120", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1121", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1122", + "path": { + "$id": "1123", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1124", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1125", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "1126", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "1127", + "name": { + "$id": "1128", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1129", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1130", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1131", + "path": { + "$id": "1132", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1133", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1134", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "1135", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1136", + "name": { + "$id": "1137", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1138", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1139", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1140", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1141", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1142", + "name": { + "$id": "1143", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1144", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1145", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1146", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1147", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "1148", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1149", + "name": { + "$id": "1150", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1151", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1152", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1153", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1154", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1155", + "path": { + "$id": "1156", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1157", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1158", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1159", + "name": { + "$id": "1160", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1161", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1162", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1163", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "1164", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "1165", + "response": { + "$ref": "987" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1166", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1167", + "id": { + "$id": "1168", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1169", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-asset" + }, + "type": { + "$id": "1170", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1171", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1172", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "1173", + "type": { + "$id": "1174", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1175", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1176", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "1177", + "site": { + "$id": "1178", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1179", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "1180", + "createdBy": { + "$id": "1181", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1182", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1183", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1184", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1185", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1186", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1187", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1188", + "uuid": { + "$id": "1189", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1190", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "1191", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1192", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1193", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1194", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1195", + "kind": "number", + "type": { + "$ref": "365" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1196", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1197", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1198", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1199", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1200", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1201", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1202", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1203", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "discoveredAssetRefs": { + "$id": "1204", + "kind": "array", + "type": { + "$ref": "407" + }, + "value": [ + { + "$id": "1205", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "discoveredAsset1" + }, + { + "$id": "1206", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "discoveredAsset2" + } + ] + }, + "defaultDatasetsConfiguration": { + "$id": "1207", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1208", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1209", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1210", + "path": { + "$id": "1211", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1212", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1213", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "1214", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "1215", + "name": { + "$id": "1216", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1217", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1218", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1219", + "path": { + "$id": "1220", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1221", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1222", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "1223", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1224", + "name": { + "$id": "1225", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1226", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1227", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1228", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1229", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1230", + "name": { + "$id": "1231", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1232", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1233", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1234", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1235", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "1236", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1237", + "name": { + "$id": "1238", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1239", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1240", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1241", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1242", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1243", + "path": { + "$id": "1244", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1245", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1246", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1247", + "name": { + "$id": "1248", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1249", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1250", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1251", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "1252", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Accepted" + } + } + } + } + } + } + ] + }, + { + "$id": "1253", + "kind": "http", + "name": "Create_Asset_With_ExternalAssetId", + "description": "Create_Asset_With_ExternalAssetId", + "filePath": "2024-11-01/Create_Asset_With_ExternalAssetId.json", + "parameters": [ + { + "$id": "1254", + "parameter": { + "$ref": "968" + }, + "value": { + "$id": "1255", + "kind": "string", + "type": { + "$ref": "969" + }, + "value": "2024-11-01" + } + }, + { + "$id": "1256", + "parameter": { + "$ref": "972" + }, + "value": { + "$id": "1257", + "kind": "string", + "type": { + "$ref": "973" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "1258", + "parameter": { + "$ref": "975" + }, + "value": { + "$id": "1259", + "kind": "string", + "type": { + "$ref": "976" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "1260", + "parameter": { + "$ref": "977" + }, + "value": { + "$id": "1261", + "kind": "string", + "type": { + "$ref": "978" + }, + "value": "my-asset" + } + }, + { + "$id": "1262", + "parameter": { + "$ref": "985" + }, + "value": { + "$id": "1263", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1264", + "location": { + "$id": "1265", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1266", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "1267", + "type": { + "$id": "1268", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1269", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1270", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "1271", + "site": { + "$id": "1272", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "properties": { + "$id": "1273", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1274", + "enabled": { + "$id": "1275", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "1276", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1277", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1278", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1279", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "manufacturer": { + "$id": "1280", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1281", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1282", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1283", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1284", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1285", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1286", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1287", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1288", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1289", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1290", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1291", + "path": { + "$id": "1292", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1293", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1294", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "1295", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "1296", + "name": { + "$id": "1297", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1298", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1299", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1300", + "path": { + "$id": "1301", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1302", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1303", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "1304", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1305", + "name": { + "$id": "1306", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1307", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1308", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1309", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1310", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1311", + "name": { + "$id": "1312", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1313", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1314", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1315", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1316", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "1317", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1318", + "name": { + "$id": "1319", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1320", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1321", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1322", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1323", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1324", + "path": { + "$id": "1325", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1326", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1327", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1328", + "name": { + "$id": "1329", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1330", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1331", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1332", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1333", + "response": { + "$ref": "986" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1334", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1335", + "id": { + "$id": "1336", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1337", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-asset" + }, + "type": { + "$id": "1338", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1339", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1340", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "1341", + "type": { + "$id": "1342", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1343", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1344", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "1345", + "site": { + "$id": "1346", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1347", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "1348", + "createdBy": { + "$id": "1349", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1350", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1351", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1352", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1353", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1354", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1355", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1356", + "uuid": { + "$id": "1357", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1358", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "1359", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1360", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1361", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1362", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1363", + "kind": "number", + "type": { + "$ref": "365" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1364", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1365", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1366", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1367", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1368", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1369", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1370", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1371", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1372", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1373", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1374", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1375", + "path": { + "$id": "1376", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1377", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1378", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "1379", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "1380", + "name": { + "$id": "1381", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1382", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1383", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1384", + "path": { + "$id": "1385", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1386", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1387", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "1388", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1389", + "name": { + "$id": "1390", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1391", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1392", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1393", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1394", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1395", + "name": { + "$id": "1396", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1397", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1398", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1399", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1400", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "1401", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1402", + "name": { + "$id": "1403", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1404", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1405", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1406", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1407", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1408", + "path": { + "$id": "1409", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1410", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1411", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1412", + "name": { + "$id": "1413", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1414", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1415", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1416", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "1417", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "1418", + "response": { + "$ref": "987" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1419", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1420", + "id": { + "$id": "1421", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1422", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-asset" + }, + "type": { + "$id": "1423", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1424", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1425", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "1426", + "type": { + "$id": "1427", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1428", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1429", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "1430", + "site": { + "$id": "1431", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1432", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "1433", + "createdBy": { + "$id": "1434", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1435", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1436", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1437", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1438", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1439", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1440", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1441", + "uuid": { + "$id": "1442", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1443", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "1444", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1445", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1446", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1447", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1448", + "kind": "number", + "type": { + "$ref": "365" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1449", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1450", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1451", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1452", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1453", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1454", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1455", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1456", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1457", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1458", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1459", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1460", + "path": { + "$id": "1461", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1462", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1463", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "1464", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "1465", + "name": { + "$id": "1466", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1467", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1468", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1469", + "path": { + "$id": "1470", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1471", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1472", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "1473", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1474", + "name": { + "$id": "1475", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1476", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1477", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1478", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1479", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1480", + "name": { + "$id": "1481", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1482", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1483", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1484", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1485", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "1486", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1487", + "name": { + "$id": "1488", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1489", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1490", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1491", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1492", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1493", + "path": { + "$id": "1494", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1495", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1496", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1497", + "name": { + "$id": "1498", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1499", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1500", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1501", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "1502", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Accepted" + } + } + } + } + } + } + ] + }, + { + "$id": "1503", + "kind": "http", + "name": "Create_Asset_Without_DisplayName", + "description": "Create_Asset_Without_DisplayName", + "filePath": "2024-11-01/Create_Asset_Without_DisplayName.json", + "parameters": [ + { + "$id": "1504", + "parameter": { + "$ref": "968" + }, + "value": { + "$id": "1505", + "kind": "string", + "type": { + "$ref": "969" + }, + "value": "2024-11-01" + } + }, + { + "$id": "1506", + "parameter": { + "$ref": "972" + }, + "value": { + "$id": "1507", + "kind": "string", + "type": { + "$ref": "973" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "1508", + "parameter": { + "$ref": "975" + }, + "value": { + "$id": "1509", + "kind": "string", + "type": { + "$ref": "976" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "1510", + "parameter": { + "$ref": "977" + }, + "value": { + "$id": "1511", + "kind": "string", + "type": { + "$ref": "978" + }, + "value": "my-asset" + } + }, + { + "$id": "1512", + "parameter": { + "$ref": "985" + }, + "value": { + "$id": "1513", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1514", + "location": { + "$id": "1515", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1516", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "1517", + "type": { + "$id": "1518", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1519", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1520", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "1521", + "site": { + "$id": "1522", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "properties": { + "$id": "1523", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1524", + "enabled": { + "$id": "1525", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "1526", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "8ZBA6LRHU0A458969" + }, + "description": { + "$id": "1527", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1528", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "manufacturer": { + "$id": "1529", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1530", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1531", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1532", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1533", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1534", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1535", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1536", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1537", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1538", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1539", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1540", + "path": { + "$id": "1541", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1542", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1543", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "1544", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "1545", + "name": { + "$id": "1546", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1547", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1548", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1549", + "path": { + "$id": "1550", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1551", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1552", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "1553", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1554", + "name": { + "$id": "1555", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1556", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1557", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1558", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1559", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1560", + "name": { + "$id": "1561", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1562", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1563", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1564", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1565", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "1566", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1567", + "name": { + "$id": "1568", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1569", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1570", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1571", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1572", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1573", + "path": { + "$id": "1574", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1575", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1576", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1577", + "name": { + "$id": "1578", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1579", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1580", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1581", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1582", + "response": { + "$ref": "986" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1583", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1584", + "id": { + "$id": "1585", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1586", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-asset" + }, + "type": { + "$id": "1587", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1588", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1589", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "1590", + "type": { + "$id": "1591", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1592", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1593", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "1594", + "site": { + "$id": "1595", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1596", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "1597", + "createdBy": { + "$id": "1598", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1599", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1600", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1601", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1602", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1603", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1604", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1605", + "uuid": { + "$id": "1606", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1607", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "1608", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1609", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "my-asset" + }, + "description": { + "$id": "1610", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1611", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1612", + "kind": "number", + "type": { + "$ref": "365" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1613", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1614", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1615", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1616", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1617", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1618", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1619", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1620", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1621", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1622", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1623", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1624", + "path": { + "$id": "1625", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1626", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1627", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "1628", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "1629", + "name": { + "$id": "1630", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1631", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1632", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1633", + "path": { + "$id": "1634", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1635", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1636", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "1637", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1638", + "name": { + "$id": "1639", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1640", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1641", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1642", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1643", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1644", + "name": { + "$id": "1645", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1646", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1647", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1648", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1649", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "1650", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1651", + "name": { + "$id": "1652", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1653", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1654", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1655", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1656", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1657", + "path": { + "$id": "1658", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1659", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1660", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1661", + "name": { + "$id": "1662", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1663", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1664", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1665", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "1666", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "1667", + "response": { + "$ref": "987" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1668", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1669", + "id": { + "$id": "1670", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1671", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-asset" + }, + "type": { + "$id": "1672", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1673", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1674", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "1675", + "type": { + "$id": "1676", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1677", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1678", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "1679", + "site": { + "$id": "1680", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1681", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "1682", + "createdBy": { + "$id": "1683", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1684", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1685", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1686", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1687", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1688", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1689", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1690", + "uuid": { + "$id": "1691", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1692", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "1693", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "1694", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "my-asset" + }, + "description": { + "$id": "1695", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1696", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1697", + "kind": "number", + "type": { + "$ref": "365" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1698", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1699", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1700", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1701", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1702", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1703", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1704", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1705", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1706", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1707", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1708", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1709", + "path": { + "$id": "1710", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1711", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1712", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "1713", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "1714", + "name": { + "$id": "1715", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1716", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1717", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1718", + "path": { + "$id": "1719", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1720", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1721", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "1722", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1723", + "name": { + "$id": "1724", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1725", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1726", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1727", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1728", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1729", + "name": { + "$id": "1730", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1731", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1732", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1733", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1734", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "1735", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1736", + "name": { + "$id": "1737", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1738", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1739", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1740", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1741", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1742", + "path": { + "$id": "1743", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1744", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1745", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1746", + "name": { + "$id": "1747", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1748", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1749", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1750", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "1751", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Accepted" + } + } + } + } + } + } + ] + }, + { + "$id": "1752", + "kind": "http", + "name": "Create_Asset_Without_ExternalAssetId", + "description": "Create_Asset_Without_ExternalAssetId", + "filePath": "2024-11-01/Create_Asset_Without_ExternalAssetId.json", + "parameters": [ + { + "$id": "1753", + "parameter": { + "$ref": "968" + }, + "value": { + "$id": "1754", + "kind": "string", + "type": { + "$ref": "969" + }, + "value": "2024-11-01" + } + }, + { + "$id": "1755", + "parameter": { + "$ref": "972" + }, + "value": { + "$id": "1756", + "kind": "string", + "type": { + "$ref": "973" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "1757", + "parameter": { + "$ref": "975" + }, + "value": { + "$id": "1758", + "kind": "string", + "type": { + "$ref": "976" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "1759", + "parameter": { + "$ref": "977" + }, + "value": { + "$id": "1760", + "kind": "string", + "type": { + "$ref": "978" + }, + "value": "my-asset" + } + }, + { + "$id": "1761", + "parameter": { + "$ref": "985" + }, + "value": { + "$id": "1762", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1763", + "location": { + "$id": "1764", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1765", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "1766", + "type": { + "$id": "1767", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1768", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1769", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "1770", + "site": { + "$id": "1771", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "properties": { + "$id": "1772", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1773", + "enabled": { + "$id": "1774", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "displayName": { + "$id": "1775", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1776", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1777", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "manufacturer": { + "$id": "1778", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1779", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1780", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1781", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1782", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1783", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1784", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1785", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1786", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1787", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1788", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1789", + "path": { + "$id": "1790", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1791", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1792", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "1793", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "1794", + "name": { + "$id": "1795", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1796", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1797", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1798", + "path": { + "$id": "1799", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1800", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1801", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "1802", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1803", + "name": { + "$id": "1804", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1805", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1806", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1807", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1808", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1809", + "name": { + "$id": "1810", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1811", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1812", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1813", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1814", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "1815", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1816", + "name": { + "$id": "1817", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1818", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1819", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1820", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1821", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1822", + "path": { + "$id": "1823", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1824", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1825", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1826", + "name": { + "$id": "1827", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1828", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1829", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1830", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1831", + "response": { + "$ref": "986" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1832", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1833", + "id": { + "$id": "1834", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1835", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-asset" + }, + "type": { + "$id": "1836", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1837", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1838", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "1839", + "type": { + "$id": "1840", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1841", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1842", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "1843", + "site": { + "$id": "1844", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1845", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "1846", + "createdBy": { + "$id": "1847", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1848", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1849", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1850", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1851", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1852", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1853", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1854", + "uuid": { + "$id": "1855", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1856", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "1857", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "displayName": { + "$id": "1858", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1859", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1860", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1861", + "kind": "number", + "type": { + "$ref": "365" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1862", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1863", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1864", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1865", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1866", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1867", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1868", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1869", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1870", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1871", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1872", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1873", + "path": { + "$id": "1874", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1875", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1876", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "1877", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "1878", + "name": { + "$id": "1879", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1880", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1881", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1882", + "path": { + "$id": "1883", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1884", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1885", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "1886", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1887", + "name": { + "$id": "1888", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1889", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1890", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1891", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1892", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1893", + "name": { + "$id": "1894", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1895", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1896", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1897", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1898", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "1899", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1900", + "name": { + "$id": "1901", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1902", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1903", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1904", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1905", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1906", + "path": { + "$id": "1907", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1908", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1909", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1910", + "name": { + "$id": "1911", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1912", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1913", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1914", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "1915", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "1916", + "response": { + "$ref": "987" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1917", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1918", + "id": { + "$id": "1919", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "1920", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-asset" + }, + "type": { + "$id": "1921", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "1922", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "1923", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "1924", + "type": { + "$id": "1925", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "1926", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "1927", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "1928", + "site": { + "$id": "1929", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "1930", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "1931", + "createdBy": { + "$id": "1932", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "1933", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "1934", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "1935", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "1936", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "1937", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "1938", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1939", + "uuid": { + "$id": "1940", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "1941", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "1942", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "displayName": { + "$id": "1943", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "1944", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "1945", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "1946", + "kind": "number", + "type": { + "$ref": "365" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "1947", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "1948", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "1949", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "1950", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "1951", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "1952", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "1953", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "1954", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "1955", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "1956", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "1957", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1958", + "path": { + "$id": "1959", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "1960", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "1961", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "1962", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "1963", + "name": { + "$id": "1964", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "1965", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "1966", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1967", + "path": { + "$id": "1968", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "1969", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "1970", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "1971", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1972", + "name": { + "$id": "1973", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "1974", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "1975", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "1976", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "1977", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "1978", + "name": { + "$id": "1979", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "1980", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "1981", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "1982", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "1983", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "1984", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1985", + "name": { + "$id": "1986", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "1987", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "1988", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "1989", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "1990", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1991", + "path": { + "$id": "1992", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "1993", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "1994", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1995", + "name": { + "$id": "1996", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "1997", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "1998", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "1999", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "2000", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Accepted" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2001", + "Name": "update", + "ResourceName": "Asset", + "Doc": "Update a Asset", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2002", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2003", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2004", + "Type": { + "$id": "2005", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2006", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2007", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2008", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2009", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2010", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2011", + "Name": "assetName", + "NameInRequest": "assetName", + "Doc": "Asset name parameter.", + "Type": { + "$id": "2012", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2013", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "2014", + "kind": "constant", + "valueType": { + "$id": "2015", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2016", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2017", + "kind": "constant", + "valueType": { + "$id": "2018", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2019", + "Name": "properties", + "NameInRequest": "properties", + "Doc": "The resource properties to be updated.", + "Type": { + "$ref": "557" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2020", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "337" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "2021", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "2022", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "2023", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2024", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "2025", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "2026", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "2027", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "337" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.Assets.update", + "Decorators": [], + "Examples": [ + { + "$id": "2028", + "kind": "http", + "name": "Update_Asset", + "description": "Update_Asset", + "filePath": "2024-11-01/Update_Asset.json", + "parameters": [ + { + "$id": "2029", + "parameter": { + "$ref": "2002" + }, + "value": { + "$id": "2030", + "kind": "string", + "type": { + "$ref": "2003" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2031", + "parameter": { + "$ref": "2006" + }, + "value": { + "$id": "2032", + "kind": "string", + "type": { + "$ref": "2007" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2033", + "parameter": { + "$ref": "2009" + }, + "value": { + "$id": "2034", + "kind": "string", + "type": { + "$ref": "2010" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2035", + "parameter": { + "$ref": "2011" + }, + "value": { + "$id": "2036", + "kind": "string", + "type": { + "$ref": "2012" + }, + "value": "my-asset" + } + }, + { + "$id": "2037", + "parameter": { + "$ref": "2019" + }, + "value": { + "$id": "2038", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "$id": "2039", + "properties": { + "$id": "2040", + "kind": "model", + "type": { + "$ref": "565" + }, + "value": { + "$id": "2041", + "enabled": { + "$id": "2042", + "kind": "boolean", + "type": { + "$ref": "567" + }, + "value": false + }, + "displayName": { + "$id": "2043", + "kind": "string", + "type": { + "$ref": "571" + }, + "value": "NewAssetDisplayName" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2044", + "response": { + "$ref": "2020" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2045", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "2046", + "id": { + "$id": "2047", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "2048", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-asset" + }, + "type": { + "$id": "2049", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "2050", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2051", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "2052", + "type": { + "$id": "2053", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2054", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2055", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "2056", + "site": { + "$id": "2057", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2058", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "2059", + "createdBy": { + "$id": "2060", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2061", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2062", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2063", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2064", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2065", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2066", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "2067", + "uuid": { + "$id": "2068", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "2069", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "2070", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "2071", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "NewAssetDisplayName" + }, + "description": { + "$id": "2072", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "2073", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "2074", + "kind": "number", + "type": { + "$ref": "365" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "2075", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "2076", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "2077", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "2078", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "2079", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "2080", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "2081", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "2082", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "2083", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "2084", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "2085", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2086", + "path": { + "$id": "2087", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "2088", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "2089", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "2090", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "2091", + "name": { + "$id": "2092", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "2093", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "2094", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2095", + "path": { + "$id": "2096", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "2097", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "2098", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "2099", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "2100", + "name": { + "$id": "2101", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "2102", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "2103", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "2104", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "2105", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "2106", + "name": { + "$id": "2107", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "2108", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "2109", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "2110", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "2111", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "2112", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "2113", + "name": { + "$id": "2114", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "2115", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "2116", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "2117", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "2118", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2119", + "path": { + "$id": "2120", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "2121", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "2122", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "2123", + "name": { + "$id": "2124", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "2125", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "2126", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "2127", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "2128", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "2129", + "response": { + "$ref": "2021" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "2130", + "Name": "delete", + "ResourceName": "Asset", + "Doc": "Delete a Asset", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2131", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2132", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2133", + "Type": { + "$id": "2134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2135", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2136", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2138", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2140", + "Name": "assetName", + "NameInRequest": "assetName", + "Doc": "Asset name parameter.", + "Type": { + "$id": "2141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2142", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2143", + "kind": "constant", + "valueType": { + "$id": "2144", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2145", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "2146", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "2147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2148", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "2149", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "2150", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}", + "BufferResponse": true, + "LongRunning": { + "$id": "2151", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "2152", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.Assets.delete", + "Decorators": [], + "Examples": [ + { + "$id": "2153", + "kind": "http", + "name": "Delete_Asset", + "description": "Delete_Asset", + "filePath": "2024-11-01/Delete_Asset.json", + "parameters": [ + { + "$id": "2154", + "parameter": { + "$ref": "2131" + }, + "value": { + "$id": "2155", + "kind": "string", + "type": { + "$ref": "2132" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2156", + "parameter": { + "$ref": "2135" + }, + "value": { + "$id": "2157", + "kind": "string", + "type": { + "$ref": "2136" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2158", + "parameter": { + "$ref": "2138" + }, + "value": { + "$id": "2159", + "kind": "string", + "type": { + "$ref": "2139" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2160", + "parameter": { + "$ref": "2140" + }, + "value": { + "$id": "2161", + "kind": "string", + "type": { + "$ref": "2141" + }, + "value": "my-asset" + } + } + ], + "responses": [ + { + "$id": "2162", + "response": { + "$ref": "2145" + }, + "statusCode": 202 + }, + { + "$id": "2163", + "response": { + "$ref": "2150" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "2164", + "Name": "listByResourceGroup", + "ResourceName": "Asset", + "Doc": "List Asset resources by resource group", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2165", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2166", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2167", + "Type": { + "$id": "2168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2169", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2170", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2172", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2174", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2175", + "kind": "constant", + "valueType": { + "$id": "2176", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2177", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "637" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets", + "BufferResponse": true, + "Paging": { + "$id": "2178", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "2179", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.Assets.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "2180", + "kind": "http", + "name": "List_Assets_ResourceGroup", + "description": "List_Assets_ResourceGroup", + "filePath": "2024-11-01/List_Assets_ResourceGroup.json", + "parameters": [ + { + "$id": "2181", + "parameter": { + "$ref": "2165" + }, + "value": { + "$id": "2182", + "kind": "string", + "type": { + "$ref": "2166" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2183", + "parameter": { + "$ref": "2169" + }, + "value": { + "$id": "2184", + "kind": "string", + "type": { + "$ref": "2170" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2185", + "parameter": { + "$ref": "2172" + }, + "value": { + "$id": "2186", + "kind": "string", + "type": { + "$ref": "2173" + }, + "value": "myResourceGroup" + } + } + ], + "responses": [ + { + "$id": "2187", + "response": { + "$ref": "2177" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2188", + "kind": "model", + "type": { + "$ref": "637" + }, + "value": { + "$id": "2189", + "value": { + "$id": "2190", + "kind": "array", + "type": { + "$ref": "639" + }, + "value": [ + { + "$id": "2191", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "2192", + "id": { + "$id": "2193", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "2194", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-asset" + }, + "type": { + "$id": "2195", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "2196", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2197", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "2198", + "type": { + "$id": "2199", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2200", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2201", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "2202", + "site": { + "$id": "2203", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2204", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "2205", + "createdBy": { + "$id": "2206", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2207", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2208", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2209", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2210", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2211", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2212", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "2213", + "uuid": { + "$id": "2214", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "2215", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "2216", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "2217", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "2218", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "2219", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "2220", + "kind": "number", + "type": { + "$ref": "365" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "2221", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "2222", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "2223", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "2224", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "2225", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "2226", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "2227", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "2228", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "2229", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "2230", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "2231", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2232", + "path": { + "$id": "2233", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "2234", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "2235", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "2236", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "2237", + "name": { + "$id": "2238", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "2239", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "2240", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2241", + "path": { + "$id": "2242", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "2243", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "2244", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "2245", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "2246", + "name": { + "$id": "2247", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "2248", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "2249", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "2250", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "2251", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "2252", + "name": { + "$id": "2253", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "2254", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "2255", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "2256", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "2257", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "2258", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "2259", + "name": { + "$id": "2260", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "2261", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "2262", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "2263", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "2264", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2265", + "path": { + "$id": "2266", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "2267", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "2268", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "2269", + "name": { + "$id": "2270", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "2271", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "2272", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "2273", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "2274", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "2275", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "2276", + "id": { + "$id": "2277", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset1" + }, + "name": { + "$id": "2278", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-asset1" + }, + "type": { + "$id": "2279", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "2280", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2281", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "2282", + "type": { + "$id": "2283", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2284", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2285", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "2286", + "site": { + "$id": "2287", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-2" + } + } + }, + "systemData": { + "$id": "2288", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "2289", + "createdBy": { + "$id": "2290", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2291", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2292", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2293", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2294", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2295", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2296", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "2297", + "uuid": { + "$id": "2298", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "7824a74f-21e1-4458-ae06-604d3a241d2c" + }, + "enabled": { + "$id": "2299", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "2300", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "9AVD7KLPU03377981" + }, + "displayName": { + "$id": "2301", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "AssetDisplayName 1" + }, + "description": { + "$id": "2302", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset 1" + }, + "assetEndpointProfileRef": { + "$id": "2303", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "2304", + "kind": "number", + "type": { + "$ref": "365" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "2305", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "2306", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "2307", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "2308", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "2309", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "2310", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "2311", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "2312", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "12-984302-792341-8" + }, + "defaultDatasetsConfiguration": { + "$id": "2313", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "2314", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "2315", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2316", + "path": { + "$id": "2317", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "2318", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "2319", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "2320", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "2321", + "name": { + "$id": "2322", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "2323", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "2324", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2325", + "path": { + "$id": "2326", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "2327", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "2328", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "2329", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "2330", + "name": { + "$id": "2331", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "2332", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "2333", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "2334", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "2335", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "2336", + "name": { + "$id": "2337", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "2338", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "2339", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "2340", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "2341", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "2342", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "2343", + "name": { + "$id": "2344", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "2345", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "2346", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "2347", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "2348", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2349", + "path": { + "$id": "2350", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "2351", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "2352", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "2353", + "name": { + "$id": "2354", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "2355", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "2356", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "2357", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "2358", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "2359", + "Name": "listBySubscription", + "ResourceName": "Asset", + "Doc": "List Asset resources by subscription ID", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2360", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2361", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2362", + "Type": { + "$id": "2363", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2364", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2365", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2366", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2367", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2368", + "kind": "constant", + "valueType": { + "$id": "2369", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2370", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "637" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/assets", + "BufferResponse": true, + "Paging": { + "$id": "2371", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "2372", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.Assets.listBySubscription", + "Decorators": [], + "Examples": [ + { + "$id": "2373", + "kind": "http", + "name": "List_Assets_Subscription", + "description": "List_Assets_Subscription", + "filePath": "2024-11-01/List_Assets_Subscription.json", + "parameters": [ + { + "$id": "2374", + "parameter": { + "$ref": "2360" + }, + "value": { + "$id": "2375", + "kind": "string", + "type": { + "$ref": "2361" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2376", + "parameter": { + "$ref": "2364" + }, + "value": { + "$id": "2377", + "kind": "string", + "type": { + "$ref": "2365" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2378", + "response": { + "$ref": "2370" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2379", + "kind": "model", + "type": { + "$ref": "637" + }, + "value": { + "$id": "2380", + "value": { + "$id": "2381", + "kind": "array", + "type": { + "$ref": "639" + }, + "value": [ + { + "$id": "2382", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "2383", + "id": { + "$id": "2384", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset" + }, + "name": { + "$id": "2385", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-asset" + }, + "type": { + "$id": "2386", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "2387", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2388", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "2389", + "type": { + "$id": "2390", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2391", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2392", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "2393", + "site": { + "$id": "2394", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2395", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "2396", + "createdBy": { + "$id": "2397", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2398", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2399", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2400", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2401", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2402", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2403", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "2404", + "uuid": { + "$id": "2405", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "enabled": { + "$id": "2406", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "2407", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "8ZBA6LRHU0A458969" + }, + "displayName": { + "$id": "2408", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "AssetDisplayName" + }, + "description": { + "$id": "2409", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset" + }, + "assetEndpointProfileRef": { + "$id": "2410", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "2411", + "kind": "number", + "type": { + "$ref": "365" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "2412", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "2413", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "2414", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "2415", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "2416", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "2417", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "2418", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "2419", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "64-103816-519918-8" + }, + "defaultDatasetsConfiguration": { + "$id": "2420", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "2421", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "2422", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2423", + "path": { + "$id": "2424", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "2425", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "2426", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "2427", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "2428", + "name": { + "$id": "2429", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "2430", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "2431", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2432", + "path": { + "$id": "2433", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "2434", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "2435", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "2436", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "2437", + "name": { + "$id": "2438", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "2439", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "2440", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "2441", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "2442", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "2443", + "name": { + "$id": "2444", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "2445", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "2446", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "2447", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "2448", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "2449", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "2450", + "name": { + "$id": "2451", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "2452", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "2453", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "2454", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "2455", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2456", + "path": { + "$id": "2457", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "2458", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "2459", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "2460", + "name": { + "$id": "2461", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "2462", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "2463", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "2464", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "2465", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "2466", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "2467", + "id": { + "$id": "2468", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assets/my-asset1" + }, + "name": { + "$id": "2469", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-asset1" + }, + "type": { + "$id": "2470", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assets" + }, + "location": { + "$id": "2471", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2472", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "2473", + "type": { + "$id": "2474", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2475", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2476", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "2477", + "site": { + "$id": "2478", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-2" + } + } + }, + "systemData": { + "$id": "2479", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "2480", + "createdBy": { + "$id": "2481", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2482", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2483", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2484", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2485", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2486", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2487", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "2488", + "uuid": { + "$id": "2489", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "7824a74f-21e1-4458-ae06-604d3a241d2c" + }, + "enabled": { + "$id": "2490", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "externalAssetId": { + "$id": "2491", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "9AVD7KLPU03377981" + }, + "displayName": { + "$id": "2492", + "kind": "string", + "type": { + "$ref": "353" + }, + "value": "AssetDisplayName 1" + }, + "description": { + "$id": "2493", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "This is a sample Asset 1" + }, + "assetEndpointProfileRef": { + "$id": "2494", + "kind": "string", + "type": { + "$ref": "361" + }, + "value": "myAssetEndpointProfile" + }, + "version": { + "$id": "2495", + "kind": "number", + "type": { + "$ref": "365" + }, + "value": 73766 + }, + "manufacturer": { + "$id": "2496", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Contoso" + }, + "manufacturerUri": { + "$id": "2497", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "https://www.contoso.com/manufacturerUri" + }, + "model": { + "$id": "2498", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "ContosoModel" + }, + "productCode": { + "$id": "2499", + "kind": "string", + "type": { + "$ref": "381" + }, + "value": "SA34VDG" + }, + "hardwareRevision": { + "$id": "2500", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "1.0" + }, + "softwareRevision": { + "$id": "2501", + "kind": "string", + "type": { + "$ref": "389" + }, + "value": "2.0" + }, + "documentationUri": { + "$id": "2502", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "https://www.example.com/manual" + }, + "serialNumber": { + "$id": "2503", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "12-984302-792341-8" + }, + "defaultDatasetsConfiguration": { + "$id": "2504", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultEventsConfiguration": { + "$id": "2505", + "kind": "string", + "type": { + "$ref": "416" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "defaultTopic": { + "$id": "2506", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2507", + "path": { + "$id": "2508", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/defaultTopic" + }, + "retain": { + "$id": "2509", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "datasets": { + "$id": "2510", + "kind": "array", + "type": { + "$ref": "431" + }, + "value": [ + { + "$id": "2511", + "kind": "model", + "type": { + "$ref": "432" + }, + "value": { + "$id": "2512", + "name": { + "$id": "2513", + "kind": "string", + "type": { + "$ref": "434" + }, + "value": "dataset1" + }, + "datasetConfiguration": { + "$id": "2514", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "{\"publishingInterval\":10,\"samplingInterval\":15,\"queueSize\":20}" + }, + "topic": { + "$id": "2515", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2516", + "path": { + "$id": "2517", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/dataset1" + }, + "retain": { + "$id": "2518", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + }, + "dataPoints": { + "$id": "2519", + "kind": "array", + "type": { + "$ref": "445" + }, + "value": [ + { + "$id": "2520", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "2521", + "name": { + "$id": "2522", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint1" + }, + "dataSource": { + "$id": "2523", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" + }, + "observabilityMode": { + "$id": "2524", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "Counter" + }, + "dataPointConfiguration": { + "$id": "2525", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":8,\"samplingInterval\":8,\"queueSize\":4}" + } + } + }, + { + "$id": "2526", + "kind": "model", + "type": { + "$ref": "446" + }, + "value": { + "$id": "2527", + "name": { + "$id": "2528", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "dataPoint2" + }, + "dataSource": { + "$id": "2529", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" + }, + "observabilityMode": { + "$id": "2530", + "kind": "string", + "type": { + "$ref": "46" + }, + "value": "None" + }, + "dataPointConfiguration": { + "$id": "2531", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "{\"publishingInterval\":4,\"samplingInterval\":4,\"queueSize\":7}" + } + } + } + ] + } + } + } + ] + }, + "events": { + "$id": "2532", + "kind": "array", + "type": { + "$ref": "468" + }, + "value": [ + { + "$id": "2533", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "2534", + "name": { + "$id": "2535", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event1" + }, + "eventNotifier": { + "$id": "2536", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" + }, + "observabilityMode": { + "$id": "2537", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "None" + }, + "eventConfiguration": { + "$id": "2538", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":1,\"queueSize\":8}" + }, + "topic": { + "$id": "2539", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2540", + "path": { + "$id": "2541", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "/path/event1" + }, + "retain": { + "$id": "2542", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Keep" + } + } + } + } + }, + { + "$id": "2543", + "kind": "model", + "type": { + "$ref": "469" + }, + "value": { + "$id": "2544", + "name": { + "$id": "2545", + "kind": "string", + "type": { + "$ref": "472" + }, + "value": "event2" + }, + "eventNotifier": { + "$id": "2546", + "kind": "string", + "type": { + "$ref": "476" + }, + "value": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" + }, + "observabilityMode": { + "$id": "2547", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "Log" + }, + "eventConfiguration": { + "$id": "2548", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "{\"publishingInterval\":7,\"samplingInterval\":8,\"queueSize\":4}" + } + } + } + ] + }, + "provisioningState": { + "$id": "2549", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "2550" + }, + "Parent": "DeviceRegistryClient", + "Parameters": [ + { + "$id": "2551", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "2552", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "2553", + "Type": { + "$id": "2554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.Assets" + }, + { + "$id": "2555", + "Name": "AssetEndpointProfiles", + "Namespace": "Microsoft.DeviceRegistry", + "Operations": [ + { + "$id": "2556", + "Name": "get", + "ResourceName": "AssetEndpointProfile", + "Doc": "Get a AssetEndpointProfile", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2557", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2558", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2559", + "Type": { + "$id": "2560", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2561", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2562", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2563", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2564", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2565", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2566", + "Name": "assetEndpointProfileName", + "NameInRequest": "assetEndpointProfileName", + "Doc": "Asset Endpoint Profile name parameter.", + "Type": { + "$id": "2567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2568", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2569", + "kind": "constant", + "valueType": { + "$id": "2570", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2571", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "181" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfiles.get", + "Decorators": [], + "Examples": [ + { + "$id": "2572", + "kind": "http", + "name": "Get_AssetEndpointProfile", + "description": "Get_AssetEndpointProfile", + "filePath": "2024-11-01/Get_AssetEndpointProfile.json", + "parameters": [ + { + "$id": "2573", + "parameter": { + "$ref": "2557" + }, + "value": { + "$id": "2574", + "kind": "string", + "type": { + "$ref": "2558" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2575", + "parameter": { + "$ref": "2561" + }, + "value": { + "$id": "2576", + "kind": "string", + "type": { + "$ref": "2562" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2577", + "parameter": { + "$ref": "2564" + }, + "value": { + "$id": "2578", + "kind": "string", + "type": { + "$ref": "2565" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2579", + "parameter": { + "$ref": "2566" + }, + "value": { + "$id": "2580", + "kind": "string", + "type": { + "$ref": "2567" + }, + "value": "my-assetendpointprofile" + } + } + ], + "responses": [ + { + "$id": "2581", + "response": { + "$ref": "2571" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2582", + "kind": "model", + "type": { + "$ref": "181" + }, + "value": { + "$id": "2583", + "id": { + "$id": "2584", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "2585", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "2586", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "2587", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2588", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "2589", + "type": { + "$id": "2590", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2591", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2592", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "2593", + "site": { + "$id": "2594", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2595", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "2596", + "createdBy": { + "$id": "2597", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2598", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2599", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2600", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2601", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2602", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2603", + "kind": "model", + "type": { + "$ref": "194" + }, + "value": { + "$id": "2604", + "uuid": { + "$id": "2605", + "kind": "string", + "type": { + "$ref": "196" + }, + "value": "1824a74f-21e1-4458-ae07-604d3a241d2e" + }, + "targetAddress": { + "$id": "2606", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2607", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "2608", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "2609", + "method": { + "$id": "2610", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "UsernamePassword" + }, + "usernamePasswordCredentials": { + "$id": "2611", + "kind": "model", + "type": { + "$ref": "213" + }, + "value": { + "$id": "2612", + "usernameSecretName": { + "$id": "2613", + "kind": "string", + "type": { + "$ref": "215" + }, + "value": "usernameRef" + }, + "passwordSecretName": { + "$id": "2614", + "kind": "string", + "type": { + "$ref": "219" + }, + "value": "passwordRef" + } + } + } + } + }, + "provisioningState": { + "$id": "2615", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + }, + { + "$id": "2616", + "kind": "http", + "name": "Get_AssetEndpointProfile_With_SyncStatus", + "description": "Get_AssetEndpointProfile_With_SyncStatus", + "filePath": "2024-11-01/Get_AssetEndpointProfile_With_SyncStatus.json", + "parameters": [ + { + "$id": "2617", + "parameter": { + "$ref": "2557" + }, + "value": { + "$id": "2618", + "kind": "string", + "type": { + "$ref": "2558" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2619", + "parameter": { + "$ref": "2561" + }, + "value": { + "$id": "2620", + "kind": "string", + "type": { + "$ref": "2562" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2621", + "parameter": { + "$ref": "2564" + }, + "value": { + "$id": "2622", + "kind": "string", + "type": { + "$ref": "2565" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2623", + "parameter": { + "$ref": "2566" + }, + "value": { + "$id": "2624", + "kind": "string", + "type": { + "$ref": "2567" + }, + "value": "my-assetendpointprofile" + } + } + ], + "responses": [ + { + "$id": "2625", + "response": { + "$ref": "2571" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2626", + "kind": "model", + "type": { + "$ref": "181" + }, + "value": { + "$id": "2627", + "id": { + "$id": "2628", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "2629", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "2630", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "2631", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2632", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "2633", + "type": { + "$id": "2634", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2635", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2636", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "2637", + "site": { + "$id": "2638", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2639", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "2640", + "createdBy": { + "$id": "2641", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2642", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2643", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2644", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2645", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2646", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2647", + "kind": "model", + "type": { + "$ref": "194" + }, + "value": { + "$id": "2648", + "uuid": { + "$id": "2649", + "kind": "string", + "type": { + "$ref": "196" + }, + "value": "1824a74f-21e1-4458-ae07-604d3a241d2e" + }, + "targetAddress": { + "$id": "2650", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2651", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "2652", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "2653", + "method": { + "$id": "2654", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "UsernamePassword" + }, + "usernamePasswordCredentials": { + "$id": "2655", + "kind": "model", + "type": { + "$ref": "213" + }, + "value": { + "$id": "2656", + "usernameSecretName": { + "$id": "2657", + "kind": "string", + "type": { + "$ref": "215" + }, + "value": "usernameRef" + }, + "passwordSecretName": { + "$id": "2658", + "kind": "string", + "type": { + "$ref": "219" + }, + "value": "passwordRef" + } + } + } + } + }, + "status": { + "$id": "2659", + "kind": "model", + "type": { + "$ref": "243" + }, + "value": { + "$id": "2660", + "errors": { + "$id": "2661", + "kind": "array", + "type": { + "$ref": "245" + }, + "value": [ + { + "$id": "2662", + "kind": "model", + "type": { + "$ref": "246" + }, + "value": { + "$id": "2663", + "code": { + "$id": "2664", + "kind": "number", + "type": { + "$ref": "248" + }, + "value": 500 + }, + "message": { + "$id": "2665", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Internal Server Error" + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "2666", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2667", + "Name": "createOrReplace", + "ResourceName": "AssetEndpointProfile", + "Doc": "Create a AssetEndpointProfile", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2668", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2669", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2670", + "Type": { + "$id": "2671", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2672", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2673", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2674", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2675", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2676", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2677", + "Name": "assetEndpointProfileName", + "NameInRequest": "assetEndpointProfileName", + "Doc": "Asset Endpoint Profile name parameter.", + "Type": { + "$id": "2678", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2679", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "2680", + "kind": "constant", + "valueType": { + "$id": "2681", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2682", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2683", + "kind": "constant", + "valueType": { + "$id": "2684", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2685", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "181" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2686", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "181" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "2687", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "181" + }, + "Headers": [ + { + "$id": "2688", + "Name": "azureAsyncOperation", + "NameInResponse": "Azure-AsyncOperation", + "Doc": "A link to the status monitor", + "Type": { + "$id": "2689", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2690", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "2691", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "2692", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "2693", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "181" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfiles.createOrReplace", + "Decorators": [], + "Examples": [ + { + "$id": "2694", + "kind": "http", + "name": "Create_AssetEndpointProfile", + "description": "Create_AssetEndpointProfile", + "filePath": "2024-11-01/Create_AssetEndpointProfile.json", + "parameters": [ + { + "$id": "2695", + "parameter": { + "$ref": "2668" + }, + "value": { + "$id": "2696", + "kind": "string", + "type": { + "$ref": "2669" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2697", + "parameter": { + "$ref": "2672" + }, + "value": { + "$id": "2698", + "kind": "string", + "type": { + "$ref": "2673" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2699", + "parameter": { + "$ref": "2675" + }, + "value": { + "$id": "2700", + "kind": "string", + "type": { + "$ref": "2676" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2701", + "parameter": { + "$ref": "2677" + }, + "value": { + "$id": "2702", + "kind": "string", + "type": { + "$ref": "2678" + }, + "value": "my-assetendpointprofile" + } + }, + { + "$id": "2703", + "parameter": { + "$ref": "2685" + }, + "value": { + "$id": "2704", + "kind": "model", + "type": { + "$ref": "181" + }, + "value": { + "$id": "2705", + "location": { + "$id": "2706", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2707", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "2708", + "type": { + "$id": "2709", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2710", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2711", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "2712", + "site": { + "$id": "2713", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "properties": { + "$id": "2714", + "kind": "model", + "type": { + "$ref": "194" + }, + "value": { + "$id": "2715", + "targetAddress": { + "$id": "2716", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2717", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "2718", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "2719", + "method": { + "$id": "2720", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Anonymous" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2721", + "response": { + "$ref": "2686" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2722", + "kind": "model", + "type": { + "$ref": "181" + }, + "value": { + "$id": "2723", + "id": { + "$id": "2724", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "2725", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "2726", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "2727", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2728", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "2729", + "type": { + "$id": "2730", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2731", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2732", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "2733", + "site": { + "$id": "2734", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2735", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "2736", + "createdBy": { + "$id": "2737", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2738", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2739", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2740", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2741", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2742", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2743", + "kind": "model", + "type": { + "$ref": "194" + }, + "value": { + "$id": "2744", + "uuid": { + "$id": "2745", + "kind": "string", + "type": { + "$ref": "196" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "targetAddress": { + "$id": "2746", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2747", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "2748", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "2749", + "method": { + "$id": "2750", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Anonymous" + } + } + }, + "provisioningState": { + "$id": "2751", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "2752", + "response": { + "$ref": "2687" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2753", + "kind": "model", + "type": { + "$ref": "181" + }, + "value": { + "$id": "2754", + "id": { + "$id": "2755", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "2756", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "2757", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "2758", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2759", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "2760", + "type": { + "$id": "2761", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2762", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2763", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "2764", + "site": { + "$id": "2765", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2766", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "2767", + "createdBy": { + "$id": "2768", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2769", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2770", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2771", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2772", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2773", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2774", + "kind": "model", + "type": { + "$ref": "194" + }, + "value": { + "$id": "2775", + "uuid": { + "$id": "2776", + "kind": "string", + "type": { + "$ref": "196" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "targetAddress": { + "$id": "2777", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2778", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "2779", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "2780", + "method": { + "$id": "2781", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Anonymous" + } + } + }, + "provisioningState": { + "$id": "2782", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Accepted" + } + } + } + } + } + } + ] + }, + { + "$id": "2783", + "kind": "http", + "name": "Create_AssetEndpointProfile_With_DiscoveredAepRef", + "description": "Create_AssetEndpointProfile_With_DiscoveredAepRef", + "filePath": "2024-11-01/Create_AssetEndpointProfile_With_DiscoveredAepRef.json", + "parameters": [ + { + "$id": "2784", + "parameter": { + "$ref": "2668" + }, + "value": { + "$id": "2785", + "kind": "string", + "type": { + "$ref": "2669" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2786", + "parameter": { + "$ref": "2672" + }, + "value": { + "$id": "2787", + "kind": "string", + "type": { + "$ref": "2673" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2788", + "parameter": { + "$ref": "2675" + }, + "value": { + "$id": "2789", + "kind": "string", + "type": { + "$ref": "2676" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2790", + "parameter": { + "$ref": "2677" + }, + "value": { + "$id": "2791", + "kind": "string", + "type": { + "$ref": "2678" + }, + "value": "my-assetendpointprofile" + } + }, + { + "$id": "2792", + "parameter": { + "$ref": "2685" + }, + "value": { + "$id": "2793", + "kind": "model", + "type": { + "$ref": "181" + }, + "value": { + "$id": "2794", + "location": { + "$id": "2795", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2796", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "2797", + "type": { + "$id": "2798", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2799", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2800", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "2801", + "site": { + "$id": "2802", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "properties": { + "$id": "2803", + "kind": "model", + "type": { + "$ref": "194" + }, + "value": { + "$id": "2804", + "targetAddress": { + "$id": "2805", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2806", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "myEndpointProfileType" + }, + "discoveredAssetEndpointProfileRef": { + "$id": "2807", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "discoveredAssetEndpointProfile1" + }, + "authentication": { + "$id": "2808", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "2809", + "method": { + "$id": "2810", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Anonymous" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2811", + "response": { + "$ref": "2686" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2812", + "kind": "model", + "type": { + "$ref": "181" + }, + "value": { + "$id": "2813", + "id": { + "$id": "2814", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "2815", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "2816", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "2817", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2818", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "2819", + "type": { + "$id": "2820", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2821", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2822", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "2823", + "site": { + "$id": "2824", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2825", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "2826", + "createdBy": { + "$id": "2827", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2828", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2829", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2830", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2831", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2832", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2833", + "kind": "model", + "type": { + "$ref": "194" + }, + "value": { + "$id": "2834", + "uuid": { + "$id": "2835", + "kind": "string", + "type": { + "$ref": "196" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "targetAddress": { + "$id": "2836", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2837", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "myEndpointProfileType" + }, + "discoveredAssetEndpointProfileRef": { + "$id": "2838", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "discoveredAssetEndpointProfile1" + }, + "authentication": { + "$id": "2839", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "2840", + "method": { + "$id": "2841", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Anonymous" + } + } + }, + "provisioningState": { + "$id": "2842", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "2843", + "response": { + "$ref": "2687" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2844", + "kind": "model", + "type": { + "$ref": "181" + }, + "value": { + "$id": "2845", + "id": { + "$id": "2846", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "2847", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "2848", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "2849", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2850", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "2851", + "type": { + "$id": "2852", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2853", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2854", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "2855", + "site": { + "$id": "2856", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2857", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "2858", + "createdBy": { + "$id": "2859", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2860", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2861", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2862", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2863", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2864", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2865", + "kind": "model", + "type": { + "$ref": "194" + }, + "value": { + "$id": "2866", + "uuid": { + "$id": "2867", + "kind": "string", + "type": { + "$ref": "196" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "targetAddress": { + "$id": "2868", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2869", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "myEndpointProfileType" + }, + "discoveredAssetEndpointProfileRef": { + "$id": "2870", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "discoveredAssetEndpointProfile1" + }, + "authentication": { + "$id": "2871", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "2872", + "method": { + "$id": "2873", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Anonymous" + } + } + }, + "provisioningState": { + "$id": "2874", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Accepted" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2875", + "Name": "update", + "ResourceName": "AssetEndpointProfile", + "Doc": "Update a AssetEndpointProfile", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2876", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2877", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2878", + "Type": { + "$id": "2879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2880", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2881", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2882", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2883", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2884", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2885", + "Name": "assetEndpointProfileName", + "NameInRequest": "assetEndpointProfileName", + "Doc": "Asset Endpoint Profile name parameter.", + "Type": { + "$id": "2886", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2887", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "2888", + "kind": "constant", + "valueType": { + "$id": "2889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2890", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2891", + "kind": "constant", + "valueType": { + "$id": "2892", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2893", + "Name": "properties", + "NameInRequest": "properties", + "Doc": "The resource properties to be updated.", + "Type": { + "$ref": "301" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2894", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "181" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "2895", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "2896", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "2897", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2898", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "2899", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "2900", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "2901", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "181" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfiles.update", + "Decorators": [], + "Examples": [ + { + "$id": "2902", + "kind": "http", + "name": "Update_AssetEndpointProfile", + "description": "Update_AssetEndpointProfile", + "filePath": "2024-11-01/Update_AssetEndpointProfile.json", + "parameters": [ + { + "$id": "2903", + "parameter": { + "$ref": "2876" + }, + "value": { + "$id": "2904", + "kind": "string", + "type": { + "$ref": "2877" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2905", + "parameter": { + "$ref": "2880" + }, + "value": { + "$id": "2906", + "kind": "string", + "type": { + "$ref": "2881" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2907", + "parameter": { + "$ref": "2883" + }, + "value": { + "$id": "2908", + "kind": "string", + "type": { + "$ref": "2884" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2909", + "parameter": { + "$ref": "2885" + }, + "value": { + "$id": "2910", + "kind": "string", + "type": { + "$ref": "2886" + }, + "value": "my-assetendpointprofile" + } + }, + { + "$id": "2911", + "parameter": { + "$ref": "2893" + }, + "value": { + "$id": "2912", + "kind": "model", + "type": { + "$ref": "301" + }, + "value": { + "$id": "2913", + "properties": { + "$id": "2914", + "kind": "model", + "type": { + "$ref": "309" + }, + "value": { + "$id": "2915", + "targetAddress": { + "$id": "2916", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "https://www.example.com/myTargetAddress" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2917", + "response": { + "$ref": "2894" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2918", + "kind": "model", + "type": { + "$ref": "181" + }, + "value": { + "$id": "2919", + "id": { + "$id": "2920", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "2921", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "2922", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "2923", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "2924", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "2925", + "type": { + "$id": "2926", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "2927", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "2928", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "2929", + "site": { + "$id": "2930", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "2931", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "2932", + "createdBy": { + "$id": "2933", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "2934", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "2935", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "2936", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "2937", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "2938", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "2939", + "kind": "model", + "type": { + "$ref": "194" + }, + "value": { + "$id": "2940", + "uuid": { + "$id": "2941", + "kind": "string", + "type": { + "$ref": "196" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "targetAddress": { + "$id": "2942", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "2943", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "2944", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "2945", + "method": { + "$id": "2946", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Anonymous" + } + } + }, + "provisioningState": { + "$id": "2947", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "2948", + "response": { + "$ref": "2895" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "2949", + "Name": "delete", + "ResourceName": "AssetEndpointProfile", + "Doc": "Delete a AssetEndpointProfile", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2950", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2951", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2952", + "Type": { + "$id": "2953", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2954", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2955", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2956", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2957", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2958", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2959", + "Name": "assetEndpointProfileName", + "NameInRequest": "assetEndpointProfileName", + "Doc": "Asset Endpoint Profile name parameter.", + "Type": { + "$id": "2960", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2961", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2962", + "kind": "constant", + "valueType": { + "$id": "2963", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2964", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "2965", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "2966", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2967", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "2968", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "2969", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}", + "BufferResponse": true, + "LongRunning": { + "$id": "2970", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "2971", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfiles.delete", + "Decorators": [], + "Examples": [ + { + "$id": "2972", + "kind": "http", + "name": "Delete_AssetEndpointProfile", + "description": "Delete_AssetEndpointProfile", + "filePath": "2024-11-01/Delete_AssetEndpointProfile.json", + "parameters": [ + { + "$id": "2973", + "parameter": { + "$ref": "2950" + }, + "value": { + "$id": "2974", + "kind": "string", + "type": { + "$ref": "2951" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2975", + "parameter": { + "$ref": "2954" + }, + "value": { + "$id": "2976", + "kind": "string", + "type": { + "$ref": "2955" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "2977", + "parameter": { + "$ref": "2957" + }, + "value": { + "$id": "2978", + "kind": "string", + "type": { + "$ref": "2958" + }, + "value": "myResourceGroup" + } + }, + { + "$id": "2979", + "parameter": { + "$ref": "2959" + }, + "value": { + "$id": "2980", + "kind": "string", + "type": { + "$ref": "2960" + }, + "value": "my-assetendpointprofile" + } + } + ], + "responses": [ + { + "$id": "2981", + "response": { + "$ref": "2964" + }, + "statusCode": 202 + }, + { + "$id": "2982", + "response": { + "$ref": "2969" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "2983", + "Name": "listByResourceGroup", + "ResourceName": "AssetEndpointProfile", + "Doc": "List AssetEndpointProfile resources by resource group", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2984", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2986", + "Type": { + "$id": "2987", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2988", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2989", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2990", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2991", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2992", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2993", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2994", + "kind": "constant", + "valueType": { + "$id": "2995", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2996", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "327" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles", + "BufferResponse": true, + "Paging": { + "$id": "2997", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "2998", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfiles.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "2999", + "kind": "http", + "name": "List_AssetEndpointProfiles_ResourceGroup", + "description": "List_AssetEndpointProfiles_ResourceGroup", + "filePath": "2024-11-01/List_AssetEndpointProfiles_ResourceGroup.json", + "parameters": [ + { + "$id": "3000", + "parameter": { + "$ref": "2984" + }, + "value": { + "$id": "3001", + "kind": "string", + "type": { + "$ref": "2985" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3002", + "parameter": { + "$ref": "2988" + }, + "value": { + "$id": "3003", + "kind": "string", + "type": { + "$ref": "2989" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3004", + "parameter": { + "$ref": "2991" + }, + "value": { + "$id": "3005", + "kind": "string", + "type": { + "$ref": "2992" + }, + "value": "myResourceGroup" + } + } + ], + "responses": [ + { + "$id": "3006", + "response": { + "$ref": "2996" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3007", + "kind": "model", + "type": { + "$ref": "327" + }, + "value": { + "$id": "3008", + "value": { + "$id": "3009", + "kind": "array", + "type": { + "$ref": "329" + }, + "value": [ + { + "$id": "3010", + "kind": "model", + "type": { + "$ref": "181" + }, + "value": { + "$id": "3011", + "id": { + "$id": "3012", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "3013", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "3014", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "3015", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "3016", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "3017", + "type": { + "$id": "3018", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "3019", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "3020", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "3021", + "site": { + "$id": "3022", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "3023", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "3024", + "createdBy": { + "$id": "3025", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "3026", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3027", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "3028", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "3029", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3030", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "3031", + "kind": "model", + "type": { + "$ref": "194" + }, + "value": { + "$id": "3032", + "uuid": { + "$id": "3033", + "kind": "string", + "type": { + "$ref": "196" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "targetAddress": { + "$id": "3034", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "3035", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "3036", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "3037", + "method": { + "$id": "3038", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Anonymous" + } + } + }, + "provisioningState": { + "$id": "3039", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "3040", + "kind": "model", + "type": { + "$ref": "181" + }, + "value": { + "$id": "3041", + "id": { + "$id": "3042", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile1" + }, + "name": { + "$id": "3043", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-assetendpointprofile1" + }, + "type": { + "$id": "3044", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "3045", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "3046", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "3047", + "type": { + "$id": "3048", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "3049", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "3050", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "3051", + "site": { + "$id": "3052", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-2" + } + } + }, + "systemData": { + "$id": "3053", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "3054", + "createdBy": { + "$id": "3055", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "3056", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3057", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "3058", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "3059", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3060", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "3061", + "kind": "model", + "type": { + "$ref": "194" + }, + "value": { + "$id": "3062", + "uuid": { + "$id": "3063", + "kind": "string", + "type": { + "$ref": "196" + }, + "value": "7824a74f-21e1-4458-ae06-604d3a241d2c" + }, + "targetAddress": { + "$id": "3064", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "https://www.example.com/myTargetAddress1" + }, + "endpointProfileType": { + "$id": "3065", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "3066", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "3067", + "method": { + "$id": "3068", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Certificate" + }, + "x509Credentials": { + "$id": "3069", + "kind": "model", + "type": { + "$ref": "225" + }, + "value": { + "$id": "3070", + "certificateSecretName": { + "$id": "3071", + "kind": "string", + "type": { + "$ref": "227" + }, + "value": "certificatRef" + } + } + } + } + }, + "provisioningState": { + "$id": "3072", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "3073", + "kind": "model", + "type": { + "$ref": "181" + }, + "value": { + "$id": "3074", + "id": { + "$id": "3075", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile2" + }, + "name": { + "$id": "3076", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-assetendpointprofile2" + }, + "type": { + "$id": "3077", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "3078", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "3079", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "3080", + "type": { + "$id": "3081", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "3082", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "3083", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "3084", + "site": { + "$id": "3085", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-2" + } + } + }, + "systemData": { + "$id": "3086", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "3087", + "createdBy": { + "$id": "3088", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "3089", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3090", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "3091", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "3092", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3093", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "3094", + "kind": "model", + "type": { + "$ref": "194" + }, + "value": { + "$id": "3095", + "uuid": { + "$id": "3096", + "kind": "string", + "type": { + "$ref": "196" + }, + "value": "1824a74f-21e1-4458-ae07-604d3a241d2e" + }, + "targetAddress": { + "$id": "3097", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "https://www.example.com/myTargetAddress2" + }, + "endpointProfileType": { + "$id": "3098", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "3099", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "3100", + "method": { + "$id": "3101", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "UsernamePassword" + }, + "usernamePasswordCredentials": { + "$id": "3102", + "kind": "model", + "type": { + "$ref": "213" + }, + "value": { + "$id": "3103", + "usernameSecretName": { + "$id": "3104", + "kind": "string", + "type": { + "$ref": "215" + }, + "value": "usernameRef" + }, + "passwordSecretName": { + "$id": "3105", + "kind": "string", + "type": { + "$ref": "219" + }, + "value": "passwordRef" + } + } + } + } + }, + "provisioningState": { + "$id": "3106", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "3107", + "Name": "listBySubscription", + "ResourceName": "AssetEndpointProfile", + "Doc": "List AssetEndpointProfile resources by subscription ID", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3108", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "3109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3110", + "Type": { + "$id": "3111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3112", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "3113", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3115", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3116", + "kind": "constant", + "valueType": { + "$id": "3117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3118", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "327" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles", + "BufferResponse": true, + "Paging": { + "$id": "3119", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "3120", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfiles.listBySubscription", + "Decorators": [], + "Examples": [ + { + "$id": "3121", + "kind": "http", + "name": "List_AssetEndpointProfiles_Subscription", + "description": "List_AssetEndpointProfiles_Subscription", + "filePath": "2024-11-01/List_AssetEndpointProfiles_Subscription.json", + "parameters": [ + { + "$id": "3122", + "parameter": { + "$ref": "3108" + }, + "value": { + "$id": "3123", + "kind": "string", + "type": { + "$ref": "3109" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3124", + "parameter": { + "$ref": "3112" + }, + "value": { + "$id": "3125", + "kind": "string", + "type": { + "$ref": "3113" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3126", + "response": { + "$ref": "3118" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3127", + "kind": "model", + "type": { + "$ref": "327" + }, + "value": { + "$id": "3128", + "value": { + "$id": "3129", + "kind": "array", + "type": { + "$ref": "329" + }, + "value": [ + { + "$id": "3130", + "kind": "model", + "type": { + "$ref": "181" + }, + "value": { + "$id": "3131", + "id": { + "$id": "3132", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile" + }, + "name": { + "$id": "3133", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-assetendpointprofile" + }, + "type": { + "$id": "3134", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "3135", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "3136", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "3137", + "type": { + "$id": "3138", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "3139", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "3140", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "3141", + "site": { + "$id": "3142", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-1" + } + } + }, + "systemData": { + "$id": "3143", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "3144", + "createdBy": { + "$id": "3145", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "3146", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3147", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "3148", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "3149", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3150", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "3151", + "kind": "model", + "type": { + "$ref": "194" + }, + "value": { + "$id": "3152", + "uuid": { + "$id": "3153", + "kind": "string", + "type": { + "$ref": "196" + }, + "value": "0796f7c1-f2c8-44d7-9f5b-9a6f9522a85d" + }, + "targetAddress": { + "$id": "3154", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "https://www.example.com/myTargetAddress" + }, + "endpointProfileType": { + "$id": "3155", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "3156", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "3157", + "method": { + "$id": "3158", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Anonymous" + } + } + }, + "provisioningState": { + "$id": "3159", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "3160", + "kind": "model", + "type": { + "$ref": "181" + }, + "value": { + "$id": "3161", + "id": { + "$id": "3162", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile1" + }, + "name": { + "$id": "3163", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-assetendpointprofile1" + }, + "type": { + "$id": "3164", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "3165", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "3166", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "3167", + "type": { + "$id": "3168", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "3169", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "3170", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "3171", + "site": { + "$id": "3172", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-2" + } + } + }, + "systemData": { + "$id": "3173", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "3174", + "createdBy": { + "$id": "3175", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "3176", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3177", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "3178", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "3179", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3180", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "3181", + "kind": "model", + "type": { + "$ref": "194" + }, + "value": { + "$id": "3182", + "uuid": { + "$id": "3183", + "kind": "string", + "type": { + "$ref": "196" + }, + "value": "7824a74f-21e1-4458-ae06-604d3a241d2c" + }, + "targetAddress": { + "$id": "3184", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "https://www.example.com/myTargetAddress1" + }, + "endpointProfileType": { + "$id": "3185", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "3186", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "3187", + "method": { + "$id": "3188", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "Certificate" + }, + "x509Credentials": { + "$id": "3189", + "kind": "model", + "type": { + "$ref": "225" + }, + "value": { + "$id": "3190", + "certificateSecretName": { + "$id": "3191", + "kind": "string", + "type": { + "$ref": "227" + }, + "value": "certificatRef" + } + } + } + } + }, + "provisioningState": { + "$id": "3192", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "3193", + "kind": "model", + "type": { + "$ref": "181" + }, + "value": { + "$id": "3194", + "id": { + "$id": "3195", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/my-assetendpointprofile2" + }, + "name": { + "$id": "3196", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-assetendpointprofile2" + }, + "type": { + "$id": "3197", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/assetEndpointProfiles" + }, + "location": { + "$id": "3198", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "West Europe" + }, + "extendedLocation": { + "$id": "3199", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "3200", + "type": { + "$id": "3201", + "kind": "string", + "type": { + "$ref": "267" + }, + "value": "CustomLocation" + }, + "name": { + "$id": "3202", + "kind": "string", + "type": { + "$ref": "271" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1" + } + } + }, + "tags": { + "$id": "3203", + "kind": "dict", + "type": { + "$ref": "184" + }, + "value": { + "$id": "3204", + "site": { + "$id": "3205", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "building-2" + } + } + }, + "systemData": { + "$id": "3206", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "3207", + "createdBy": { + "$id": "3208", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "createdByType": { + "$id": "3209", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3210", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2022-11-16T00:36:43.2516899Z" + }, + "lastModifiedBy": { + "$id": "3211", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "2ta23112-4596-44ff-b773-19405922bfc1" + }, + "lastModifiedByType": { + "$id": "3212", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3213", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2022-11-16T01:37:16.0922793Z" + } + } + }, + "properties": { + "$id": "3214", + "kind": "model", + "type": { + "$ref": "194" + }, + "value": { + "$id": "3215", + "uuid": { + "$id": "3216", + "kind": "string", + "type": { + "$ref": "196" + }, + "value": "1824a74f-21e1-4458-ae07-604d3a241d2e" + }, + "targetAddress": { + "$id": "3217", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "https://www.example.com/myTargetAddress2" + }, + "endpointProfileType": { + "$id": "3218", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "myEndpointProfileType" + }, + "authentication": { + "$id": "3219", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "3220", + "method": { + "$id": "3221", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "UsernamePassword" + }, + "usernamePasswordCredentials": { + "$id": "3222", + "kind": "model", + "type": { + "$ref": "213" + }, + "value": { + "$id": "3223", + "usernameSecretName": { + "$id": "3224", + "kind": "string", + "type": { + "$ref": "215" + }, + "value": "usernameRef" + }, + "passwordSecretName": { + "$id": "3225", + "kind": "string", + "type": { + "$ref": "219" + }, + "value": "passwordRef" + } + } + } + } + }, + "provisioningState": { + "$id": "3226", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "3227" + }, + "Parent": "DeviceRegistryClient", + "Parameters": [ + { + "$id": "3228", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "3229", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3230", + "Type": { + "$id": "3231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.AssetEndpointProfiles" + }, + { + "$id": "3232", + "Name": "BillingContainers", + "Namespace": "Microsoft.DeviceRegistry", + "Operations": [ + { + "$id": "3233", + "Name": "get", + "ResourceName": "BillingContainer", + "Doc": "Get a BillingContainer", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3234", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "3235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3236", + "Type": { + "$id": "3237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3238", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "3239", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3241", + "Name": "billingContainerName", + "NameInRequest": "billingContainerName", + "Doc": "Name of the billing container.", + "Type": { + "$id": "3242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3243", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3244", + "kind": "constant", + "valueType": { + "$id": "3245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3246", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "80" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/billingContainers/{billingContainerName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainers.get", + "Decorators": [], + "Examples": [ + { + "$id": "3247", + "kind": "http", + "name": "Get_BillingContainer", + "description": "Get_BillingContainer", + "filePath": "2024-11-01/Get_BillingContainer.json", + "parameters": [ + { + "$id": "3248", + "parameter": { + "$ref": "3234" + }, + "value": { + "$id": "3249", + "kind": "string", + "type": { + "$ref": "3235" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3250", + "parameter": { + "$ref": "3238" + }, + "value": { + "$id": "3251", + "kind": "string", + "type": { + "$ref": "3239" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3252", + "parameter": { + "$ref": "3241" + }, + "value": { + "$id": "3253", + "kind": "string", + "type": { + "$ref": "3242" + }, + "value": "my-billingContainer" + } + } + ], + "responses": [ + { + "$id": "3254", + "response": { + "$ref": "3246" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3255", + "kind": "model", + "type": { + "$ref": "80" + }, + "value": { + "$id": "3256", + "id": { + "$id": "3257", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DeviceRegistry/billingContainers/my-billingContainer" + }, + "name": { + "$id": "3258", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-billingContainer" + }, + "type": { + "$id": "3259", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/billingcontainers" + }, + "etag": { + "$id": "3260", + "kind": "string", + "type": { + "$ref": "133" + }, + "value": "\"00001300-0000-0100-0000-6671f0170000\"" + }, + "systemData": { + "$id": "3261", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "3262", + "createdBy": { + "$id": "3263", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "0e1b4448-67b9-46a1-8158-e3dade4c008e" + }, + "createdByType": { + "$id": "3264", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3265", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2024-05-20T21:51:21.169954Z" + }, + "lastModifiedBy": { + "$id": "3266", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "0e1b4448-67b9-46a1-8158-e3dade4c008e" + }, + "lastModifiedByType": { + "$id": "3267", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3268", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2024-06-18T20:37:41.9371846Z" + } + } + }, + "properties": { + "$id": "3269", + "kind": "model", + "type": { + "$ref": "126" + }, + "value": { + "$id": "3270", + "provisioningState": { + "$id": "3271", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "3272", + "Name": "listBySubscription", + "ResourceName": "BillingContainer", + "Doc": "List BillingContainer resources by subscription ID", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3273", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "3274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3275", + "Type": { + "$id": "3276", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-11-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3277", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "3278", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3280", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3281", + "kind": "constant", + "valueType": { + "$id": "3282", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3283", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "171" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/billingContainers", + "BufferResponse": true, + "Paging": { + "$id": "3284", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "3285", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainers.listBySubscription", + "Decorators": [], + "Examples": [ + { + "$id": "3286", + "kind": "http", + "name": "List_BillingContainers_Subscription", + "description": "List_BillingContainers_Subscription", + "filePath": "2024-11-01/List_BillingContainers_Subscription.json", + "parameters": [ + { + "$id": "3287", + "parameter": { + "$ref": "3273" + }, + "value": { + "$id": "3288", + "kind": "string", + "type": { + "$ref": "3274" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3289", + "parameter": { + "$ref": "3277" + }, + "value": { + "$id": "3290", + "kind": "string", + "type": { + "$ref": "3278" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3291", + "response": { + "$ref": "3283" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3292", + "kind": "model", + "type": { + "$ref": "171" + }, + "value": { + "$id": "3293", + "value": { + "$id": "3294", + "kind": "array", + "type": { + "$ref": "173" + }, + "value": [ + { + "$id": "3295", + "kind": "model", + "type": { + "$ref": "80" + }, + "value": { + "$id": "3296", + "id": { + "$id": "3297", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DeviceRegistry/billingContainers/my-billingContainer1" + }, + "name": { + "$id": "3298", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-billingContainer1" + }, + "type": { + "$id": "3299", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/billingcontainers" + }, + "etag": { + "$id": "3300", + "kind": "string", + "type": { + "$ref": "133" + }, + "value": "\"4b036688-0000-0100-0000-6632c7bf0000\"" + }, + "systemData": { + "$id": "3301", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "3302", + "createdBy": { + "$id": "3303", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "0e1b4448-67b9-46a1-8158-e3dade4c008e" + }, + "createdByType": { + "$id": "3304", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3305", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2024-05-01T22:52:46.0165055Z" + }, + "lastModifiedBy": { + "$id": "3306", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "0e1b4448-67b9-46a1-8158-e3dade4c008e" + }, + "lastModifiedByType": { + "$id": "3307", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3308", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2024-05-01T22:52:46.0165055Z" + } + } + }, + "properties": { + "$id": "3309", + "kind": "model", + "type": { + "$ref": "126" + }, + "value": { + "$id": "3310", + "provisioningState": { + "$id": "3311", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + }, + { + "$id": "3312", + "kind": "model", + "type": { + "$ref": "80" + }, + "value": { + "$id": "3313", + "id": { + "$id": "3314", + "kind": "string", + "type": { + "$ref": "84" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DeviceRegistry/billingContainers/my-billingContainer2" + }, + "name": { + "$id": "3315", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "my-billingContainer2" + }, + "type": { + "$id": "3316", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Microsoft.DeviceRegistry/billingcontainers" + }, + "etag": { + "$id": "3317", + "kind": "string", + "type": { + "$ref": "133" + }, + "value": "\"4e03ed61-0000-0100-0000-6632d7200000\"" + }, + "systemData": { + "$id": "3318", + "kind": "model", + "type": { + "$ref": "98" + }, + "value": { + "$id": "3319", + "createdBy": { + "$id": "3320", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "0e1b4448-67b9-46a1-8158-e3dade4c008e" + }, + "createdByType": { + "$id": "3321", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "createdAt": { + "$id": "3322", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "2024-05-01T23:58:23.3213061Z" + }, + "lastModifiedBy": { + "$id": "3323", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "0e1b4448-67b9-46a1-8158-e3dade4c008e" + }, + "lastModifiedByType": { + "$id": "3324", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Application" + }, + "lastModifiedAt": { + "$id": "3325", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2024-05-01T23:58:23.3213061Z" + } + } + }, + "properties": { + "$id": "3326", + "kind": "model", + "type": { + "$ref": "126" + }, + "value": { + "$id": "3327", + "provisioningState": { + "$id": "3328", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "3329" + }, + "Parent": "DeviceRegistryClient", + "Parameters": [ + { + "$id": "3330", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "3331", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3332", + "Type": { + "$id": "3333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.DeviceRegistry.BillingContainers" + } + ], + "Auth": { + "$id": "3334", + "OAuth2": { + "$id": "3335", + "Scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.net8.0.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.net8.0.cs index 86448afdc637..257cbf40ba48 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.net8.0.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.net8.0.cs @@ -2,6 +2,8 @@ namespace Azure.ResourceManager.DevOpsInfrastructure { public static partial class DevOpsInfrastructureExtensions { + public static Azure.Response CheckNameAvailabilityPool(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CheckNameAvailabilityPoolAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetDevOpsPool(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDevOpsPoolAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.DevOpsPoolResource GetDevOpsPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -91,6 +93,8 @@ protected MockableDevOpsInfrastructureResourceGroupResource() { } public partial class MockableDevOpsInfrastructureSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableDevOpsInfrastructureSubscriptionResource() { } + public virtual Azure.Response CheckNameAvailabilityPool(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CheckNameAvailabilityPoolAsync(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetDevOpsPools(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDevOpsPoolsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSkusByLocation(string locationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -103,6 +107,7 @@ namespace Azure.ResourceManager.DevOpsInfrastructure.Models { public static partial class ArmDevOpsInfrastructureModelFactory { + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityResult CheckNameAvailabilityResult(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus available = default(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus), string message = null, string name = null, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason reason = default(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason)) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsImageVersion DevOpsImageVersion(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string imageVersion = null) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.DevOpsPoolData DevOpsPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsPoolProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceDetails DevOpsResourceDetails(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceDetailsProperties properties = null) { throw null; } @@ -128,6 +133,86 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AvailabilityStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AvailabilityStatus(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus Available { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus Unavailable { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus 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.DevOpsInfrastructure.Models.AvailabilityStatus left, Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus left, Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CertificateStoreNameOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CertificateStoreNameOption(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption My { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption Root { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption 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.DevOpsInfrastructure.Models.CertificateStoreNameOption left, Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption left, Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CheckNameAvailability : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CheckNameAvailability(string name, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType type) { } + public string Name { get { throw null; } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CheckNameAvailabilityReason : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CheckNameAvailabilityReason(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason AlreadyExists { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason Invalid { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason 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.DevOpsInfrastructure.Models.CheckNameAvailabilityReason left, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason left, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CheckNameAvailabilityResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CheckNameAvailabilityResult() { } + public Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus Available { get { throw null; } } + public string Message { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DevOpsAzureOrganizationProfile : Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsOrganizationProfile, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevOpsAzureOrganizationProfile(System.Collections.Generic.IEnumerable organizations) { } @@ -284,6 +369,23 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevOpsInfrastructureResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevOpsInfrastructureResourceType(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType MicrosoftDevOpsInfrastructurePools { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType 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.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType left, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType left, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DevOpsLogonType : System.IEquatable { private readonly object _dummy; @@ -304,6 +406,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class DevOpsOrganization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevOpsOrganization(System.Uri uri) { } + public bool? OpenAccess { get { throw null; } set { } } public int? Parallelism { get { throw null; } set { } } public System.Collections.Generic.IList Projects { get { throw null; } } public System.Uri Uri { get { throw null; } set { } } @@ -382,6 +485,7 @@ public partial class DevOpsPoolVmImage : System.ClientModel.Primitives.IJsonMode public DevOpsPoolVmImage() { } public System.Collections.Generic.IList Aliases { get { throw null; } } public string Buffer { get { throw null; } set { } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType? EphemeralType { get { throw null; } set { } } public string ResourceId { get { throw null; } set { } } public string WellKnownImageName { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -568,6 +672,25 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EphemeralType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EphemeralType(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType Automatic { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType CacheDisk { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType ResourceDisk { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType 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.DevOpsInfrastructure.Models.EphemeralType left, Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType left, Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ManualResourcePredictionsProfile : Azure.ResourceManager.DevOpsInfrastructure.Models.ResourcePredictionsProfile, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManualResourcePredictionsProfile() { } @@ -757,6 +880,7 @@ public partial class SecretsManagementSettings : System.ClientModel.Primitives.I { public SecretsManagementSettings(System.Collections.Generic.IEnumerable observedCertificates, bool keyExportable) { } public string CertificateStoreLocation { get { throw null; } set { } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption? CertificateStoreName { get { throw null; } set { } } public bool KeyExportable { get { throw null; } set { } } public System.Collections.Generic.IList ObservedCertificates { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.netstandard2.0.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.netstandard2.0.cs index 86448afdc637..257cbf40ba48 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.netstandard2.0.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/api/Azure.ResourceManager.DevOpsInfrastructure.netstandard2.0.cs @@ -2,6 +2,8 @@ namespace Azure.ResourceManager.DevOpsInfrastructure { public static partial class DevOpsInfrastructureExtensions { + public static Azure.Response CheckNameAvailabilityPool(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CheckNameAvailabilityPoolAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetDevOpsPool(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDevOpsPoolAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.DevOpsPoolResource GetDevOpsPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -91,6 +93,8 @@ protected MockableDevOpsInfrastructureResourceGroupResource() { } public partial class MockableDevOpsInfrastructureSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableDevOpsInfrastructureSubscriptionResource() { } + public virtual Azure.Response CheckNameAvailabilityPool(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CheckNameAvailabilityPoolAsync(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetDevOpsPools(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDevOpsPoolsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSkusByLocation(string locationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -103,6 +107,7 @@ namespace Azure.ResourceManager.DevOpsInfrastructure.Models { public static partial class ArmDevOpsInfrastructureModelFactory { + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityResult CheckNameAvailabilityResult(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus available = default(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus), string message = null, string name = null, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason reason = default(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason)) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsImageVersion DevOpsImageVersion(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string imageVersion = null) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.DevOpsPoolData DevOpsPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsPoolProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceDetails DevOpsResourceDetails(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsResourceDetailsProperties properties = null) { throw null; } @@ -128,6 +133,86 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AvailabilityStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AvailabilityStatus(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus Available { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus Unavailable { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus 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.DevOpsInfrastructure.Models.AvailabilityStatus left, Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus left, Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CertificateStoreNameOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CertificateStoreNameOption(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption My { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption Root { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption 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.DevOpsInfrastructure.Models.CertificateStoreNameOption left, Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption left, Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CheckNameAvailability : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CheckNameAvailability(string name, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType type) { } + public string Name { get { throw null; } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CheckNameAvailabilityReason : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CheckNameAvailabilityReason(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason AlreadyExists { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason Invalid { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason 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.DevOpsInfrastructure.Models.CheckNameAvailabilityReason left, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason left, Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CheckNameAvailabilityResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CheckNameAvailabilityResult() { } + public Azure.ResourceManager.DevOpsInfrastructure.Models.AvailabilityStatus Available { get { throw null; } } + public string Message { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityReason Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DevOpsInfrastructure.Models.CheckNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DevOpsAzureOrganizationProfile : Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsOrganizationProfile, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevOpsAzureOrganizationProfile(System.Collections.Generic.IEnumerable organizations) { } @@ -284,6 +369,23 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevOpsInfrastructureResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevOpsInfrastructureResourceType(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType MicrosoftDevOpsInfrastructurePools { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType 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.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType left, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType left, Azure.ResourceManager.DevOpsInfrastructure.Models.DevOpsInfrastructureResourceType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DevOpsLogonType : System.IEquatable { private readonly object _dummy; @@ -304,6 +406,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class DevOpsOrganization : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevOpsOrganization(System.Uri uri) { } + public bool? OpenAccess { get { throw null; } set { } } public int? Parallelism { get { throw null; } set { } } public System.Collections.Generic.IList Projects { get { throw null; } } public System.Uri Uri { get { throw null; } set { } } @@ -382,6 +485,7 @@ public partial class DevOpsPoolVmImage : System.ClientModel.Primitives.IJsonMode public DevOpsPoolVmImage() { } public System.Collections.Generic.IList Aliases { get { throw null; } } public string Buffer { get { throw null; } set { } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType? EphemeralType { get { throw null; } set { } } public string ResourceId { get { throw null; } set { } } public string WellKnownImageName { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -568,6 +672,25 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EphemeralType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EphemeralType(string value) { throw null; } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType Automatic { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType CacheDisk { get { throw null; } } + public static Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType ResourceDisk { get { throw null; } } + public bool Equals(Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType 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.DevOpsInfrastructure.Models.EphemeralType left, Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType right) { throw null; } + public static implicit operator Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType left, Azure.ResourceManager.DevOpsInfrastructure.Models.EphemeralType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ManualResourcePredictionsProfile : Azure.ResourceManager.DevOpsInfrastructure.Models.ResourcePredictionsProfile, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManualResourcePredictionsProfile() { } @@ -757,6 +880,7 @@ public partial class SecretsManagementSettings : System.ClientModel.Primitives.I { public SecretsManagementSettings(System.Collections.Generic.IEnumerable observedCertificates, bool keyExportable) { } public string CertificateStoreLocation { get { throw null; } set { } } + public Azure.ResourceManager.DevOpsInfrastructure.Models.CertificateStoreNameOption? CertificateStoreName { get { throw null; } set { } } public bool KeyExportable { get { throw null; } set { } } public System.Collections.Generic.IList ObservedCertificates { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs index c380856cbc2a..5a0bb2ef594f 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_DevOpsPoolCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PoolsCreateOrUpdate() { - // Generated from example definition: 2024-10-19/CreateOrUpdatePool.json + // Generated from example definition: 2025-01-21/CreateOrUpdatePool.json // this example is just showing the usage of "Pool_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -46,13 +46,26 @@ public async Task CreateOrUpdate_PoolsCreateOrUpdate() Properties = new DevOpsPoolProperties(10, new DevOpsAzureOrganizationProfile(new DevOpsOrganization[] { new DevOpsOrganization(new Uri("https://mseng.visualstudio.com")) +{ +OpenAccess = true, +} }), new DevOpsStatelessAgentProfile(), new DevOpsVmssFabricProfile(new DevOpsAzureSku("Standard_D4ads_v5"), new DevOpsPoolVmImage[] { new DevOpsPoolVmImage { ResourceId = "/MicrosoftWindowsServer/WindowsServer/2019-Datacenter/latest", +EphemeralType = EphemeralType.Automatic, } - }), "/subscriptions/222e81d0-cf38-4dab-baa5-289bf16baaa4/resourceGroups/rg-1es-devcenter/providers/Microsoft.DevCenter/projects/1ES") + }) + { + OSProfile = new DevOpsOSProfile + { + SecretsManagementSettings = new SecretsManagementSettings(new Uri[] { new Uri("https://abc.vault.azure.net/secrets/one") }, false) + { + CertificateStoreName = CertificateStoreNameOption.Root, + }, + }, + }, "/subscriptions/222e81d0-cf38-4dab-baa5-289bf16baaa4/resourceGroups/rg-1es-devcenter/providers/Microsoft.DevCenter/projects/1ES") { ProvisioningState = DevOpsInfrastructureProvisioningState.Succeeded, }, @@ -71,7 +84,7 @@ public async Task CreateOrUpdate_PoolsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_PoolsGet() { - // Generated from example definition: 2024-10-19/GetPool.json + // Generated from example definition: 2025-01-21/GetPool.json // this example is just showing the usage of "Pool_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,7 +117,7 @@ public async Task Get_PoolsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PoolsListByResourceGroup() { - // Generated from example definition: 2024-10-19/ListPoolsBySubscriptionAndResourceGroup.json + // Generated from example definition: 2025-01-21/ListPoolsBySubscriptionAndResourceGroup.json // this example is just showing the usage of "Pool_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,7 +152,7 @@ public async Task GetAll_PoolsListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_PoolsGet() { - // Generated from example definition: 2024-10-19/GetPool.json + // Generated from example definition: 2025-01-21/GetPool.json // this example is just showing the usage of "Pool_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +181,7 @@ public async Task Exists_PoolsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PoolsGet() { - // Generated from example definition: 2024-10-19/GetPool.json + // Generated from example definition: 2025-01-21/GetPool.json // this example is just showing the usage of "Pool_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs index a4b685804527..35b6bc86998c 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_DevOpsPoolResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DevOpsPoolResource [Ignore("Only validating compilation of examples")] public async Task Get_PoolsGet() { - // Generated from example definition: 2024-10-19/GetPool.json + // Generated from example definition: 2025-01-21/GetPool.json // this example is just showing the usage of "Pool_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_PoolsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PoolsDelete() { - // Generated from example definition: 2024-10-19/DeletePool.json + // Generated from example definition: 2025-01-21/DeletePool.json // this example is just showing the usage of "Pool_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task Delete_PoolsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PoolsUpdate() { - // Generated from example definition: 2024-10-19/UpdatePool.json + // Generated from example definition: 2025-01-21/UpdatePool.json // this example is just showing the usage of "Pool_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -108,7 +108,7 @@ public async Task Update_PoolsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetResourceDetails_ResourceDetailsListByPool() { - // Generated from example definition: 2024-10-19/ResourceDetails_ListByPool.json + // Generated from example definition: 2025-01-21/ResourceDetails_ListByPool.json // this example is just showing the usage of "ResourceDetailsObject_ListByPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs index b3f54cb97955..812ebf638b70 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_ResourceGroupResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetImageVersionsByImage_ImageVersionsListByImage() { - // Generated from example definition: 2024-10-19/ImageVersions_ListByImage.json + // Generated from example definition: 2025-01-21/ImageVersions_ListByImage.json // this example is just showing the usage of "ImageVersion_ListByImage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 97546467a4f7..bf121c2d49c4 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetDevOpsPools_PoolsListBySubscription() { - // Generated from example definition: 2024-10-19/ListPoolsBySubscription.json + // Generated from example definition: 2025-01-21/ListPoolsBySubscription.json // this example is just showing the usage of "Pool_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,11 +48,36 @@ public async Task GetDevOpsPools_PoolsListBySubscription() Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CheckNameAvailabilityPool_PoolsCheckNameAvailability() + { + // Generated from example definition: 2025-01-21/Pools_CheckNameAvailability.json + // this example is just showing the usage of "Pools_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "a2e95d27-c161-4b61-bda4-11512c14c2c2"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + CheckNameAvailability body = new CheckNameAvailability("mydevopspool", DevOpsInfrastructureResourceType.MicrosoftDevOpsInfrastructurePools); + CheckNameAvailabilityResult result = await subscriptionResource.CheckNameAvailabilityPoolAsync(body); + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetSkusByLocation_SkuListByLocation() { - // Generated from example definition: 2024-10-19/Sku_ListByLocation.json + // Generated from example definition: 2025-01-21/Sku_ListByLocation.json // this example is just showing the usage of "ResourceSku_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +105,7 @@ public async Task GetSkusByLocation_SkuListByLocation() [Ignore("Only validating compilation of examples")] public async Task GetUsages_SubscriptionUsagesUsages() { - // Generated from example definition: 2024-10-19/SubscriptionUsages_Usages.json + // Generated from example definition: 2025-01-21/SubscriptionUsages_Usages.json // this example is just showing the usage of "SubscriptionUsages_GetUsages" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/ArmDevOpsInfrastructureModelFactory.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/ArmDevOpsInfrastructureModelFactory.cs index b6121565a165..06c09857f702 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/ArmDevOpsInfrastructureModelFactory.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/ArmDevOpsInfrastructureModelFactory.cs @@ -220,5 +220,16 @@ public static DevOpsPoolData DevOpsPoolData(ResourceIdentifier id = null, string identity, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// Availability status of the name. + /// A message explaining why the name is unavailable. Will be null if the name is available. + /// The name whose availability was checked. + /// The reason code explaining why the name is unavailable. Will be null if the name is available. + /// A new instance for mocking. + public static CheckNameAvailabilityResult CheckNameAvailabilityResult(AvailabilityStatus available = default, string message = null, string name = null, CheckNameAvailabilityReason reason = default) + { + return new CheckNameAvailabilityResult(available, message, name, reason, serializedAdditionalRawData: null); + } } } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolCollection.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolCollection.cs index 1e2ea411a868..7373fd2c720c 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolCollection.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string poolName /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string poolName, CancellationTok /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string poolName, Cancellat /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string poolName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.cs index a3b6aeebb638..cd7b24c30bf8 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.cs @@ -108,7 +108,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -148,7 +148,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateAsync(WaitUnti /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, DevO /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -390,7 +390,7 @@ public virtual AsyncPageable GetResourceDetailsAsync(Canc /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -416,7 +416,7 @@ public virtual Pageable GetResourceDetails(CancellationTo /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -478,7 +478,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -540,7 +540,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -597,7 +597,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -654,7 +654,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -714,7 +714,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/DevOpsInfrastructureExtensions.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/DevOpsInfrastructureExtensions.cs index 3e3e44d9dcd3..a85b1cb206f9 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/DevOpsInfrastructureExtensions.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/DevOpsInfrastructureExtensions.cs @@ -82,7 +82,7 @@ public static DevOpsPoolCollection GetDevOpsPools(this ResourceGroupResource res /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -120,7 +120,7 @@ public static async Task> GetDevOpsPoolAsync(this R /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -158,7 +158,7 @@ public static Response GetDevOpsPool(this ResourceGroupResou /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -192,7 +192,7 @@ public static AsyncPageable GetImageVersionsByImageAsync(thi /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -226,7 +226,7 @@ public static Pageable GetImageVersionsByImage(this Resource /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -262,7 +262,7 @@ public static AsyncPageable GetDevOpsPoolsAsync(this Subscri /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -285,6 +285,78 @@ public static Pageable GetDevOpsPools(this SubscriptionResou return GetMockableDevOpsInfrastructureSubscriptionResource(subscriptionResource).GetDevOpsPools(cancellationToken); } + /// + /// Checks that the pool name is valid and is not already in use. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevOpsInfrastructure/checkNameAvailability + /// + /// + /// Operation Id + /// Pools_CheckNameAvailability + /// + /// + /// Default Api Version + /// 2025-01-21 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The CheckAvailability request. + /// The cancellation token to use. + /// or is null. + public static async Task> CheckNameAvailabilityPoolAsync(this SubscriptionResource subscriptionResource, CheckNameAvailability body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableDevOpsInfrastructureSubscriptionResource(subscriptionResource).CheckNameAvailabilityPoolAsync(body, cancellationToken).ConfigureAwait(false); + } + + /// + /// Checks that the pool name is valid and is not already in use. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevOpsInfrastructure/checkNameAvailability + /// + /// + /// Operation Id + /// Pools_CheckNameAvailability + /// + /// + /// Default Api Version + /// 2025-01-21 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The CheckAvailability request. + /// The cancellation token to use. + /// or is null. + public static Response CheckNameAvailabilityPool(this SubscriptionResource subscriptionResource, CheckNameAvailability body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDevOpsInfrastructureSubscriptionResource(subscriptionResource).CheckNameAvailabilityPool(body, cancellationToken); + } + /// /// List ResourceSku resources by subscription ID /// @@ -298,7 +370,7 @@ public static Pageable GetDevOpsPools(this SubscriptionResou /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -332,7 +404,7 @@ public static AsyncPageable GetSkusByLocationAsync(this Subsc /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -366,7 +438,7 @@ public static Pageable GetSkusByLocation(this SubscriptionRes /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -399,7 +471,7 @@ public static AsyncPageable GetUsagesAsync(this Subscriptio /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureResourceGroupResource.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureResourceGroupResource.cs index fbfc1fee6226..f5787074c63d 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureResourceGroupResource.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureResourceGroupResource.cs @@ -62,7 +62,7 @@ public virtual DevOpsPoolCollection GetDevOpsPools() /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -93,7 +93,7 @@ public virtual async Task> GetDevOpsPoolAsync(strin /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -124,7 +124,7 @@ public virtual Response GetDevOpsPool(string poolName, Cance /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -155,7 +155,7 @@ public virtual AsyncPageable GetImageVersionsByImageAsync(st /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureSubscriptionResource.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureSubscriptionResource.cs index 224f919ee0d4..f8f46cdffa0e 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureSubscriptionResource.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Extensions/MockableDevOpsInfrastructureSubscriptionResource.cs @@ -7,6 +7,7 @@ using System; using System.Threading; +using System.Threading.Tasks; using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; @@ -62,7 +63,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -92,7 +93,7 @@ public virtual AsyncPageable GetDevOpsPoolsAsync(Cancellatio /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// Resource @@ -109,6 +110,90 @@ public virtual Pageable GetDevOpsPools(CancellationToken can return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevOpsPoolResource(Client, DevOpsPoolData.DeserializeDevOpsPoolData(e)), DevOpsPoolPoolsClientDiagnostics, Pipeline, "MockableDevOpsInfrastructureSubscriptionResource.GetDevOpsPools", "value", "nextLink", cancellationToken); } + /// + /// Checks that the pool name is valid and is not already in use. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevOpsInfrastructure/checkNameAvailability + /// + /// + /// Operation Id + /// Pools_CheckNameAvailability + /// + /// + /// Default Api Version + /// 2025-01-21 + /// + /// + /// Resource + /// + /// + /// + /// + /// The CheckAvailability request. + /// The cancellation token to use. + /// is null. + public virtual async Task> CheckNameAvailabilityPoolAsync(CheckNameAvailability body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = DevOpsPoolPoolsClientDiagnostics.CreateScope("MockableDevOpsInfrastructureSubscriptionResource.CheckNameAvailabilityPool"); + scope.Start(); + try + { + var response = await DevOpsPoolPoolsRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, body, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks that the pool name is valid and is not already in use. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DevOpsInfrastructure/checkNameAvailability + /// + /// + /// Operation Id + /// Pools_CheckNameAvailability + /// + /// + /// Default Api Version + /// 2025-01-21 + /// + /// + /// Resource + /// + /// + /// + /// + /// The CheckAvailability request. + /// The cancellation token to use. + /// is null. + public virtual Response CheckNameAvailabilityPool(CheckNameAvailability body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = DevOpsPoolPoolsClientDiagnostics.CreateScope("MockableDevOpsInfrastructureSubscriptionResource.CheckNameAvailabilityPool"); + scope.Start(); + try + { + var response = DevOpsPoolPoolsRestClient.CheckNameAvailability(Id.SubscriptionId, body, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// List ResourceSku resources by subscription ID /// @@ -122,7 +207,7 @@ public virtual Pageable GetDevOpsPools(CancellationToken can /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -153,7 +238,7 @@ public virtual AsyncPageable GetSkusByLocationAsync(string lo /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -184,7 +269,7 @@ public virtual Pageable GetSkusByLocation(string locationName /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// @@ -211,7 +296,7 @@ public virtual AsyncPageable GetUsagesAsync(AzureLocation l /// /// /// Default Api Version - /// 2024-10-19 + /// 2025-01-21 /// /// /// diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/AvailabilityStatus.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/AvailabilityStatus.cs new file mode 100644 index 000000000000..6d18aa34fb56 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/AvailabilityStatus.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.DevOpsInfrastructure.Models +{ + /// AvailabilityStatus of a name. + public readonly partial struct AvailabilityStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AvailabilityStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AvailableValue = "Available"; + private const string UnavailableValue = "Unavailable"; + + /// The name is available. + public static AvailabilityStatus Available { get; } = new AvailabilityStatus(AvailableValue); + /// The name is unavailable. + public static AvailabilityStatus Unavailable { get; } = new AvailabilityStatus(UnavailableValue); + /// Determines if two values are the same. + public static bool operator ==(AvailabilityStatus left, AvailabilityStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AvailabilityStatus left, AvailabilityStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AvailabilityStatus(string value) => new AvailabilityStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AvailabilityStatus other && Equals(other); + /// + public bool Equals(AvailabilityStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CertificateStoreNameOption.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CertificateStoreNameOption.cs new file mode 100644 index 000000000000..5027fb886be1 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CertificateStoreNameOption.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.DevOpsInfrastructure.Models +{ + /// The certificate store name type. + public readonly partial struct CertificateStoreNameOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CertificateStoreNameOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MyValue = "My"; + private const string RootValue = "Root"; + + /// The X.509 certificate store for personal certificates. + public static CertificateStoreNameOption My { get; } = new CertificateStoreNameOption(MyValue); + /// The X.509 certificate store for trusted root certificate authorities (CAs). + public static CertificateStoreNameOption Root { get; } = new CertificateStoreNameOption(RootValue); + /// Determines if two values are the same. + public static bool operator ==(CertificateStoreNameOption left, CertificateStoreNameOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CertificateStoreNameOption left, CertificateStoreNameOption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CertificateStoreNameOption(string value) => new CertificateStoreNameOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CertificateStoreNameOption other && Equals(other); + /// + public bool Equals(CertificateStoreNameOption other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailability.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailability.Serialization.cs new file mode 100644 index 000000000000..f00d4133e584 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailability.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevOpsInfrastructure.Models +{ + public partial class CheckNameAvailability : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CheckNameAvailability)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CheckNameAvailability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CheckNameAvailability)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCheckNameAvailability(document.RootElement, options); + } + + internal static CheckNameAvailability DeserializeCheckNameAvailability(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + DevOpsInfrastructureResourceType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new DevOpsInfrastructureResourceType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CheckNameAvailability(name, type, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CheckNameAvailability)} does not support writing '{options.Format}' format."); + } + } + + CheckNameAvailability IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCheckNameAvailability(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CheckNameAvailability)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailability.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailability.cs new file mode 100644 index 000000000000..62c886d554e5 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailability.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevOpsInfrastructure.Models +{ + /// The parameters used to check the availability of a resource. + public partial class CheckNameAvailability + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the resource. + /// The type of resource that is used as the scope of the availability check. + /// is null. + public CheckNameAvailability(string name, DevOpsInfrastructureResourceType type) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + Type = type; + } + + /// Initializes a new instance of . + /// The name of the resource. + /// The type of resource that is used as the scope of the availability check. + /// Keeps track of any properties unknown to the library. + internal CheckNameAvailability(string name, DevOpsInfrastructureResourceType type, IDictionary serializedAdditionalRawData) + { + Name = name; + Type = type; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CheckNameAvailability() + { + } + + /// The name of the resource. + public string Name { get; } + /// The type of resource that is used as the scope of the availability check. + public DevOpsInfrastructureResourceType Type { get; } + } +} diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityReason.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityReason.cs new file mode 100644 index 000000000000..4f0bf5b350a3 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityReason.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.DevOpsInfrastructure.Models +{ + /// The reason code explaining why the name is unavailable. Will be null if the name is available. + public readonly partial struct CheckNameAvailabilityReason : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CheckNameAvailabilityReason(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InvalidValue = "Invalid"; + private const string AlreadyExistsValue = "AlreadyExists"; + + /// The name is invalid. + public static CheckNameAvailabilityReason Invalid { get; } = new CheckNameAvailabilityReason(InvalidValue); + /// The name already exists. + public static CheckNameAvailabilityReason AlreadyExists { get; } = new CheckNameAvailabilityReason(AlreadyExistsValue); + /// Determines if two values are the same. + public static bool operator ==(CheckNameAvailabilityReason left, CheckNameAvailabilityReason right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CheckNameAvailabilityReason left, CheckNameAvailabilityReason right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CheckNameAvailabilityReason(string value) => new CheckNameAvailabilityReason(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CheckNameAvailabilityReason other && Equals(other); + /// + public bool Equals(CheckNameAvailabilityReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs new file mode 100644 index 000000000000..a357a965bdc6 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DevOpsInfrastructure.Models +{ + public partial class CheckNameAvailabilityResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CheckNameAvailabilityResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("available"u8); + writer.WriteStringValue(Available.ToString()); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("reason"u8); + writer.WriteStringValue(Reason.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CheckNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CheckNameAvailabilityResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCheckNameAvailabilityResult(document.RootElement, options); + } + + internal static CheckNameAvailabilityResult DeserializeCheckNameAvailabilityResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AvailabilityStatus available = default; + string message = default; + string name = default; + CheckNameAvailabilityReason reason = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("available"u8)) + { + available = new AvailabilityStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("reason"u8)) + { + reason = new CheckNameAvailabilityReason(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CheckNameAvailabilityResult(available, message, name, reason, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CheckNameAvailabilityResult)} does not support writing '{options.Format}' format."); + } + } + + CheckNameAvailabilityResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCheckNameAvailabilityResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CheckNameAvailabilityResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityResult.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityResult.cs new file mode 100644 index 000000000000..e41317ea87be --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/CheckNameAvailabilityResult.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DevOpsInfrastructure.Models +{ + /// The CheckNameAvailability operation response. + public partial class CheckNameAvailabilityResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Availability status of the name. + /// A message explaining why the name is unavailable. Will be null if the name is available. + /// The name whose availability was checked. + /// The reason code explaining why the name is unavailable. Will be null if the name is available. + /// or is null. + internal CheckNameAvailabilityResult(AvailabilityStatus available, string message, string name, CheckNameAvailabilityReason reason) + { + Argument.AssertNotNull(message, nameof(message)); + Argument.AssertNotNull(name, nameof(name)); + + Available = available; + Message = message; + Name = name; + Reason = reason; + } + + /// Initializes a new instance of . + /// Availability status of the name. + /// A message explaining why the name is unavailable. Will be null if the name is available. + /// The name whose availability was checked. + /// The reason code explaining why the name is unavailable. Will be null if the name is available. + /// Keeps track of any properties unknown to the library. + internal CheckNameAvailabilityResult(AvailabilityStatus available, string message, string name, CheckNameAvailabilityReason reason, IDictionary serializedAdditionalRawData) + { + Available = available; + Message = message; + Name = name; + Reason = reason; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CheckNameAvailabilityResult() + { + } + + /// Availability status of the name. + public AvailabilityStatus Available { get; } + /// A message explaining why the name is unavailable. Will be null if the name is available. + public string Message { get; } + /// The name whose availability was checked. + public string Name { get; } + /// The reason code explaining why the name is unavailable. Will be null if the name is available. + public CheckNameAvailabilityReason Reason { get; } + } +} diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsInfrastructureResourceType.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsInfrastructureResourceType.cs new file mode 100644 index 000000000000..6579f2c59af9 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsInfrastructureResourceType.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.DevOpsInfrastructure.Models +{ + /// The type of resource. + public readonly partial struct DevOpsInfrastructureResourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DevOpsInfrastructureResourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MicrosoftDevOpsInfrastructurePoolsValue = "Microsoft.DevOpsInfrastructure/pools"; + + /// DevOpsInfrastructure pool resource. + public static DevOpsInfrastructureResourceType MicrosoftDevOpsInfrastructurePools { get; } = new DevOpsInfrastructureResourceType(MicrosoftDevOpsInfrastructurePoolsValue); + /// Determines if two values are the same. + public static bool operator ==(DevOpsInfrastructureResourceType left, DevOpsInfrastructureResourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DevOpsInfrastructureResourceType left, DevOpsInfrastructureResourceType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DevOpsInfrastructureResourceType(string value) => new DevOpsInfrastructureResourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DevOpsInfrastructureResourceType other && Equals(other); + /// + public bool Equals(DevOpsInfrastructureResourceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.Serialization.cs index aabd2cf6a05d..0d06f3329de4 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.Serialization.cs @@ -51,6 +51,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("parallelism"u8); writer.WriteNumberValue(Parallelism.Value); } + if (Optional.IsDefined(OpenAccess)) + { + writer.WritePropertyName("openAccess"u8); + writer.WriteBooleanValue(OpenAccess.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -91,6 +96,7 @@ internal static DevOpsOrganization DeserializeDevOpsOrganization(JsonElement ele Uri url = default; IList projects = default; int? parallelism = default; + bool? openAccess = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -123,13 +129,22 @@ internal static DevOpsOrganization DeserializeDevOpsOrganization(JsonElement ele parallelism = property.Value.GetInt32(); continue; } + if (property.NameEquals("openAccess"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + openAccess = property.Value.GetBoolean(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new DevOpsOrganization(url, projects ?? new ChangeTrackingList(), parallelism, serializedAdditionalRawData); + return new DevOpsOrganization(url, projects ?? new ChangeTrackingList(), parallelism, openAccess, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.cs index c811965dd068..0452f359220f 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsOrganization.cs @@ -60,12 +60,14 @@ public DevOpsOrganization(Uri uri) /// The Azure DevOps organization URL in which the pool should be created. /// Optional list of projects in which the pool should be created. /// How many machines can be created at maximum in this organization out of the maximumConcurrency of the pool. + /// Determines if the pool should have open access to all projects in this organization. /// Keeps track of any properties unknown to the library. - internal DevOpsOrganization(Uri uri, IList projects, int? parallelism, IDictionary serializedAdditionalRawData) + internal DevOpsOrganization(Uri uri, IList projects, int? parallelism, bool? openAccess, IDictionary serializedAdditionalRawData) { Uri = uri; Projects = projects; Parallelism = parallelism; + OpenAccess = openAccess; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -80,5 +82,7 @@ internal DevOpsOrganization() public IList Projects { get; } /// How many machines can be created at maximum in this organization out of the maximumConcurrency of the pool. public int? Parallelism { get; set; } + /// Determines if the pool should have open access to all projects in this organization. + public bool? OpenAccess { get; set; } } } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.Serialization.cs index 1f84860918c6..61762405bf17 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.Serialization.cs @@ -59,6 +59,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("buffer"u8); writer.WriteStringValue(Buffer); } + if (Optional.IsDefined(EphemeralType)) + { + writer.WritePropertyName("ephemeralType"u8); + writer.WriteStringValue(EphemeralType.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -100,6 +105,7 @@ internal static DevOpsPoolVmImage DeserializeDevOpsPoolVmImage(JsonElement eleme string wellKnownImageName = default; IList aliases = default; string buffer = default; + EphemeralType? ephemeralType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -133,13 +139,28 @@ internal static DevOpsPoolVmImage DeserializeDevOpsPoolVmImage(JsonElement eleme buffer = property.Value.GetString(); continue; } + if (property.NameEquals("ephemeralType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ephemeralType = new EphemeralType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new DevOpsPoolVmImage(resourceId, wellKnownImageName, aliases ?? new ChangeTrackingList(), buffer, serializedAdditionalRawData); + return new DevOpsPoolVmImage( + resourceId, + wellKnownImageName, + aliases ?? new ChangeTrackingList(), + buffer, + ephemeralType, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.cs index 62da13c18c4e..e14eee5a9b74 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/DevOpsPoolVmImage.cs @@ -56,13 +56,15 @@ public DevOpsPoolVmImage() /// The image to use from a well-known set of images made available to customers. /// List of aliases to reference the image by. /// The percentage of the buffer to be allocated to this image. + /// The ephemeral type of the image. /// Keeps track of any properties unknown to the library. - internal DevOpsPoolVmImage(string resourceId, string wellKnownImageName, IList aliases, string buffer, IDictionary serializedAdditionalRawData) + internal DevOpsPoolVmImage(string resourceId, string wellKnownImageName, IList aliases, string buffer, EphemeralType? ephemeralType, IDictionary serializedAdditionalRawData) { ResourceId = resourceId; WellKnownImageName = wellKnownImageName; Aliases = aliases; Buffer = buffer; + EphemeralType = ephemeralType; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -74,5 +76,7 @@ internal DevOpsPoolVmImage(string resourceId, string wellKnownImageName, IList Aliases { get; } /// The percentage of the buffer to be allocated to this image. public string Buffer { get; set; } + /// The ephemeral type of the image. + public EphemeralType? EphemeralType { get; set; } } } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/EphemeralType.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/EphemeralType.cs new file mode 100644 index 000000000000..22740c036b08 --- /dev/null +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/EphemeralType.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.DevOpsInfrastructure.Models +{ + /// The type of Ephemeral option the pool will use on underlying VMs when loading this image. + public readonly partial struct EphemeralType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EphemeralType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutomaticValue = "Automatic"; + private const string CacheDiskValue = "CacheDisk"; + private const string ResourceDiskValue = "ResourceDisk"; + + /// Ephemeral is handled by Managed DevOps Pools service. + public static EphemeralType Automatic { get; } = new EphemeralType(AutomaticValue); + /// CacheDisk ephemeral only, requires that the SKU has a cache that is large enough for the image. + public static EphemeralType CacheDisk { get; } = new EphemeralType(CacheDiskValue); + /// ResourceDisk ephemeral only, requires only that the SKU supports it. + public static EphemeralType ResourceDisk { get; } = new EphemeralType(ResourceDiskValue); + /// Determines if two values are the same. + public static bool operator ==(EphemeralType left, EphemeralType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EphemeralType left, EphemeralType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EphemeralType(string value) => new EphemeralType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EphemeralType other && Equals(other); + /// + public bool Equals(EphemeralType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.Serialization.cs index bd5d5f47e10c..ca35268ecdcb 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.Serialization.cs @@ -39,6 +39,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("certificateStoreLocation"u8); writer.WriteStringValue(CertificateStoreLocation); } + if (Optional.IsDefined(CertificateStoreName)) + { + writer.WritePropertyName("certificateStoreName"u8); + writer.WriteStringValue(CertificateStoreName.Value.ToString()); + } writer.WritePropertyName("observedCertificates"u8); writer.WriteStartArray(); foreach (var item in ObservedCertificates) @@ -91,6 +96,7 @@ internal static SecretsManagementSettings DeserializeSecretsManagementSettings(J return null; } string certificateStoreLocation = default; + CertificateStoreNameOption? certificateStoreName = default; IList observedCertificates = default; bool keyExportable = default; IDictionary serializedAdditionalRawData = default; @@ -102,6 +108,15 @@ internal static SecretsManagementSettings DeserializeSecretsManagementSettings(J certificateStoreLocation = property.Value.GetString(); continue; } + if (property.NameEquals("certificateStoreName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + certificateStoreName = new CertificateStoreNameOption(property.Value.GetString()); + continue; + } if (property.NameEquals("observedCertificates"u8)) { List array = new List(); @@ -130,7 +145,7 @@ internal static SecretsManagementSettings DeserializeSecretsManagementSettings(J } } serializedAdditionalRawData = rawDataDictionary; - return new SecretsManagementSettings(certificateStoreLocation, observedCertificates, keyExportable, serializedAdditionalRawData); + return new SecretsManagementSettings(certificateStoreLocation, certificateStoreName, observedCertificates, keyExportable, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.cs index 7abbf15aff0d..31ab5987c6dd 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/Models/SecretsManagementSettings.cs @@ -60,12 +60,14 @@ public SecretsManagementSettings(IEnumerable observedCertificates, bool key /// Initializes a new instance of . /// Where to store certificates on the machine. + /// Name of the certificate store to use on the machine, currently 'My' and 'Root' are supported. /// The list of certificates to install on all machines in the pool. /// Defines if the key of the certificates should be exportable. /// Keeps track of any properties unknown to the library. - internal SecretsManagementSettings(string certificateStoreLocation, IList observedCertificates, bool keyExportable, IDictionary serializedAdditionalRawData) + internal SecretsManagementSettings(string certificateStoreLocation, CertificateStoreNameOption? certificateStoreName, IList observedCertificates, bool keyExportable, IDictionary serializedAdditionalRawData) { CertificateStoreLocation = certificateStoreLocation; + CertificateStoreName = certificateStoreName; ObservedCertificates = observedCertificates; KeyExportable = keyExportable; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -78,6 +80,8 @@ internal SecretsManagementSettings() /// Where to store certificates on the machine. public string CertificateStoreLocation { get; set; } + /// Name of the certificate store to use on the machine, currently 'My' and 'Root' are supported. + public CertificateStoreNameOption? CertificateStoreName { get; set; } /// The list of certificates to install on all machines in the pool. public IList ObservedCertificates { get; } /// Defines if the key of the certificates should be exportable. diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ImageVersionsRestOperations.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ImageVersionsRestOperations.cs index 68af6e66f25a..0cb680e70a45 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ImageVersionsRestOperations.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ImageVersionsRestOperations.cs @@ -32,7 +32,7 @@ public ImageVersionsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-10-19"; + _apiVersion = apiVersion ?? "2025-01-21"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/PoolsRestOperations.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/PoolsRestOperations.cs index b50f8d102b20..42857c721ccb 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/PoolsRestOperations.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/PoolsRestOperations.cs @@ -32,7 +32,7 @@ public PoolsRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-10-19"; + _apiVersion = apiVersion ?? "2025-01-21"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -564,6 +564,92 @@ public Response ListBySubscription(string subscriptionId, Cancel } } + internal RequestUriBuilder CreateCheckNameAvailabilityRequestUri(string subscriptionId, CheckNameAvailability body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DevOpsInfrastructure/checkNameAvailability", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, CheckNameAvailability body) + { + 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.DevOpsInfrastructure/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 content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Checks that the pool name is valid and is not already in use. + /// The ID of the target subscription. The value must be an UUID. + /// The CheckAvailability request. + /// 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, CheckNameAvailability body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CheckNameAvailabilityResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CheckNameAvailabilityResult.DeserializeCheckNameAvailabilityResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Checks that the pool name is valid and is not already in use. + /// The ID of the target subscription. The value must be an UUID. + /// The CheckAvailability request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response CheckNameAvailability(string subscriptionId, CheckNameAvailability body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CheckNameAvailabilityResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CheckNameAvailabilityResult.DeserializeCheckNameAvailabilityResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ResourceDetailsRestOperations.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ResourceDetailsRestOperations.cs index 51091db7457a..64f23016f63a 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ResourceDetailsRestOperations.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/ResourceDetailsRestOperations.cs @@ -32,7 +32,7 @@ public ResourceDetailsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-10-19"; + _apiVersion = apiVersion ?? "2025-01-21"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SkuRestOperations.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SkuRestOperations.cs index 5b7df3569c4c..11c6821a411e 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SkuRestOperations.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SkuRestOperations.cs @@ -32,7 +32,7 @@ public SkuRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-10-19"; + _apiVersion = apiVersion ?? "2025-01-21"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs index 86477371a6eb..afa21c7a0870 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs @@ -32,7 +32,7 @@ public SubscriptionUsagesRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-10-19"; + _apiVersion = apiVersion ?? "2025-01-21"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tsp-location.yaml b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tsp-location.yaml index bea97fb31977..f09aad15ab50 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tsp-location.yaml +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/tsp-location.yaml @@ -1,3 +1,4 @@ -directory: specification/devopsinfrastructure -commit: f37b54b187bac95237c62478a10b94e9cff236f3 -repo: Azure/azure-rest-api-specs \ No newline at end of file +directory: specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/Azure.ResourceManager.DurableTask.sln b/sdk/durabletask/Azure.ResourceManager.DurableTask/Azure.ResourceManager.DurableTask.sln new file mode 100644 index 000000000000..4564bbd5499e --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/Azure.ResourceManager.DurableTask.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.DurableTask.Samples", "samples\Azure.ResourceManager.DurableTask.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.DurableTask", "src\Azure.ResourceManager.DurableTask.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.DurableTask.Tests", "tests\Azure.ResourceManager.DurableTask.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/CHANGELOG.md b/sdk/durabletask/Azure.ResourceManager.DurableTask/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/Directory.Build.props b/sdk/durabletask/Azure.ResourceManager.DurableTask/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/README.md b/sdk/durabletask/Azure.ResourceManager.DurableTask/README.md new file mode 100644 index 000000000000..61c6950f4999 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure DurableTask management client library for .NET + +**[Describe the service briefly first.]** + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - 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. + +## Getting started + +### Install the package + +Install the Microsoft Azure DurableTask management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.DurableTask --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET 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/dev/mgmt_quickstart.md). +- [API References](https://learn.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://aka.ms/azuresdk-net-mgmt-samples) + +## 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 about Microsoft Azure SDK, see [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 +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action 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 other 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/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.net8.0.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.net8.0.cs new file mode 100644 index 000000000000..397a2afb47cc --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.net8.0.cs @@ -0,0 +1,229 @@ +namespace Azure.ResourceManager.DurableTask +{ + public static partial class DurableTaskExtensions + { + public static Azure.Response GetScheduler(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSchedulerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetSchedulers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSchedulersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.TaskHubResource GetTaskHubResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class SchedulerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SchedulerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string schedulerName, 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 schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schedulerName, 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 SchedulerData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DurableTask.Models.SchedulerProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SchedulerResource() { } + public virtual Azure.ResourceManager.DurableTask.SchedulerData 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 schedulerName) { 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 GetTaskHub(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTaskHubAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.TaskHubCollection GetTaskHubs() { 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; } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class TaskHubCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected TaskHubCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string taskHubName, 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 taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string taskHubName, 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 TaskHubData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TaskHubData() { } + public Azure.ResourceManager.DurableTask.Models.TaskHubProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.TaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.TaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TaskHubResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected TaskHubResource() { } + public virtual Azure.ResourceManager.DurableTask.TaskHubData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) { 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; } + Azure.ResourceManager.DurableTask.TaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.TaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DurableTask.Mocking +{ + public partial class MockableDurableTaskArmClient : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskArmClient() { } + public virtual Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.TaskHubResource GetTaskHubResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableDurableTaskResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskResourceGroupResource() { } + public virtual Azure.Response GetScheduler(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSchedulerAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers() { throw null; } + } + public partial class MockableDurableTaskSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskSubscriptionResource() { } + public virtual Azure.Pageable GetSchedulers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSchedulersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DurableTask.Models +{ + public static partial class ArmDurableTaskModelFactory + { + public static Azure.ResourceManager.DurableTask.SchedulerData SchedulerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DurableTask.Models.SchedulerProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerProperties SchedulerProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerSku SchedulerSku(string name = null, int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.RedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.RedundancyState?)) { throw null; } + public static Azure.ResourceManager.DurableTask.TaskHubData TaskHubData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.TaskHubProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.TaskHubProperties TaskHubProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), System.Uri dashboardUri = null) { 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.DurableTask.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.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.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RedundancyState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RedundancyState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.RedundancyState None { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.RedundancyState Zone { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.RedundancyState 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.DurableTask.Models.RedundancyState left, Azure.ResourceManager.DurableTask.Models.RedundancyState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.RedundancyState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.RedundancyState left, Azure.ResourceManager.DurableTask.Models.RedundancyState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SchedulerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerProperties(System.Collections.Generic.IEnumerable ipAllowlist, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku) { } + public string Endpoint { get { throw null; } } + public System.Collections.Generic.IList IPAllowlist { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.SchedulerSku Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerSku(string name) { } + public int? Capacity { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.RedundancyState? RedundancyState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TaskHubProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TaskHubProperties() { } + public System.Uri DashboardUri { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.TaskHubProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.TaskHubProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.netstandard2.0.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.netstandard2.0.cs new file mode 100644 index 000000000000..397a2afb47cc --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.netstandard2.0.cs @@ -0,0 +1,229 @@ +namespace Azure.ResourceManager.DurableTask +{ + public static partial class DurableTaskExtensions + { + public static Azure.Response GetScheduler(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSchedulerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetSchedulers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSchedulersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.TaskHubResource GetTaskHubResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class SchedulerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SchedulerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string schedulerName, 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 schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schedulerName, 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 SchedulerData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DurableTask.Models.SchedulerProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SchedulerResource() { } + public virtual Azure.ResourceManager.DurableTask.SchedulerData 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 schedulerName) { 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 GetTaskHub(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTaskHubAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.TaskHubCollection GetTaskHubs() { 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; } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class TaskHubCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected TaskHubCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string taskHubName, 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 taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string taskHubName, 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 TaskHubData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TaskHubData() { } + public Azure.ResourceManager.DurableTask.Models.TaskHubProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.TaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.TaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TaskHubResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected TaskHubResource() { } + public virtual Azure.ResourceManager.DurableTask.TaskHubData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) { 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; } + Azure.ResourceManager.DurableTask.TaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.TaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.TaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DurableTask.Mocking +{ + public partial class MockableDurableTaskArmClient : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskArmClient() { } + public virtual Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.TaskHubResource GetTaskHubResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableDurableTaskResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskResourceGroupResource() { } + public virtual Azure.Response GetScheduler(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSchedulerAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers() { throw null; } + } + public partial class MockableDurableTaskSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableDurableTaskSubscriptionResource() { } + public virtual Azure.Pageable GetSchedulers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSchedulersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DurableTask.Models +{ + public static partial class ArmDurableTaskModelFactory + { + public static Azure.ResourceManager.DurableTask.SchedulerData SchedulerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DurableTask.Models.SchedulerProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerProperties SchedulerProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.SchedulerSku SchedulerSku(string name = null, int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.RedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.RedundancyState?)) { throw null; } + public static Azure.ResourceManager.DurableTask.TaskHubData TaskHubData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.TaskHubProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.TaskHubProperties TaskHubProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), System.Uri dashboardUri = null) { 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.DurableTask.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.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.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RedundancyState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RedundancyState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.RedundancyState None { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.RedundancyState Zone { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.RedundancyState 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.DurableTask.Models.RedundancyState left, Azure.ResourceManager.DurableTask.Models.RedundancyState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.RedundancyState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.RedundancyState left, Azure.ResourceManager.DurableTask.Models.RedundancyState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SchedulerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerProperties(System.Collections.Generic.IEnumerable ipAllowlist, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku) { } + public string Endpoint { get { throw null; } } + public System.Collections.Generic.IList IPAllowlist { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.SchedulerSku Sku { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SchedulerSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SchedulerSku(string name) { } + public int? Capacity { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.RedundancyState? RedundancyState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.SchedulerSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TaskHubProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TaskHubProperties() { } + public System.Uri DashboardUri { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.TaskHubProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.TaskHubProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/assets.json b/sdk/durabletask/Azure.ResourceManager.DurableTask/assets.json new file mode 100644 index 000000000000..56671aacf0f5 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/durabletask/Azure.ResourceManager.DurableTask", + "Tag": "" +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Azure.ResourceManager.DurableTask.Samples.csproj b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Azure.ResourceManager.DurableTask.Samples.csproj new file mode 100644 index 000000000000..536ac11ce49a --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Azure.ResourceManager.DurableTask.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SchedulerCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SchedulerCollection.cs new file mode 100644 index 000000000000..59fb120a856d --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SchedulerCollection.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DurableTask.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.DurableTask.Samples +{ + public partial class Sample_SchedulerCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SchedulersCreateOrUpdate() + { + // Generated from example definition: 2024-10-01-preview/Schedulers_CreateOrUpdate.json + // this example is just showing the usage of "Scheduler_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SchedulerResource + SchedulerCollection collection = resourceGroupResource.GetSchedulers(); + + // invoke the operation + string schedulerName = "testscheduler"; + SchedulerData data = new SchedulerData(new AzureLocation("northcentralus")) + { + Properties = new SchedulerProperties(new string[] { "10.0.0.0/8" }, new SchedulerSku("Dedicated")), + Tags = +{ +["key7131"] = "ryohwcoiccwsnewjigfmijz", +["key2138"] = "fjaeecgnvqd" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, schedulerName, data); + SchedulerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SchedulerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SchedulersGet() + { + // Generated from example definition: 2024-10-01-preview/Schedulers_Get.json + // this example is just showing the usage of "Scheduler_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SchedulerResource + SchedulerCollection collection = resourceGroupResource.GetSchedulers(); + + // invoke the operation + string schedulerName = "testscheduler"; + SchedulerResource result = await collection.GetAsync(schedulerName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SchedulerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SchedulersListByResourceGroup() + { + // Generated from example definition: 2024-10-01-preview/Schedulers_ListByResourceGroup.json + // this example is just showing the usage of "Scheduler_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SchedulerResource + SchedulerCollection collection = resourceGroupResource.GetSchedulers(); + + // invoke the operation and iterate over the result + await foreach (SchedulerResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SchedulerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SchedulersGet() + { + // Generated from example definition: 2024-10-01-preview/Schedulers_Get.json + // this example is just showing the usage of "Scheduler_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SchedulerResource + SchedulerCollection collection = resourceGroupResource.GetSchedulers(); + + // invoke the operation + string schedulerName = "testscheduler"; + bool result = await collection.ExistsAsync(schedulerName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SchedulersGet() + { + // Generated from example definition: 2024-10-01-preview/Schedulers_Get.json + // this example is just showing the usage of "Scheduler_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SchedulerResource + SchedulerCollection collection = resourceGroupResource.GetSchedulers(); + + // invoke the operation + string schedulerName = "testscheduler"; + NullableResponse response = await collection.GetIfExistsAsync(schedulerName); + SchedulerResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SchedulerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SchedulerResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SchedulerResource.cs new file mode 100644 index 000000000000..0762e2ee0a49 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SchedulerResource.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DurableTask.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DurableTask.Samples +{ + public partial class Sample_SchedulerResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SchedulersGet() + { + // Generated from example definition: 2024-10-01-preview/Schedulers_Get.json + // this example is just showing the usage of "Scheduler_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // invoke the operation + SchedulerResource result = await scheduler.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SchedulerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SchedulersDelete() + { + // Generated from example definition: 2024-10-01-preview/Schedulers_Delete.json + // this example is just showing the usage of "Scheduler_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // invoke the operation + await scheduler.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SchedulersUpdate() + { + // Generated from example definition: 2024-10-01-preview/Schedulers_Update.json + // this example is just showing the usage of "Scheduler_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // invoke the operation + SchedulerData data = new SchedulerData(default) + { + Properties = new SchedulerProperties(new string[] { "10.0.0.0/8" }, new SchedulerSku("Dedicated") + { + Capacity = 10, + }), + Tags = +{ +["key8653"] = "lr" +}, + }; + ArmOperation lro = await scheduler.UpdateAsync(WaitUntil.Completed, data); + SchedulerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SchedulerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..ed50efa434ea --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.DurableTask.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSchedulers_SchedulersListBySubscription() + { + // Generated from example definition: 2024-10-01-preview/Schedulers_ListBySubscription.json + // this example is just showing the usage of "Scheduler_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (SchedulerResource item in subscriptionResource.GetSchedulersAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SchedulerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_TaskHubCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_TaskHubCollection.cs new file mode 100644 index 000000000000..b84dc3556b78 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_TaskHubCollection.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DurableTask.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DurableTask.Samples +{ + public partial class Sample_TaskHubCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_TaskHubsCreateOrUpdate() + { + // Generated from example definition: 2024-10-01-preview/TaskHubs_CreateOrUpdate.json + // this example is just showing the usage of "TaskHub_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // get the collection of this TaskHubResource + TaskHubCollection collection = scheduler.GetTaskHubs(); + + // invoke the operation + string taskHubName = "testtaskhub"; + TaskHubData data = new TaskHubData + { + Properties = new TaskHubProperties(), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, taskHubName, data); + TaskHubResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TaskHubData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_TaskHubsGet() + { + // Generated from example definition: 2024-10-01-preview/TaskHubs_Get.json + // this example is just showing the usage of "TaskHub_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // get the collection of this TaskHubResource + TaskHubCollection collection = scheduler.GetTaskHubs(); + + // invoke the operation + string taskHubName = "testtuskhub"; + TaskHubResource result = await collection.GetAsync(taskHubName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TaskHubData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_TaskHubsListByScheduler() + { + // Generated from example definition: 2024-10-01-preview/TaskHubs_ListByScheduler.json + // this example is just showing the usage of "TaskHub_ListByScheduler" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testtaskhub"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // get the collection of this TaskHubResource + TaskHubCollection collection = scheduler.GetTaskHubs(); + + // invoke the operation and iterate over the result + await foreach (TaskHubResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TaskHubData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_TaskHubsGet() + { + // Generated from example definition: 2024-10-01-preview/TaskHubs_Get.json + // this example is just showing the usage of "TaskHub_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // get the collection of this TaskHubResource + TaskHubCollection collection = scheduler.GetTaskHubs(); + + // invoke the operation + string taskHubName = "testtuskhub"; + bool result = await collection.ExistsAsync(taskHubName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_TaskHubsGet() + { + // Generated from example definition: 2024-10-01-preview/TaskHubs_Get.json + // this example is just showing the usage of "TaskHub_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SchedulerResource created on azure + // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + + // get the collection of this TaskHubResource + TaskHubCollection collection = scheduler.GetTaskHubs(); + + // invoke the operation + string taskHubName = "testtuskhub"; + NullableResponse response = await collection.GetIfExistsAsync(taskHubName); + TaskHubResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TaskHubData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_TaskHubResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_TaskHubResource.cs new file mode 100644 index 000000000000..3ffd0e10a057 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/samples/Generated/Samples/Sample_TaskHubResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DurableTask.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DurableTask.Samples +{ + public partial class Sample_TaskHubResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_TaskHubsGet() + { + // Generated from example definition: 2024-10-01-preview/TaskHubs_Get.json + // this example is just showing the usage of "TaskHub_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TaskHubResource created on azure + // for more information of creating TaskHubResource, please refer to the document of TaskHubResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + string taskHubName = "testtuskhub"; + ResourceIdentifier taskHubResourceId = TaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); + TaskHubResource taskHub = client.GetTaskHubResource(taskHubResourceId); + + // invoke the operation + TaskHubResource result = await taskHub.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TaskHubData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_TaskHubsDelete() + { + // Generated from example definition: 2024-10-01-preview/TaskHubs_Delete.json + // this example is just showing the usage of "TaskHub_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TaskHubResource created on azure + // for more information of creating TaskHubResource, please refer to the document of TaskHubResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + string taskHubName = "testtuskhub"; + ResourceIdentifier taskHubResourceId = TaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); + TaskHubResource taskHub = client.GetTaskHubResource(taskHubResourceId); + + // invoke the operation + await taskHub.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_TaskHubsCreateOrUpdate() + { + // Generated from example definition: 2024-10-01-preview/TaskHubs_CreateOrUpdate.json + // this example is just showing the usage of "TaskHub_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TaskHubResource created on azure + // for more information of creating TaskHubResource, please refer to the document of TaskHubResource + string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; + string resourceGroupName = "rgopenapi"; + string schedulerName = "testscheduler"; + string taskHubName = "testtaskhub"; + ResourceIdentifier taskHubResourceId = TaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); + TaskHubResource taskHub = client.GetTaskHubResource(taskHubResourceId); + + // invoke the operation + TaskHubData data = new TaskHubData + { + Properties = new TaskHubProperties(), + }; + ArmOperation lro = await taskHub.UpdateAsync(WaitUntil.Completed, data); + TaskHubResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TaskHubData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Azure.ResourceManager.DurableTask.csproj b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Azure.ResourceManager.DurableTask.csproj new file mode 100644 index 000000000000..eef34dffbc5f --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Azure.ResourceManager.DurableTask.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider DurableTask. + 1.0.0-beta.1 + azure;management;arm;resource manager;durabletask + Azure.ResourceManager.DurableTask + + diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ArmDurableTaskModelFactory.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ArmDurableTaskModelFactory.cs new file mode 100644 index 000000000000..663ee5d2615b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ArmDurableTaskModelFactory.cs @@ -0,0 +1,93 @@ +// 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; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// Model factory for models. + public static partial class ArmDurableTaskModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static TaskHubData TaskHubData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TaskHubProperties properties = null) + { + return new TaskHubData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// URL of the durable task scheduler dashboard. + /// A new instance for mocking. + public static TaskHubProperties TaskHubProperties(ProvisioningState? provisioningState = null, Uri dashboardUri = null) + { + return new TaskHubProperties(provisioningState, dashboardUri, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static SchedulerData SchedulerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SchedulerProperties properties = null) + { + tags ??= new Dictionary(); + + return new SchedulerData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// URL of the durable task scheduler. + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + /// SKU of the durable task scheduler. + /// A new instance for mocking. + public static SchedulerProperties SchedulerProperties(ProvisioningState? provisioningState = null, string endpoint = null, IEnumerable ipAllowlist = null, SchedulerSku sku = null) + { + ipAllowlist ??= new List(); + + return new SchedulerProperties(provisioningState, endpoint, ipAllowlist?.ToList(), sku, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the SKU. + /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. + /// Indicates whether the current SKU configuration is zone redundant. + /// A new instance for mocking. + public static SchedulerSku SchedulerSku(string name = null, int? capacity = null, RedundancyState? redundancyState = null) + { + return new SchedulerSku(name, capacity, redundancyState, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs new file mode 100644 index 000000000000..59b95fb5863a --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs @@ -0,0 +1,238 @@ +// 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.Core; +using Azure.ResourceManager.DurableTask.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DurableTask +{ + /// A class to add extension methods to Azure.ResourceManager.DurableTask. + public static partial class DurableTaskExtensions + { + private static MockableDurableTaskArmClient GetMockableDurableTaskArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableDurableTaskArmClient(client0)); + } + + private static MockableDurableTaskResourceGroupResource GetMockableDurableTaskResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableDurableTaskResourceGroupResource(client, resource.Id)); + } + + private static MockableDurableTaskSubscriptionResource GetMockableDurableTaskSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableDurableTaskSubscriptionResource(client, resource.Id)); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SchedulerResource GetSchedulerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDurableTaskArmClient(client).GetSchedulerResource(id); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static TaskHubResource GetTaskHubResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDurableTaskArmClient(client).GetTaskHubResource(id); + } + + /// + /// Gets a collection of SchedulerResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of SchedulerResources and their operations over a SchedulerResource. + public static SchedulerCollection GetSchedulers(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetSchedulers(); + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Scheduler. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetSchedulerAsync(this ResourceGroupResource resourceGroupResource, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetSchedulerAsync(schedulerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Scheduler. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetScheduler(this ResourceGroupResource resourceGroupResource, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetScheduler(schedulerName, cancellationToken); + } + + /// + /// List Schedulers by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DurableTask/schedulers + /// + /// + /// Operation Id + /// Scheduler_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetSchedulersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDurableTaskSubscriptionResource(subscriptionResource).GetSchedulersAsync(cancellationToken); + } + + /// + /// List Schedulers by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DurableTask/schedulers + /// + /// + /// Operation Id + /// Scheduler_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetSchedulers(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDurableTaskSubscriptionResource(subscriptionResource).GetSchedulers(cancellationToken); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskArmClient.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskArmClient.cs new file mode 100644 index 000000000000..066b094f4491 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskArmClient.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.DurableTask.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableDurableTaskArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableDurableTaskArmClient() + { + } + + /// 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 MockableDurableTaskArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableDurableTaskArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual SchedulerResource GetSchedulerResource(ResourceIdentifier id) + { + SchedulerResource.ValidateResourceId(id); + return new SchedulerResource(Client, id); + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual TaskHubResource GetTaskHubResource(ResourceIdentifier id) + { + TaskHubResource.ValidateResourceId(id); + return new TaskHubResource(Client, id); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskResourceGroupResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskResourceGroupResource.cs new file mode 100644 index 000000000000..7f7eb5e71b35 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskResourceGroupResource.cs @@ -0,0 +1,105 @@ +// 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.Core; + +namespace Azure.ResourceManager.DurableTask.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableDurableTaskResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableDurableTaskResourceGroupResource() + { + } + + /// 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 MockableDurableTaskResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of SchedulerResources in the ResourceGroupResource. + /// An object representing collection of SchedulerResources and their operations over a SchedulerResource. + public virtual SchedulerCollection GetSchedulers() + { + return GetCachedClient(client => new SchedulerCollection(client, Id)); + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSchedulerAsync(string schedulerName, CancellationToken cancellationToken = default) + { + return await GetSchedulers().GetAsync(schedulerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetScheduler(string schedulerName, CancellationToken cancellationToken = default) + { + return GetSchedulers().Get(schedulerName, cancellationToken); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskSubscriptionResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskSubscriptionResource.cs new file mode 100644 index 000000000000..b46b8c12f2a9 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskSubscriptionResource.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DurableTask.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableDurableTaskSubscriptionResource : ArmResource + { + private ClientDiagnostics _schedulerClientDiagnostics; + private SchedulersRestOperations _schedulerRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableDurableTaskSubscriptionResource() + { + } + + /// 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 MockableDurableTaskSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics SchedulerClientDiagnostics => _schedulerClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DurableTask", SchedulerResource.ResourceType.Namespace, Diagnostics); + private SchedulersRestOperations SchedulerRestClient => _schedulerRestClient ??= new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SchedulerResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List Schedulers by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DurableTask/schedulers + /// + /// + /// Operation Id + /// Scheduler_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSchedulersAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SchedulerRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SchedulerRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), SchedulerClientDiagnostics, Pipeline, "MockableDurableTaskSubscriptionResource.GetSchedulers", "value", "nextLink", cancellationToken); + } + + /// + /// List Schedulers by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DurableTask/schedulers + /// + /// + /// Operation Id + /// Scheduler_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSchedulers(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SchedulerRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SchedulerRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), SchedulerClientDiagnostics, Pipeline, "MockableDurableTaskSubscriptionResource.GetSchedulers", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Argument.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..d15981d33b18 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DurableTask +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..001cb5f61046 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DurableTask +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingList.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..5ce8ee7ec441 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// 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.Linq; + +namespace Azure.ResourceManager.DurableTask +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..7548acaf9b19 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.DurableTask +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Optional.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..dd8a99d7dd47 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Optional.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; + +namespace Azure.ResourceManager.DurableTask +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..491ccbbaaf8c --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DurableTask +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperation.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperation.cs new file mode 100644 index 000000000000..34ba48f6a7cb --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperation.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DurableTask +{ +#pragma warning disable SA1649 // File name should match first type name + internal class DurableTaskArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of DurableTaskArmOperation for mocking. + protected DurableTaskArmOperation() + { + } + + internal DurableTaskArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal DurableTaskArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DurableTaskArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperationOfT.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperationOfT.cs new file mode 100644 index 000000000000..dbab97aea54e --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperationOfT.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DurableTask +{ +#pragma warning disable SA1649 // File name should match first type name + internal class DurableTaskArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of DurableTaskArmOperation for mocking. + protected DurableTaskArmOperation() + { + } + + internal DurableTaskArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal DurableTaskArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "DurableTaskArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerOperationSource.cs new file mode 100644 index 000000000000..42ece9ff12c1 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DurableTask +{ + internal class SchedulerOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SchedulerOperationSource(ArmClient client) + { + _client = client; + } + + SchedulerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new SchedulerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new SchedulerResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/TaskHubOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/TaskHubOperationSource.cs new file mode 100644 index 000000000000..cf7b9d83c7b6 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/TaskHubOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DurableTask +{ + internal class TaskHubOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal TaskHubOperationSource(ArmClient client) + { + _client = client; + } + + TaskHubResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new TaskHubResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new TaskHubResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/ProvisioningState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..2705a701b11f --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/ProvisioningState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The status of the current operation. + 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 SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string ProvisioningValue = "Provisioning"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + private const string AcceptedValue = "Accepted"; + + /// Resource has been created. + public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); + /// Resource creation failed. + public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); + /// Resource creation was canceled. + public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); + /// The resource is being provisioned. + public static ProvisioningState Provisioning { get; } = new ProvisioningState(ProvisioningValue); + /// The resource is updating. + public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); + /// The resource is being deleted. + public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); + /// The resource create request has been accepted. + public static ProvisioningState Accepted { get; } = new ProvisioningState(AcceptedValue); + /// 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 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 != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RedundancyState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RedundancyState.cs new file mode 100644 index 000000000000..cab76ba363c0 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RedundancyState.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.DurableTask.Models +{ + /// The state of the resource redundancy. + public readonly partial struct RedundancyState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RedundancyState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string ZoneValue = "Zone"; + + /// The resource is not redundant. + public static RedundancyState None { get; } = new RedundancyState(NoneValue); + /// The resource is zone redundant. + public static RedundancyState Zone { get; } = new RedundancyState(ZoneValue); + /// Determines if two values are the same. + public static bool operator ==(RedundancyState left, RedundancyState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RedundancyState left, RedundancyState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RedundancyState(string value) => new RedundancyState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RedundancyState other && Equals(other); + /// + public bool Equals(RedundancyState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.Serialization.cs new file mode 100644 index 000000000000..807d24dc9971 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DurableTask.Models +{ + internal partial class SchedulerListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SchedulerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSchedulerListResult(document.RootElement, options); + } + + internal static SchedulerListResult DeserializeSchedulerListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SchedulerData.DeserializeSchedulerData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SchedulerListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SchedulerListResult)} does not support writing '{options.Format}' format."); + } + } + + SchedulerListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSchedulerListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SchedulerListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.cs new file mode 100644 index 000000000000..85a9ef186815 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The response of a Scheduler list operation. + internal partial class SchedulerListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Scheduler items on this page. + /// is null. + internal SchedulerListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Scheduler items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SchedulerListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SchedulerListResult() + { + } + + /// The Scheduler items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.Serialization.cs new file mode 100644 index 000000000000..2133da08804c --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DurableTask.Models +{ + public partial class SchedulerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Endpoint)) + { + writer.WritePropertyName("endpoint"u8); + writer.WriteStringValue(Endpoint); + } + writer.WritePropertyName("ipAllowlist"u8); + writer.WriteStartArray(); + foreach (var item in IPAllowlist) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SchedulerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSchedulerProperties(document.RootElement, options); + } + + internal static SchedulerProperties DeserializeSchedulerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProvisioningState? provisioningState = default; + string endpoint = default; + IList ipAllowlist = default; + SchedulerSku sku = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("endpoint"u8)) + { + endpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAllowlist"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ipAllowlist = array; + continue; + } + if (property.NameEquals("sku"u8)) + { + sku = SchedulerSku.DeserializeSchedulerSku(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SchedulerProperties(provisioningState, endpoint, ipAllowlist, sku, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SchedulerProperties)} does not support writing '{options.Format}' format."); + } + } + + SchedulerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSchedulerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SchedulerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.cs new file mode 100644 index 000000000000..622f09dfc0bb --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// Details of the Scheduler. + public partial class SchedulerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + /// SKU of the durable task scheduler. + /// or is null. + public SchedulerProperties(IEnumerable ipAllowlist, SchedulerSku sku) + { + Argument.AssertNotNull(ipAllowlist, nameof(ipAllowlist)); + Argument.AssertNotNull(sku, nameof(sku)); + + IPAllowlist = ipAllowlist.ToList(); + Sku = sku; + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// URL of the durable task scheduler. + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + /// SKU of the durable task scheduler. + /// Keeps track of any properties unknown to the library. + internal SchedulerProperties(ProvisioningState? provisioningState, string endpoint, IList ipAllowlist, SchedulerSku sku, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + Endpoint = endpoint; + IPAllowlist = ipAllowlist; + Sku = sku; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SchedulerProperties() + { + } + + /// The status of the last operation. + public ProvisioningState? ProvisioningState { get; } + /// URL of the durable task scheduler. + public string Endpoint { get; } + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + public IList IPAllowlist { get; } + /// SKU of the durable task scheduler. + public SchedulerSku Sku { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.Serialization.cs new file mode 100644 index 000000000000..e9a1ac002035 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DurableTask.Models +{ + public partial class SchedulerSku : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerSku)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(Capacity)) + { + writer.WritePropertyName("capacity"u8); + writer.WriteNumberValue(Capacity.Value); + } + if (options.Format != "W" && Optional.IsDefined(RedundancyState)) + { + writer.WritePropertyName("redundancyState"u8); + writer.WriteStringValue(RedundancyState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SchedulerSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerSku)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSchedulerSku(document.RootElement, options); + } + + internal static SchedulerSku DeserializeSchedulerSku(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + int? capacity = default; + RedundancyState? redundancyState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("capacity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacity = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("redundancyState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redundancyState = new RedundancyState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SchedulerSku(name, capacity, redundancyState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SchedulerSku)} does not support writing '{options.Format}' format."); + } + } + + SchedulerSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSchedulerSku(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SchedulerSku)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.cs new file mode 100644 index 000000000000..9da3588373ca --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The SKU (Stock Keeping Unit) assigned to this durable task scheduler. + public partial class SchedulerSku + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the SKU. + /// is null. + public SchedulerSku(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// The name of the SKU. + /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. + /// Indicates whether the current SKU configuration is zone redundant. + /// Keeps track of any properties unknown to the library. + internal SchedulerSku(string name, int? capacity, RedundancyState? redundancyState, IDictionary serializedAdditionalRawData) + { + Name = name; + Capacity = capacity; + RedundancyState = redundancyState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SchedulerSku() + { + } + + /// The name of the SKU. + public string Name { get; set; } + /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. + public int? Capacity { get; set; } + /// Indicates whether the current SKU configuration is zone redundant. + public RedundancyState? RedundancyState { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.Serialization.cs new file mode 100644 index 000000000000..706f23c82194 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DurableTask.Models +{ + internal partial class TaskHubListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TaskHubListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TaskHubListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TaskHubListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTaskHubListResult(document.RootElement, options); + } + + internal static TaskHubListResult DeserializeTaskHubListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TaskHubData.DeserializeTaskHubData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TaskHubListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TaskHubListResult)} does not support writing '{options.Format}' format."); + } + } + + TaskHubListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTaskHubListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TaskHubListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.cs new file mode 100644 index 000000000000..a15dd30e019b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The response of a TaskHub list operation. + internal partial class TaskHubListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The TaskHub items on this page. + /// is null. + internal TaskHubListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The TaskHub items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal TaskHubListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TaskHubListResult() + { + } + + /// The TaskHub items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubProperties.Serialization.cs new file mode 100644 index 000000000000..a11a47a6a039 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubProperties.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DurableTask.Models +{ + public partial class TaskHubProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TaskHubProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(DashboardUri)) + { + writer.WritePropertyName("dashboardUrl"u8); + writer.WriteStringValue(DashboardUri.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TaskHubProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TaskHubProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTaskHubProperties(document.RootElement, options); + } + + internal static TaskHubProperties DeserializeTaskHubProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProvisioningState? provisioningState = default; + Uri dashboardUrl = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("dashboardUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dashboardUrl = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TaskHubProperties(provisioningState, dashboardUrl, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TaskHubProperties)} does not support writing '{options.Format}' format."); + } + } + + TaskHubProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTaskHubProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TaskHubProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubProperties.cs new file mode 100644 index 000000000000..97074a8f32f9 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubProperties.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; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The properties of Task Hub. + public partial class TaskHubProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TaskHubProperties() + { + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// URL of the durable task scheduler dashboard. + /// Keeps track of any properties unknown to the library. + internal TaskHubProperties(ProvisioningState? provisioningState, Uri dashboardUri, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + DashboardUri = dashboardUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The status of the last operation. + public ProvisioningState? ProvisioningState { get; } + /// URL of the durable task scheduler dashboard. + public Uri DashboardUri { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ProviderConstants.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..6cb750df8d05 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/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.DurableTask +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/SchedulersRestOperations.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/SchedulersRestOperations.cs new file mode 100644 index 000000000000..e7895d8393f3 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/SchedulersRestOperations.cs @@ -0,0 +1,723 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DurableTask.Models; + +namespace Azure.ResourceManager.DurableTask +{ + internal partial class SchedulersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SchedulersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SchedulersRestOperations(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 ?? "2024-10-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string schedulerName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string schedulerName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Scheduler. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// 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 schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SchedulerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchedulerData.DeserializeSchedulerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SchedulerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Scheduler. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// 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 schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SchedulerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchedulerData.DeserializeSchedulerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SchedulerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerData data) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerData 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update a Scheduler. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// Resource create parameters. + /// 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 schedulerName, SchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schedulerName, 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 Scheduler. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// Resource create parameters. + /// 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 schedulerName, SchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schedulerName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerData data) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerData 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Scheduler. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The resource properties to be updated. + /// 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 schedulerName, SchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schedulerName, 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 a Scheduler. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The resource properties to be updated. + /// 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 schedulerName, SchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schedulerName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string schedulerName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string schedulerName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Scheduler. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// 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 schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Scheduler. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// 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 schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + 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.DurableTask/schedulers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(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.DurableTask/schedulers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Schedulers by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SchedulerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Schedulers by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SchedulerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DurableTask/schedulers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + 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.DurableTask/schedulers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Schedulers by subscription. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + SchedulerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Schedulers by subscription. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + SchedulerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(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; + } + + /// List Schedulers by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(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 = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SchedulerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Schedulers by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(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 = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SchedulerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + 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; + } + + /// List Schedulers by subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + SchedulerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Schedulers by subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + SchedulerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/TaskHubsRestOperations.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/TaskHubsRestOperations.cs new file mode 100644 index 000000000000..5dea474a259b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/TaskHubsRestOperations.cs @@ -0,0 +1,513 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DurableTask.Models; + +namespace Azure.ResourceManager.DurableTask +{ + internal partial class TaskHubsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of TaskHubsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public TaskHubsRestOperations(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 ?? "2024-10-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs/", false); + uri.AppendPath(taskHubName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs/", false); + uri.AppendPath(taskHubName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Task Hub. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The name of the TaskHub. + /// 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 schedulerName, string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TaskHubData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = TaskHubData.DeserializeTaskHubData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((TaskHubData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Task Hub. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The name of the TaskHub. + /// 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 schedulerName, string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TaskHubData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = TaskHubData.DeserializeTaskHubData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((TaskHubData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, TaskHubData data) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs/", false); + uri.AppendPath(taskHubName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, TaskHubData 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs/", false); + uri.AppendPath(taskHubName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or Update a Task Hub. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The name of the TaskHub. + /// Resource create parameters. + /// 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 schedulerName, string taskHubName, TaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName, 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 Task Hub. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The name of the TaskHub. + /// Resource create parameters. + /// 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 schedulerName, string taskHubName, TaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs/", false); + uri.AppendPath(taskHubName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs/", false); + uri.AppendPath(taskHubName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Task Hub. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The name of the TaskHub. + /// 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 schedulerName, string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Task Hub. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The name of the TaskHub. + /// 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 schedulerName, string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySchedulerRequestUri(string subscriptionId, string resourceGroupName, string schedulerName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySchedulerRequest(string subscriptionId, string resourceGroupName, string schedulerName) + { + 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.DurableTask/schedulers/", false); + uri.AppendPath(schedulerName, true); + uri.AppendPath("/taskHubs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Task Hubs. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListBySchedulerAsync(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateListBySchedulerRequest(subscriptionId, resourceGroupName, schedulerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TaskHubListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = TaskHubListResult.DeserializeTaskHubListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Task Hubs. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByScheduler(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateListBySchedulerRequest(subscriptionId, resourceGroupName, schedulerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TaskHubListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = TaskHubListResult.DeserializeTaskHubListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySchedulerNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySchedulerNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName) + { + 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 Task Hubs. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListBySchedulerNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateListBySchedulerNextPageRequest(nextLink, subscriptionId, resourceGroupName, schedulerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TaskHubListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = TaskHubListResult.DeserializeTaskHubListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Task Hubs. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListBySchedulerNextPage(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var message = CreateListBySchedulerNextPageRequest(nextLink, subscriptionId, resourceGroupName, schedulerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TaskHubListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = TaskHubListResult.DeserializeTaskHubListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerCollection.cs new file mode 100644 index 000000000000..e99481ec7eda --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DurableTask +{ + /// + /// 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 GetSchedulers method from an instance of . + /// + public partial class SchedulerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _schedulerClientDiagnostics; + private readonly SchedulersRestOperations _schedulerRestClient; + + /// Initializes a new instance of the class for mocking. + protected SchedulerCollection() + { + } + + /// 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 SchedulerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _schedulerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", SchedulerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SchedulerResource.ResourceType, out string schedulerApiVersion); + _schedulerRestClient = new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, schedulerApiVersion); +#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 or update a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 Scheduler. + /// Resource create parameters. + /// 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 schedulerName, SchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _schedulerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, 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 Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 Scheduler. + /// Resource create parameters. + /// 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 schedulerName, SchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _schedulerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data, cancellationToken); + var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Get"); + scope.Start(); + try + { + var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Get"); + scope.Start(); + try + { + var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Schedulers by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers + /// + /// + /// Operation Id + /// Scheduler_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _schedulerRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _schedulerRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), _schedulerClientDiagnostics, Pipeline, "SchedulerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Schedulers by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers + /// + /// + /// Operation Id + /// Scheduler_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _schedulerRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _schedulerRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), _schedulerClientDiagnostics, Pipeline, "SchedulerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Exists"); + scope.Start(); + try + { + var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, 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.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Exists"); + scope.Start(); + try + { + var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.Serialization.cs new file mode 100644 index 000000000000..b3df03072f2b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + public partial class SchedulerData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + SchedulerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SchedulerData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSchedulerData(document.RootElement, options); + } + + internal static SchedulerData DeserializeSchedulerData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SchedulerProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SchedulerProperties.DeserializeSchedulerProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + 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"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SchedulerData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SchedulerData)} does not support writing '{options.Format}' format."); + } + } + + SchedulerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSchedulerData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SchedulerData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.cs new file mode 100644 index 000000000000..b0efc6bb0c8b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + /// + /// A class representing the Scheduler data model. + /// A Durable Task Scheduler resource + /// + public partial class SchedulerData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public SchedulerData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal SchedulerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SchedulerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SchedulerData() + { + } + + /// The resource-specific properties for this resource. + public SchedulerProperties Properties { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.Serialization.cs new file mode 100644 index 000000000000..ee2bf83f4e2f --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DurableTask +{ + public partial class SchedulerResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SchedulerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SchedulerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.cs new file mode 100644 index 000000000000..0f8025ffa154 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.cs @@ -0,0 +1,775 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DurableTask +{ + /// + /// A Class representing a Scheduler 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 GetSchedulerResource method. + /// Otherwise you can get one from its parent resource using the GetScheduler method. + /// + public partial class SchedulerResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The schedulerName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _schedulerClientDiagnostics; + private readonly SchedulersRestOperations _schedulerRestClient; + private readonly SchedulerData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DurableTask/schedulers"; + + /// Initializes a new instance of the class for mocking. + protected SchedulerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SchedulerResource(ArmClient client, SchedulerData 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 SchedulerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _schedulerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string schedulerApiVersion); + _schedulerRestClient = new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, schedulerApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 SchedulerData 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 TaskHubResources in the Scheduler. + /// An object representing collection of TaskHubResources and their operations over a TaskHubResource. + public virtual TaskHubCollection GetTaskHubs() + { + return GetCachedClient(client => new TaskHubCollection(client, Id)); + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetTaskHubAsync(string taskHubName, CancellationToken cancellationToken = default) + { + return await GetTaskHubs().GetAsync(taskHubName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetTaskHub(string taskHubName, CancellationToken cancellationToken = default) + { + return GetTaskHubs().Get(taskHubName, cancellationToken); + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Get"); + scope.Start(); + try + { + var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Get"); + scope.Start(); + try + { + var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Delete + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Delete"); + scope.Start(); + try + { + var response = await _schedulerRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(_schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Delete + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Delete"); + scope.Start(); + try + { + var response = _schedulerRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new DurableTaskArmOperation(_schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Update + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Update"); + scope.Start(); + try + { + var response = await _schedulerRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Scheduler + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Update + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Update"); + scope.Start(); + try + { + var response = _schedulerRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken); + var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SchedulerData(current.Location); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SchedulerData(current.Location); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.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.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SchedulerData(current.Location); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.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.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + 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 = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SchedulerData(current.Location); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SchedulerData(current.Location); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} + /// + /// + /// Operation Id + /// Scheduler_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _schedulerClientDiagnostics.CreateScope("SchedulerResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SchedulerData(current.Location); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubCollection.cs new file mode 100644 index 000000000000..b6cb03eee7e5 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DurableTask +{ + /// + /// 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 GetTaskHubs method from an instance of . + /// + public partial class TaskHubCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _taskHubClientDiagnostics; + private readonly TaskHubsRestOperations _taskHubRestClient; + + /// Initializes a new instance of the class for mocking. + protected TaskHubCollection() + { + } + + /// 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 TaskHubCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _taskHubClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", TaskHubResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(TaskHubResource.ResourceType, out string taskHubApiVersion); + _taskHubRestClient = new TaskHubsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, taskHubApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SchedulerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SchedulerResource.ResourceType), nameof(id)); + } + + /// + /// Create or Update a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 TaskHub. + /// Resource create parameters. + /// 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 taskHubName, TaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _taskHubRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new TaskHubOperationSource(Client), _taskHubClientDiagnostics, Pipeline, _taskHubRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, 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 Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 TaskHub. + /// Resource create parameters. + /// 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 taskHubName, TaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _taskHubRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data, cancellationToken); + var operation = new DurableTaskArmOperation(new TaskHubOperationSource(Client), _taskHubClientDiagnostics, Pipeline, _taskHubRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.Get"); + scope.Start(); + try + { + var response = await _taskHubRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TaskHubResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.Get"); + scope.Start(); + try + { + var response = _taskHubRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TaskHubResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Task Hubs + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs + /// + /// + /// Operation Id + /// TaskHub_ListByScheduler + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _taskHubRestClient.CreateListBySchedulerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _taskHubRestClient.CreateListBySchedulerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new TaskHubResource(Client, TaskHubData.DeserializeTaskHubData(e)), _taskHubClientDiagnostics, Pipeline, "TaskHubCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Task Hubs + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs + /// + /// + /// Operation Id + /// TaskHub_ListByScheduler + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _taskHubRestClient.CreateListBySchedulerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _taskHubRestClient.CreateListBySchedulerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new TaskHubResource(Client, TaskHubData.DeserializeTaskHubData(e)), _taskHubClientDiagnostics, Pipeline, "TaskHubCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.Exists"); + scope.Start(); + try + { + var response = await _taskHubRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, 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.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.Exists"); + scope.Start(); + try + { + var response = _taskHubRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _taskHubRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new TaskHubResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubCollection.GetIfExists"); + scope.Start(); + try + { + var response = _taskHubRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new TaskHubResource(Client, response.Value), 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/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubData.Serialization.cs new file mode 100644 index 000000000000..ebedcde70af3 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + public partial class TaskHubData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TaskHubData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + TaskHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TaskHubData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTaskHubData(document.RootElement, options); + } + + internal static TaskHubData DeserializeTaskHubData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TaskHubProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = TaskHubProperties.DeserializeTaskHubProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TaskHubData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TaskHubData)} does not support writing '{options.Format}' format."); + } + } + + TaskHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTaskHubData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TaskHubData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubData.cs new file mode 100644 index 000000000000..32ccf2cef315 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubData.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; +using Azure.ResourceManager.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + /// + /// A class representing the TaskHub data model. + /// A Task Hub resource belonging to the scheduler + /// + public partial class TaskHubData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TaskHubData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal TaskHubData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, TaskHubProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public TaskHubProperties Properties { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubResource.Serialization.cs new file mode 100644 index 000000000000..dbb7d1eccb6a --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DurableTask +{ + public partial class TaskHubResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + TaskHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + TaskHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubResource.cs new file mode 100644 index 000000000000..732958f3e416 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubResource.cs @@ -0,0 +1,347 @@ +// 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.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DurableTask +{ + /// + /// A Class representing a TaskHub 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 GetTaskHubResource method. + /// Otherwise you can get one from its parent resource using the GetTaskHub method. + /// + public partial class TaskHubResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The schedulerName. + /// The taskHubName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _taskHubClientDiagnostics; + private readonly TaskHubsRestOperations _taskHubRestClient; + private readonly TaskHubData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DurableTask/schedulers/taskHubs"; + + /// Initializes a new instance of the class for mocking. + protected TaskHubResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal TaskHubResource(ArmClient client, TaskHubData 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 TaskHubResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _taskHubClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string taskHubApiVersion); + _taskHubRestClient = new TaskHubsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, taskHubApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 TaskHubData 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 Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubResource.Get"); + scope.Start(); + try + { + var response = await _taskHubRestClient.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 TaskHubResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Get + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubResource.Get"); + scope.Start(); + try + { + var response = _taskHubRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TaskHubResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Delete + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _taskHubClientDiagnostics.CreateScope("TaskHubResource.Delete"); + scope.Start(); + try + { + var response = await _taskHubRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(_taskHubClientDiagnostics, Pipeline, _taskHubRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_Delete + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _taskHubClientDiagnostics.CreateScope("TaskHubResource.Delete"); + scope.Start(); + try + { + var response = _taskHubRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DurableTaskArmOperation(_taskHubClientDiagnostics, Pipeline, _taskHubRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or Update a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, TaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubResource.Update"); + scope.Start(); + try + { + var response = await _taskHubRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DurableTaskArmOperation(new TaskHubOperationSource(Client), _taskHubClientDiagnostics, Pipeline, _taskHubRestClient.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 a Task Hub + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} + /// + /// + /// Operation Id + /// TaskHub_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-10-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, TaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _taskHubClientDiagnostics.CreateScope("TaskHubResource.Update"); + scope.Start(); + try + { + var response = _taskHubRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new DurableTaskArmOperation(new TaskHubOperationSource(Client), _taskHubClientDiagnostics, Pipeline, _taskHubRestClient.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/durabletask/Azure.ResourceManager.DurableTask/src/Properties/AssemblyInfo.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..f4ddd8db408b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.DurableTask.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("DurableTask")] diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Azure.ResourceManager.DurableTask.Tests.csproj b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Azure.ResourceManager.DurableTask.Tests.csproj new file mode 100644 index 000000000000..c0676a62c635 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Azure.ResourceManager.DurableTask.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/DurableTaskManagementTestBase.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/DurableTaskManagementTestBase.cs new file mode 100644 index 000000000000..f71a1438b58a --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/DurableTaskManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.DurableTask.Tests +{ + public class DurableTaskManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected DurableTaskManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected DurableTaskManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + 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/durabletask/Azure.ResourceManager.DurableTask/tests/DurableTaskManagementTestEnvironment.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/DurableTaskManagementTestEnvironment.cs new file mode 100644 index 000000000000..e95562b17623 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/DurableTaskManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.DurableTask.Tests +{ + public class DurableTaskManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml b/sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml new file mode 100644 index 000000000000..15f43e9507f9 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/durabletask/DurableTask.Management +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/durabletask/ci.mgmt.yml b/sdk/durabletask/ci.mgmt.yml new file mode 100644 index 000000000000..8e58a086dadf --- /dev/null +++ b/sdk/durabletask/ci.mgmt.yml @@ -0,0 +1,26 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/durabletask /ci.mgmt.yml + - sdk/durabletask /Azure.ResourceManager.DurableTask / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: durabletask + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.DurableTask + safeName: AzureResourceManagerDurableTask diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.net8.0.cs b/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.net8.0.cs index dcb36b235493..6e8aca3f5bcd 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.net8.0.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.net8.0.cs @@ -72,6 +72,8 @@ public static partial class FabricExtensions public static Azure.ResourceManager.Fabric.FabricCapacityResource GetFabricCapacityResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetSkusFabricCapacities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetSkusFabricCapacitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetUsagesFabricCapacities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetUsagesFabricCapacitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Fabric.Mocking @@ -97,6 +99,8 @@ protected MockableFabricSubscriptionResource() { } public virtual Azure.AsyncPageable GetFabricCapacitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSkusFabricCapacities(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSkusFabricCapacitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetUsagesFabricCapacities(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetUsagesFabricCapacitiesAsync(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Fabric.Models @@ -106,8 +110,10 @@ public static partial class ArmFabricModelFactory public static Azure.ResourceManager.Fabric.FabricCapacityData FabricCapacityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Fabric.Models.FabricCapacityProperties properties = null, Azure.ResourceManager.Fabric.Models.FabricSku sku = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricCapacityProperties FabricCapacityProperties(Azure.ResourceManager.Fabric.Models.FabricProvisioningState? provisioningState = default(Azure.ResourceManager.Fabric.Models.FabricProvisioningState?), Azure.ResourceManager.Fabric.Models.FabricResourceState? state = default(Azure.ResourceManager.Fabric.Models.FabricResourceState?), System.Collections.Generic.IEnumerable administrationMembers = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricNameAvailabilityResult FabricNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.Fabric.Models.FabricNameUnavailableReason? reason = default(Azure.ResourceManager.Fabric.Models.FabricNameUnavailableReason?), string message = null) { throw null; } + public static Azure.ResourceManager.Fabric.Models.FabricQuota FabricQuota(Azure.ResourceManager.Fabric.Models.QuotaName name = null, string unit = null, long currentValue = (long)0, long limit = (long)0) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricSkuDetailsForExistingCapacity FabricSkuDetailsForExistingCapacity(string resourceType = null, Azure.ResourceManager.Fabric.Models.FabricSku sku = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricSkuDetailsForNewCapacity FabricSkuDetailsForNewCapacity(string resourceType = null, string name = null, System.Collections.Generic.IEnumerable locations = null) { throw null; } + public static Azure.ResourceManager.Fabric.Models.QuotaName QuotaName(string value = null, string localizedValue = null) { throw null; } } public partial class FabricCapacityAdministration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -211,6 +217,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Fabric.Models.FabricProvisioningState left, Azure.ResourceManager.Fabric.Models.FabricProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class FabricQuota : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FabricQuota() { } + public long CurrentValue { get { throw null; } } + public long Limit { get { throw null; } } + public Azure.ResourceManager.Fabric.Models.QuotaName Name { get { throw null; } } + public string Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.FabricQuota System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.FabricQuota System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct FabricResourceState : System.IEquatable { @@ -293,4 +313,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Fabric.Models.FabricSkuTier left, Azure.ResourceManager.Fabric.Models.FabricSkuTier right) { throw null; } public override string ToString() { throw null; } } + public partial class QuotaName : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal QuotaName() { } + public string LocalizedValue { get { throw null; } } + public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.QuotaName System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.QuotaName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs b/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs index dcb36b235493..6e8aca3f5bcd 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs @@ -72,6 +72,8 @@ public static partial class FabricExtensions public static Azure.ResourceManager.Fabric.FabricCapacityResource GetFabricCapacityResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetSkusFabricCapacities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetSkusFabricCapacitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetUsagesFabricCapacities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetUsagesFabricCapacitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Fabric.Mocking @@ -97,6 +99,8 @@ protected MockableFabricSubscriptionResource() { } public virtual Azure.AsyncPageable GetFabricCapacitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSkusFabricCapacities(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSkusFabricCapacitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetUsagesFabricCapacities(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetUsagesFabricCapacitiesAsync(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Fabric.Models @@ -106,8 +110,10 @@ public static partial class ArmFabricModelFactory public static Azure.ResourceManager.Fabric.FabricCapacityData FabricCapacityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Fabric.Models.FabricCapacityProperties properties = null, Azure.ResourceManager.Fabric.Models.FabricSku sku = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricCapacityProperties FabricCapacityProperties(Azure.ResourceManager.Fabric.Models.FabricProvisioningState? provisioningState = default(Azure.ResourceManager.Fabric.Models.FabricProvisioningState?), Azure.ResourceManager.Fabric.Models.FabricResourceState? state = default(Azure.ResourceManager.Fabric.Models.FabricResourceState?), System.Collections.Generic.IEnumerable administrationMembers = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricNameAvailabilityResult FabricNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.Fabric.Models.FabricNameUnavailableReason? reason = default(Azure.ResourceManager.Fabric.Models.FabricNameUnavailableReason?), string message = null) { throw null; } + public static Azure.ResourceManager.Fabric.Models.FabricQuota FabricQuota(Azure.ResourceManager.Fabric.Models.QuotaName name = null, string unit = null, long currentValue = (long)0, long limit = (long)0) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricSkuDetailsForExistingCapacity FabricSkuDetailsForExistingCapacity(string resourceType = null, Azure.ResourceManager.Fabric.Models.FabricSku sku = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricSkuDetailsForNewCapacity FabricSkuDetailsForNewCapacity(string resourceType = null, string name = null, System.Collections.Generic.IEnumerable locations = null) { throw null; } + public static Azure.ResourceManager.Fabric.Models.QuotaName QuotaName(string value = null, string localizedValue = null) { throw null; } } public partial class FabricCapacityAdministration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -211,6 +217,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Fabric.Models.FabricProvisioningState left, Azure.ResourceManager.Fabric.Models.FabricProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class FabricQuota : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FabricQuota() { } + public long CurrentValue { get { throw null; } } + public long Limit { get { throw null; } } + public Azure.ResourceManager.Fabric.Models.QuotaName Name { get { throw null; } } + public string Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.FabricQuota System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.FabricQuota System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct FabricResourceState : System.IEquatable { @@ -293,4 +313,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Fabric.Models.FabricSkuTier left, Azure.ResourceManager.Fabric.Models.FabricSkuTier right) { throw null; } public override string ToString() { throw null; } } + public partial class QuotaName : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal QuotaName() { } + public string LocalizedValue { get { throw null; } } + public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.QuotaName System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.QuotaName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs index b1c27d0f1b41..46bd90876462 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_FabricCapacityCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_CreateOrUpdate.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_CreateOrUpdate.json // this example is just showing the usage of "FabricCapacity_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task CreateOrUpdate_CreateOrUpdateACapacity() [Ignore("Only validating compilation of examples")] public async Task Get_GetACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Get.json // this example is just showing the usage of "FabricCapacity_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Get_GetACapacity() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListCapacitiesByResourceGroup() { - // Generated from example definition: 2023-11-01/FabricCapacities_ListByResourceGroup.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_ListByResourceGroup.json // this example is just showing the usage of "FabricCapacity_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task GetAll_ListCapacitiesByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Get.json // this example is just showing the usage of "FabricCapacity_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -153,7 +153,7 @@ public async Task Exists_GetACapacity() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Get.json // this example is just showing the usage of "FabricCapacity_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs index 5e2c7ab6aeea..e009f1dc7148 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FabricCapacityResource [Ignore("Only validating compilation of examples")] public async Task Get_GetACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Get.json // this example is just showing the usage of "FabricCapacity_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetACapacity() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Delete.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Delete.json // this example is just showing the usage of "FabricCapacity_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task Delete_DeleteACapacity() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateCapacityProperties() { - // Generated from example definition: 2023-11-01/FabricCapacities_Update.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Update.json // this example is just showing the usage of "FabricCapacity_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +116,7 @@ public async Task Update_UpdateCapacityProperties() [Ignore("Only validating compilation of examples")] public async Task Resume_ResumeCapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Resume.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Resume.json // this example is just showing the usage of "FabricCapacities_Resume" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -142,7 +142,7 @@ public async Task Resume_ResumeCapacity() [Ignore("Only validating compilation of examples")] public async Task Suspend_SuspendCapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Suspend.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Suspend.json // this example is just showing the usage of "FabricCapacities_Suspend" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task Suspend_SuspendCapacity() [Ignore("Only validating compilation of examples")] public async Task GetSkusForCapacity_ListEligibleSKUsForAnExistingCapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_ListSkusForCapacity.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_ListSkusForCapacity.json // this example is just showing the usage of "FabricCapacities_ListSkusForCapacity" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index e7a09ad2cfea..98d5e5225e06 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetFabricCapacities_ListCapacitiesBySubscription() { - // Generated from example definition: 2023-11-01/FabricCapacities_ListBySubscription.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_ListBySubscription.json // this example is just showing the usage of "FabricCapacity_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task GetFabricCapacities_ListCapacitiesBySubscription() [Ignore("Only validating compilation of examples")] public async Task CheckFabricCapacityNameAvailability_CheckNameAvailabilityOfACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_CheckNameAvailability.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_CheckNameAvailability.json // this example is just showing the usage of "FabricCapacities_CheckFabricCapacityNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task CheckFabricCapacityNameAvailability_CheckNameAvailabilityOfACa [Ignore("Only validating compilation of examples")] public async Task GetSkusFabricCapacities_ListEligibleSKUsForANewCapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_ListSkus.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_ListSkus.json // this example is just showing the usage of "FabricCapacities_ListSkus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,5 +104,33 @@ public async Task GetSkusFabricCapacities_ListEligibleSKUsForANewCapacity() Console.WriteLine("Succeeded"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetUsagesFabricCapacities_ListQuotaUsagesForASubscription() + { + // Generated from example definition: 2025-01-15-preview/FabricCapacities_ListUsagesBySubscription.json + // this example is just showing the usage of "FabricCapacities_ListUsages" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + string location = "centraluseuap"; + await foreach (FabricQuota item in subscriptionResource.GetUsagesFabricCapacitiesAsync(location)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/ArmFabricModelFactory.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/ArmFabricModelFactory.cs index 8941166c4928..814f361c9cea 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/ArmFabricModelFactory.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/ArmFabricModelFactory.cs @@ -84,5 +84,25 @@ public static FabricSkuDetailsForNewCapacity FabricSkuDetailsForNewCapacity(stri return new FabricSkuDetailsForNewCapacity(resourceType, name, locations?.ToList(), serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The name of the quota. + /// The unit of usage measurement. + /// The current usage of the resource. + /// The maximum permitted usage of the resource. + /// A new instance for mocking. + public static FabricQuota FabricQuota(QuotaName name = null, string unit = null, long currentValue = default, long limit = default) + { + return new FabricQuota(name, unit, currentValue, limit, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the resource. + /// The localized name of the resource. + /// A new instance for mocking. + public static QuotaName QuotaName(string value = null, string localizedValue = null) + { + return new QuotaName(value, localizedValue, serializedAdditionalRawData: null); + } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs index ed974a30caaf..89f3f3fa3879 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs @@ -82,7 +82,7 @@ public static FabricCapacityCollection GetFabricCapacities(this ResourceGroupRes /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -120,7 +120,7 @@ public static async Task> GetFabricCapacityAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -158,7 +158,7 @@ public static Response GetFabricCapacity(this ResourceGr /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -194,7 +194,7 @@ public static AsyncPageable GetFabricCapacitiesAsync(thi /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -230,7 +230,7 @@ public static Pageable GetFabricCapacities(this Subscrip /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -267,7 +267,7 @@ public static async Task> CheckFabricCapa /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -304,7 +304,7 @@ public static Response CheckFabricCapacityNameAvai /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -340,7 +340,7 @@ public static AsyncPageable GetSkusFabricCapacit /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -362,5 +362,81 @@ public static Pageable GetSkusFabricCapacities(t return GetMockableFabricSubscriptionResource(subscriptionResource).GetSkusFabricCapacities(cancellationToken); } + + /// + /// List the current consumption and limit in this location for the provided subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Fabric/locations/{location}/usages + /// + /// + /// Operation Id + /// FabricCapacities_ListUsages + /// + /// + /// Default Api Version + /// 2025-01-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetUsagesFabricCapacitiesAsync(this SubscriptionResource subscriptionResource, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableFabricSubscriptionResource(subscriptionResource).GetUsagesFabricCapacitiesAsync(location, cancellationToken); + } + + /// + /// List the current consumption and limit in this location for the provided subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Fabric/locations/{location}/usages + /// + /// + /// Operation Id + /// FabricCapacities_ListUsages + /// + /// + /// Default Api Version + /// 2025-01-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetUsagesFabricCapacities(this SubscriptionResource subscriptionResource, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableFabricSubscriptionResource(subscriptionResource).GetUsagesFabricCapacities(location, cancellationToken); + } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs index 889c9fd5efe8..3b568590ab79 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual FabricCapacityCollection GetFabricCapacities() /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetFabricCapacityAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricSubscriptionResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricSubscriptionResource.cs index 713a6f250fc9..4acb11840856 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricSubscriptionResource.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricSubscriptionResource.cs @@ -55,7 +55,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -85,7 +85,7 @@ public virtual AsyncPageable GetFabricCapacitiesAsync(Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual Pageable GetFabricCapacities(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual async Task> CheckFabricCap /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -201,7 +201,7 @@ public virtual Response CheckFabricCapacityNameAva /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual AsyncPageable GetSkusFabricCapaci /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -247,5 +247,75 @@ public virtual Pageable GetSkusFabricCapacities( HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FabricCapacityRestClient.CreateListSkusNextPageRequest(nextLink, Id.SubscriptionId); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => FabricSkuDetailsForNewCapacity.DeserializeFabricSkuDetailsForNewCapacity(e), FabricCapacityClientDiagnostics, Pipeline, "MockableFabricSubscriptionResource.GetSkusFabricCapacities", "value", "nextLink", cancellationToken); } + + /// + /// List the current consumption and limit in this location for the provided subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Fabric/locations/{location}/usages + /// + /// + /// Operation Id + /// FabricCapacities_ListUsages + /// + /// + /// Default Api Version + /// 2025-01-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The location name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetUsagesFabricCapacitiesAsync(string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => FabricCapacityRestClient.CreateListUsagesRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FabricCapacityRestClient.CreateListUsagesNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => FabricQuota.DeserializeFabricQuota(e), FabricCapacityClientDiagnostics, Pipeline, "MockableFabricSubscriptionResource.GetUsagesFabricCapacities", "value", "nextLink", cancellationToken); + } + + /// + /// List the current consumption and limit in this location for the provided subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Fabric/locations/{location}/usages + /// + /// + /// Operation Id + /// FabricCapacities_ListUsages + /// + /// + /// Default Api Version + /// 2025-01-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The location name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetUsagesFabricCapacities(string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => FabricCapacityRestClient.CreateListUsagesRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FabricCapacityRestClient.CreateListUsagesNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => FabricQuota.DeserializeFabricQuota(e), FabricCapacityClientDiagnostics, Pipeline, "MockableFabricSubscriptionResource.GetUsagesFabricCapacities", "value", "nextLink", cancellationToken); + } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs index db3ef094894a..a26c2e3dcae7 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string capa /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string capacityName, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string capacityName, Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string capacityName, CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs index 646a5cf80b01..721decb55e7d 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task ResumeAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual ArmOperation Resume(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -486,7 +486,7 @@ public virtual async Task SuspendAsync(WaitUntil waitUntil, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -528,7 +528,7 @@ public virtual ArmOperation Suspend(WaitUntil waitUntil, CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -558,7 +558,7 @@ public virtual AsyncPageable GetSkusForCapa /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -588,7 +588,7 @@ public virtual Pageable GetSkusForCapacity( /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -650,7 +650,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -712,7 +712,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -769,7 +769,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -826,7 +826,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -886,7 +886,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.Serialization.cs new file mode 100644 index 000000000000..3ab7cfb825b0 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.Serialization.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fabric.Models +{ + public partial class FabricQuota : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FabricQuota)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteObjectValue(Name, options); + } + writer.WritePropertyName("unit"u8); + writer.WriteStringValue(Unit); + writer.WritePropertyName("currentValue"u8); + writer.WriteNumberValue(CurrentValue); + writer.WritePropertyName("limit"u8); + writer.WriteNumberValue(Limit); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FabricQuota IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FabricQuota)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFabricQuota(document.RootElement, options); + } + + internal static FabricQuota DeserializeFabricQuota(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + QuotaName name = default; + string unit = default; + long currentValue = default; + long limit = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = QuotaName.DeserializeQuotaName(property.Value, options); + continue; + } + if (property.NameEquals("unit"u8)) + { + unit = property.Value.GetString(); + continue; + } + if (property.NameEquals("currentValue"u8)) + { + currentValue = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("limit"u8)) + { + limit = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FabricQuota(name, unit, currentValue, limit, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FabricQuota)} does not support writing '{options.Format}' format."); + } + } + + FabricQuota IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFabricQuota(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FabricQuota)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.cs new file mode 100644 index 000000000000..44b2e23c9f80 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Fabric.Models +{ + /// Describes Resource Quota. + public partial class FabricQuota + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The unit of usage measurement. + /// The current usage of the resource. + /// The maximum permitted usage of the resource. + /// is null. + internal FabricQuota(string unit, long currentValue, long limit) + { + Argument.AssertNotNull(unit, nameof(unit)); + + Unit = unit; + CurrentValue = currentValue; + Limit = limit; + } + + /// Initializes a new instance of . + /// The name of the quota. + /// The unit of usage measurement. + /// The current usage of the resource. + /// The maximum permitted usage of the resource. + /// Keeps track of any properties unknown to the library. + internal FabricQuota(QuotaName name, string unit, long currentValue, long limit, IDictionary serializedAdditionalRawData) + { + Name = name; + Unit = unit; + CurrentValue = currentValue; + Limit = limit; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FabricQuota() + { + } + + /// The name of the quota. + public QuotaName Name { get; } + /// The unit of usage measurement. + public string Unit { get; } + /// The current usage of the resource. + public long CurrentValue { get; } + /// The maximum permitted usage of the resource. + public long Limit { get; } + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.Serialization.cs new file mode 100644 index 000000000000..65e95624e4a0 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fabric.Models +{ + internal partial class PagedQuota : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PagedQuota)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PagedQuota IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PagedQuota)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePagedQuota(document.RootElement, options); + } + + internal static PagedQuota DeserializePagedQuota(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FabricQuota.DeserializeFabricQuota(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PagedQuota(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PagedQuota)} does not support writing '{options.Format}' format."); + } + } + + PagedQuota IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePagedQuota(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PagedQuota)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.cs new file mode 100644 index 000000000000..9126a94eba10 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.Fabric.Models +{ + /// Paged collection of Quota items. + internal partial class PagedQuota + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Quota items on this page. + /// is null. + internal PagedQuota(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Quota items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal PagedQuota(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PagedQuota() + { + } + + /// The Quota items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.Serialization.cs new file mode 100644 index 000000000000..4580eef46c42 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Fabric.Models +{ + public partial class QuotaName : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(QuotaName)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (Optional.IsDefined(LocalizedValue)) + { + writer.WritePropertyName("localizedValue"u8); + writer.WriteStringValue(LocalizedValue); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + QuotaName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(QuotaName)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeQuotaName(document.RootElement, options); + } + + internal static QuotaName DeserializeQuotaName(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string value = default; + string localizedValue = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("localizedValue"u8)) + { + localizedValue = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new QuotaName(value, localizedValue, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(QuotaName)} does not support writing '{options.Format}' format."); + } + } + + QuotaName IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeQuotaName(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(QuotaName)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.cs new file mode 100644 index 000000000000..2cc074030df6 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.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; + +namespace Azure.ResourceManager.Fabric.Models +{ + /// The Quota Names. + public partial class QuotaName + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal QuotaName() + { + } + + /// Initializes a new instance of . + /// The name of the resource. + /// The localized name of the resource. + /// Keeps track of any properties unknown to the library. + internal QuotaName(string value, string localizedValue, IDictionary serializedAdditionalRawData) + { + Value = value; + LocalizedValue = localizedValue; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the resource. + public string Value { get; } + /// The localized name of the resource. + public string LocalizedValue { get; } + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs index b51c46a4686a..1f6ede6ea9e0 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs @@ -32,7 +32,7 @@ public FabricCapacitiesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2025-01-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -1000,6 +1000,92 @@ public Response ListSkus(string subscripti } } + internal RequestUriBuilder CreateListUsagesRequestUri(string subscriptionId, string location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Fabric/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/usages", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListUsagesRequest(string subscriptionId, string location) + { + 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.Fabric/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/usages", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the current consumption and limit in this location for the provided subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListUsagesAsync(string subscriptionId, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + using var message = CreateListUsagesRequest(subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PagedQuota value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PagedQuota.DeserializePagedQuota(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the current consumption and limit in this location for the provided subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListUsages(string subscriptionId, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + using var message = CreateListUsagesRequest(subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PagedQuota value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PagedQuota.DeserializePagedQuota(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); @@ -1315,5 +1401,85 @@ public Response ListSkusNextPage(string ne throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListUsagesNextPageRequestUri(string nextLink, string subscriptionId, string location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListUsagesNextPageRequest(string nextLink, string subscriptionId, string location) + { + 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 current consumption and limit in this location for the provided subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListUsagesNextPageAsync(string nextLink, string subscriptionId, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + using var message = CreateListUsagesNextPageRequest(nextLink, subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PagedQuota value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PagedQuota.DeserializePagedQuota(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the current consumption and limit in this location for the provided subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListUsagesNextPage(string nextLink, string subscriptionId, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + using var message = CreateListUsagesNextPageRequest(nextLink, subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PagedQuota value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PagedQuota.DeserializePagedQuota(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/tsp-location.yaml b/sdk/fabric/Azure.ResourceManager.Fabric/tsp-location.yaml index 8f804a6ba37f..5b613698e053 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/tsp-location.yaml +++ b/sdk/fabric/Azure.ResourceManager.Fabric/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/fabric/Microsoft.Fabric.Management -commit: 7e22a66617633d162735fe65388c2852127b4aac +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/Configuration.json b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/Configuration.json new file mode 100644 index 000000000000..dc18213719b4 --- /dev/null +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/Configuration.json @@ -0,0 +1,12 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.HealthDataAIServices", + "library-name": "Azure.ResourceManager.HealthDataAIServices", + "flavor": "azure", + "use-model-reader-writer": true, + "shared-source-folders": [ + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared", + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "azure-arm": true +} diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tsp-location.yaml b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tsp-location.yaml index 38275899ab77..da937c161a69 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tsp-location.yaml +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/healthdataaiservices/HealthDataAIServices.Management -commit: 057370caecbbfbb39c560bc1e9c2ab89da7cf6b6 +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tspCodeModel.json b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tspCodeModel.json new file mode 100644 index 000000000000..c08beac4b75d --- /dev/null +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/tspCodeModel.json @@ -0,0 +1,10375 @@ +{ + "$id": "1", + "Name": "Microsoft.HealthDataAIServices", + "ApiVersions": [ + "2024-09-20" + ], + "Enums": [ + { + "$id": "2", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "10", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "12", + "kind": "enum", + "name": "PrivateEndpointServiceConnectionStatus", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointServiceConnectionStatus", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "14", + "kind": "enumvalue", + "name": "Pending", + "value": "Pending", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "doc": "Connectionaiting for approval or rejection", + "decorators": [] + }, + { + "$id": "16", + "kind": "enumvalue", + "name": "Approved", + "value": "Approved", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "doc": "Connection approved", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "Rejected", + "value": "Rejected", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "doc": "Connection Rejected", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "The private endpoint connection status.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "20", + "kind": "enum", + "name": "PrivateEndpointConnectionProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProvisioningState", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "22", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "Connection has been provisioned", + "decorators": [] + }, + { + "$id": "24", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "Connection is being created", + "decorators": [] + }, + { + "$id": "26", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "Connection is being deleted", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "Connection provisioning has failed", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "The current provisioning state.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "30", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "32", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "34", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "38", + "kind": "enum", + "name": "HealthDataAIServicesProvisioningState", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.ProvisioningState", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "40", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "42", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "44", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "Provisioning", + "value": "Provisioning", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "The resource is being provisioned.", + "decorators": [] + }, + { + "$id": "48", + "kind": "enumvalue", + "name": "Updating", + "value": "Updating", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "The resource is being updated.", + "decorators": [] + }, + { + "$id": "50", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "The resource is being deleted.", + "decorators": [] + }, + { + "$id": "52", + "kind": "enumvalue", + "name": "Accepted", + "value": "Accepted", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "The resource provisioning request has been accepted.", + "decorators": [] + } + ], + "namespace": "Microsoft.HealthDataAIServices", + "doc": "The status of the current operation.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "54", + "kind": "enum", + "name": "HealthDataAIServicesPublicNetworkAccess", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PublicNetworkAccess", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "56", + "kind": "enumvalue", + "name": "Enabled", + "value": "Enabled", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "54" + }, + "doc": "The public network access is enabled", + "decorators": [] + }, + { + "$id": "58", + "kind": "enumvalue", + "name": "Disabled", + "value": "Disabled", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "54" + }, + "doc": "The public network access is disabled", + "decorators": [] + } + ], + "namespace": "Microsoft.HealthDataAIServices", + "doc": "State of the public network access.", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "60", + "kind": "enum", + "name": "ManagedServiceIdentityType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "62", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "doc": "No managed identity.", + "decorators": [] + }, + { + "$id": "64", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "doc": "System assigned managed identity.", + "decorators": [] + }, + { + "$id": "66", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "doc": "User assigned managed identity.", + "decorators": [] + }, + { + "$id": "68", + "kind": "enumvalue", + "name": "SystemAssigned,UserAssigned", + "value": "SystemAssigned,UserAssigned", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "doc": "System and user assigned managed identity.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "70", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "72", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "70" + }, + "doc": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "74", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "70" + }, + "doc": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "76", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "70" + }, + "doc": "Indicates the operation is initiated by a user or system.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "78", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "80", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Actions are for internal-only APIs.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "82", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.Versions", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "84", + "kind": "enumvalue", + "name": "v2024_09_20", + "value": "2024-09-20", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "82" + }, + "doc": "The 2024-09-20 version.", + "decorators": [] + } + ], + "namespace": "Microsoft.HealthDataAIServices", + "doc": "Supported API versions for the Microsoft.HealthDataAIServices resource provider.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "Models": [ + { + "$id": "86", + "kind": "model", + "name": "PrivateLinkResourceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a PrivateLinkResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "87", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The PrivateLinkResource items on this page", + "type": { + "$id": "88", + "kind": "array", + "name": "ArrayPrivateLinkResource", + "valueType": { + "$id": "89", + "kind": "model", + "name": "PrivateLinkResource", + "namespace": "Microsoft.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateLinkResource", + "usage": "Output,Json", + "doc": "Private Links for DeidService resource", + "decorators": [], + "baseModel": { + "$id": "90", + "kind": "model", + "name": "ProxyResource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ProxyResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "decorators": [], + "baseModel": { + "$id": "91", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "92", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "type": { + "$id": "93", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "94", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", + "serializationOptions": { + "$id": "95", + "json": { + "$id": "96", + "name": "id" + } + } + }, + { + "$id": "97", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "98", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name", + "serializationOptions": { + "$id": "99", + "json": { + "$id": "100", + "name": "name" + } + } + }, + { + "$id": "101", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "102", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type", + "serializationOptions": { + "$id": "104", + "json": { + "$id": "105", + "name": "type" + } + } + }, + { + "$id": "106", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "107", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "108", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy", + "serializationOptions": { + "$id": "110", + "json": { + "$id": "111", + "name": "createdBy" + } + } + }, + { + "$id": "112", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "113", + "json": { + "$id": "114", + "name": "createdByType" + } + } + }, + { + "$id": "115", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "116", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt", + "serializationOptions": { + "$id": "118", + "json": { + "$id": "119", + "name": "createdAt" + } + } + }, + { + "$id": "120", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy", + "serializationOptions": { + "$id": "122", + "json": { + "$id": "123", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "124", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "125", + "json": { + "$id": "126", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "127", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "128", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt", + "serializationOptions": { + "$id": "130", + "json": { + "$id": "131", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "132", + "json": { + "$id": "133", + "name": "systemData" + } + } + } + ] + }, + "properties": [] + }, + "properties": [ + { + "$id": "134", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "135", + "kind": "model", + "name": "PrivateLinkResourceProperties", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties", + "usage": "Output,Json", + "doc": "Properties of a private link resource.", + "decorators": [], + "properties": [ + { + "$id": "136", + "kind": "property", + "name": "groupId", + "serializedName": "groupId", + "doc": "The private link resource group id.", + "type": { + "$id": "137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties.groupId", + "serializationOptions": { + "$id": "138", + "json": { + "$id": "139", + "name": "groupId" + } + } + }, + { + "$id": "140", + "kind": "property", + "name": "requiredMembers", + "serializedName": "requiredMembers", + "doc": "The private link resource required member names.", + "type": { + "$id": "141", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties.requiredMembers", + "serializationOptions": { + "$id": "143", + "json": { + "$id": "144", + "name": "requiredMembers" + } + } + }, + { + "$id": "145", + "kind": "property", + "name": "requiredZoneNames", + "serializedName": "requiredZoneNames", + "doc": "The private link resource private link DNS zone name.", + "type": { + "$id": "146", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties.requiredZoneNames", + "serializationOptions": { + "$id": "148", + "json": { + "$id": "149", + "name": "requiredZoneNames" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateLinkResource.properties", + "serializationOptions": { + "$id": "150", + "json": { + "$id": "151", + "name": "properties" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "152", + "json": { + "$id": "153", + "name": "value" + } + } + }, + { + "$id": "154", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "155", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "156", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "157", + "json": { + "$id": "158", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "89" + }, + { + "$ref": "135" + }, + { + "$ref": "90" + }, + { + "$ref": "91" + }, + { + "$ref": "107" + }, + { + "$id": "159", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Error,Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "160", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "161", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "162", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", + "serializationOptions": { + "$id": "164", + "json": { + "$id": "165", + "name": "code" + } + } + }, + { + "$id": "166", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", + "serializationOptions": { + "$id": "168", + "json": { + "$id": "169", + "name": "message" + } + } + }, + { + "$id": "170", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", + "serializationOptions": { + "$id": "172", + "json": { + "$id": "173", + "name": "target" + } + } + }, + { + "$id": "174", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "175", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "161" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "176", + "json": { + "$id": "177", + "name": "details" + } + } + }, + { + "$id": "178", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "179", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "180", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "181", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", + "serializationOptions": { + "$id": "183", + "json": { + "$id": "184", + "name": "type" + } + } + }, + { + "$id": "185", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "186", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Json,Exception,LroPolling", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", + "serializationOptions": { + "$id": "187", + "json": { + "$id": "188", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "189", + "json": { + "$id": "190", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "191", + "json": { + "$id": "192", + "name": "error" + } + } + } + ] + }, + { + "$ref": "161" + }, + { + "$ref": "180" + }, + { + "$ref": "186" + }, + { + "$id": "193", + "kind": "model", + "name": "HealthDataAIServicesPrivateEndpointConnectionResource", + "namespace": "Microsoft.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnectionResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Holder for private endpoint connections", + "decorators": [], + "baseModel": { + "$ref": "90" + }, + "properties": [ + { + "$id": "194", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "195", + "kind": "model", + "name": "PrivateEndpointConnectionProperties", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Properties of the private endpoint connection.", + "decorators": [], + "properties": [ + { + "$id": "196", + "kind": "property", + "name": "groupIds", + "serializedName": "groupIds", + "doc": "The group ids for the private endpoint resource.", + "type": { + "$id": "197", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "198", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties.groupIds", + "serializationOptions": { + "$id": "199", + "json": { + "$id": "200", + "name": "groupIds" + } + } + }, + { + "$id": "201", + "kind": "property", + "name": "privateEndpoint", + "serializedName": "privateEndpoint", + "doc": "The private endpoint resource.", + "type": { + "$id": "202", + "kind": "model", + "name": "PrivateEndpoint", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpoint", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The Private Endpoint resource.", + "decorators": [], + "properties": [ + { + "$id": "203", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The resource identifier for private endpoint", + "type": { + "$id": "204", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpoint.id", + "serializationOptions": { + "$id": "206", + "json": { + "$id": "207", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties.privateEndpoint", + "serializationOptions": { + "$id": "208", + "json": { + "$id": "209", + "name": "privateEndpoint" + } + } + }, + { + "$id": "210", + "kind": "property", + "name": "privateLinkServiceConnectionState", + "serializedName": "privateLinkServiceConnectionState", + "doc": "A collection of information about the state of the connection between service consumer and provider.", + "type": { + "$id": "211", + "kind": "model", + "name": "PrivateLinkServiceConnectionState", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "A collection of information about the state of the connection between service consumer and provider.", + "decorators": [], + "properties": [ + { + "$id": "212", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.", + "type": { + "$ref": "12" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState.status", + "serializationOptions": { + "$id": "213", + "json": { + "$id": "214", + "name": "status" + } + } + }, + { + "$id": "215", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The reason for approval/rejection of the connection.", + "type": { + "$id": "216", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState.description", + "serializationOptions": { + "$id": "217", + "json": { + "$id": "218", + "name": "description" + } + } + }, + { + "$id": "219", + "kind": "property", + "name": "actionsRequired", + "serializedName": "actionsRequired", + "doc": "A message indicating if changes on the service provider require any updates on the consumer.", + "type": { + "$id": "220", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState.actionsRequired", + "serializationOptions": { + "$id": "221", + "json": { + "$id": "222", + "name": "actionsRequired" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties.privateLinkServiceConnectionState", + "serializationOptions": { + "$id": "223", + "json": { + "$id": "224", + "name": "privateLinkServiceConnectionState" + } + } + }, + { + "$id": "225", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The provisioning state of the private endpoint connection resource.", + "type": { + "$ref": "20" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties.provisioningState", + "serializationOptions": { + "$id": "226", + "json": { + "$id": "227", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnectionResource.properties", + "serializationOptions": { + "$id": "228", + "json": { + "$id": "229", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "195" + }, + { + "$ref": "202" + }, + { + "$ref": "211" + }, + { + "$id": "230", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "231", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "30" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "232", + "json": { + "$id": "233", + "name": "status" + } + } + }, + { + "$id": "234", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "236", + "json": { + "$id": "237", + "name": "name" + } + } + }, + { + "$id": "238", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "239", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", + "serializationOptions": { + "$id": "241", + "json": { + "$id": "242", + "name": "startTime" + } + } + }, + { + "$id": "243", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "244", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", + "serializationOptions": { + "$id": "246", + "json": { + "$id": "247", + "name": "endTime" + } + } + }, + { + "$id": "248", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "249", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "250", + "json": { + "$id": "251", + "name": "percentComplete" + } + } + }, + { + "$id": "252", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "161" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "253", + "json": { + "$id": "254", + "name": "error" + } + } + } + ] + }, + { + "$id": "255", + "kind": "model", + "name": "PrivateEndpointConnectionResourceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a PrivateEndpointConnectionResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "256", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The PrivateEndpointConnectionResource items on this page", + "type": { + "$id": "257", + "kind": "array", + "name": "ArrayPrivateEndpointConnectionResource", + "valueType": { + "$ref": "193" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "258", + "json": { + "$id": "259", + "name": "value" + } + } + }, + { + "$id": "260", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "261", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "262", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "263", + "json": { + "$id": "264", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "265", + "kind": "model", + "name": "DeidService", + "namespace": "Microsoft.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidService", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "A HealthDataAIServicesProviderHub resource", + "decorators": [], + "baseModel": { + "$id": "266", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$ref": "91" + }, + "properties": [ + { + "$id": "267", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "268", + "kind": "dict", + "keyType": { + "$id": "269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "270", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags", + "serializationOptions": { + "$id": "271", + "json": { + "$id": "272", + "name": "tags" + } + } + }, + { + "$id": "273", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location", + "serializationOptions": { + "$id": "275", + "json": { + "$id": "276", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "277", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "278", + "kind": "model", + "name": "DeidServiceProperties", + "namespace": "Microsoft.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServiceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Details of the HealthDataAIServices DeidService.", + "decorators": [], + "properties": [ + { + "$id": "279", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServiceProperties.provisioningState", + "serializationOptions": { + "$id": "280", + "json": { + "$id": "281", + "name": "provisioningState" + } + } + }, + { + "$id": "282", + "kind": "property", + "name": "serviceUrl", + "serializedName": "serviceUrl", + "doc": "Deid service url.", + "type": { + "$id": "283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServiceProperties.serviceUrl", + "serializationOptions": { + "$id": "284", + "json": { + "$id": "285", + "name": "serviceUrl" + } + } + }, + { + "$id": "286", + "kind": "property", + "name": "privateEndpointConnections", + "serializedName": "privateEndpointConnections", + "doc": "List of private endpoint connections.", + "type": { + "$id": "287", + "kind": "array", + "name": "ArrayPrivateEndpointConnection", + "valueType": { + "$id": "288", + "kind": "model", + "name": "PrivateEndpointConnection", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnection", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The private endpoint connection resource", + "decorators": [], + "baseModel": { + "$ref": "91" + }, + "properties": [ + { + "$id": "289", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The private endpoint connection properties", + "type": { + "$ref": "195" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnection.properties", + "serializationOptions": { + "$id": "290", + "json": { + "$id": "291", + "name": "properties" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServiceProperties.privateEndpointConnections", + "serializationOptions": { + "$id": "292", + "json": { + "$id": "293", + "name": "privateEndpointConnections" + } + } + }, + { + "$id": "294", + "kind": "property", + "name": "publicNetworkAccess", + "serializedName": "publicNetworkAccess", + "doc": "Gets or sets allow or disallow public network access to resource", + "type": { + "$ref": "54" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServiceProperties.publicNetworkAccess", + "serializationOptions": { + "$id": "295", + "json": { + "$id": "296", + "name": "publicNetworkAccess" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidService.properties", + "serializationOptions": { + "$id": "297", + "json": { + "$id": "298", + "name": "properties" + } + } + }, + { + "$id": "299", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$id": "300", + "kind": "model", + "name": "ManagedServiceIdentity", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Managed service identity (system assigned and/or user assigned identities)", + "decorators": [], + "properties": [ + { + "$id": "301", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "302", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.principalId", + "serializationOptions": { + "$id": "304", + "json": { + "$id": "305", + "name": "principalId" + } + } + }, + { + "$id": "306", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "307", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "308", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.tenantId", + "serializationOptions": { + "$id": "309", + "json": { + "$id": "310", + "name": "tenantId" + } + } + }, + { + "$id": "311", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "60" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.type", + "serializationOptions": { + "$id": "312", + "json": { + "$id": "313", + "name": "type" + } + } + }, + { + "$id": "314", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "315", + "kind": "dict", + "keyType": { + "$id": "316", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "317", + "kind": "nullable", + "type": { + "$id": "318", + "kind": "model", + "name": "UserAssignedIdentity", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "User assigned identity properties", + "decorators": [], + "properties": [ + { + "$id": "319", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client ID of the assigned identity.", + "type": { + "$id": "320", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.clientId", + "serializationOptions": { + "$id": "322", + "json": { + "$id": "323", + "name": "clientId" + } + } + }, + { + "$id": "324", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal ID of the assigned identity.", + "type": { + "$id": "325", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.principalId", + "serializationOptions": { + "$id": "327", + "json": { + "$id": "328", + "name": "principalId" + } + } + } + ] + }, + "namespace": "" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "329", + "json": { + "$id": "330", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidService.identity", + "serializationOptions": { + "$id": "331", + "json": { + "$id": "332", + "name": "identity" + } + } + } + ] + }, + { + "$ref": "278" + }, + { + "$ref": "288" + }, + { + "$ref": "300" + }, + { + "$ref": "318" + }, + { + "$ref": "266" + }, + { + "$id": "333", + "kind": "model", + "name": "DeidServiceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a DeidService list operation.", + "decorators": [], + "properties": [ + { + "$id": "334", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The DeidService items on this page", + "type": { + "$id": "335", + "kind": "array", + "name": "ArrayDeidService", + "valueType": { + "$ref": "265" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "336", + "json": { + "$id": "337", + "name": "value" + } + } + }, + { + "$id": "338", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "339", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "340", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "341", + "json": { + "$id": "342", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "343", + "kind": "model", + "name": "DeidUpdate", + "namespace": "Microsoft.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidUpdate", + "usage": "Input,Json", + "doc": "Patch request body for DeidService", + "decorators": [], + "properties": [ + { + "$id": "344", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "345", + "kind": "dict", + "keyType": { + "$id": "346", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidUpdate.tags", + "serializationOptions": { + "$id": "348", + "json": { + "$id": "349", + "name": "tags" + } + } + }, + { + "$id": "350", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "Updatable managed service identity", + "type": { + "$id": "351", + "kind": "model", + "name": "ManagedServiceIdentityUpdate", + "namespace": "Microsoft.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.ManagedServiceIdentityUpdate", + "usage": "Input,Json", + "doc": "The template for adding optional properties.", + "decorators": [], + "properties": [ + { + "$id": "352", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "60" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.ManagedServiceIdentityUpdate.type", + "serializationOptions": { + "$id": "353", + "json": { + "$id": "354", + "name": "type" + } + } + }, + { + "$id": "355", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "356", + "kind": "dict", + "keyType": { + "$id": "357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "317" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.ManagedServiceIdentityUpdate.userAssignedIdentities", + "serializationOptions": { + "$id": "358", + "json": { + "$id": "359", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidUpdate.identity", + "serializationOptions": { + "$id": "360", + "json": { + "$id": "361", + "name": "identity" + } + } + }, + { + "$id": "362", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "RP-specific properties", + "type": { + "$id": "363", + "kind": "model", + "name": "DeidPropertiesUpdate", + "namespace": "Microsoft.HealthDataAIServices", + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidPropertiesUpdate", + "usage": "Input,Json", + "doc": "The template for adding optional properties.", + "decorators": [], + "properties": [ + { + "$id": "364", + "kind": "property", + "name": "publicNetworkAccess", + "serializedName": "publicNetworkAccess", + "doc": "Gets or sets allow or disallow public network access to resource", + "type": { + "$ref": "54" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidPropertiesUpdate.publicNetworkAccess", + "serializationOptions": { + "$id": "365", + "json": { + "$id": "366", + "name": "publicNetworkAccess" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidUpdate.properties", + "serializationOptions": { + "$id": "367", + "json": { + "$id": "368", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "351" + }, + { + "$ref": "363" + }, + { + "$id": "369", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult", + "usage": "Output,Json", + "doc": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "decorators": [], + "properties": [ + { + "$id": "370", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "371", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "372", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation", + "usage": "Output,Json", + "doc": "Details of a REST API operation, returned from the Resource Provider Operations API", + "decorators": [], + "properties": [ + { + "$id": "373", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": { + "$id": "374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name", + "serializationOptions": { + "$id": "375", + "json": { + "$id": "376", + "name": "name" + } + } + }, + { + "$id": "377", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.", + "type": { + "$id": "378", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction", + "serializationOptions": { + "$id": "379", + "json": { + "$id": "380", + "name": "isDataAction" + } + } + }, + { + "$id": "381", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "382", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "383", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": { + "$id": "384", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider", + "serializationOptions": { + "$id": "385", + "json": { + "$id": "386", + "name": "provider" + } + } + }, + { + "$id": "387", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": { + "$id": "388", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource", + "serializationOptions": { + "$id": "389", + "json": { + "$id": "390", + "name": "resource" + } + } + }, + { + "$id": "391", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": { + "$id": "392", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation", + "serializationOptions": { + "$id": "393", + "json": { + "$id": "394", + "name": "operation" + } + } + }, + { + "$id": "395", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description", + "serializationOptions": { + "$id": "397", + "json": { + "$id": "398", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "399", + "json": { + "$id": "400", + "name": "display" + } + } + }, + { + "$id": "401", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": { + "$ref": "70" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin", + "serializationOptions": { + "$id": "402", + "json": { + "$id": "403", + "name": "origin" + } + } + }, + { + "$id": "404", + "kind": "property", + "name": "actionType", + "serializedName": "actionType", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": { + "$ref": "78" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType", + "serializationOptions": { + "$id": "405", + "json": { + "$id": "406", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "407", + "json": { + "$id": "408", + "name": "value" + } + } + }, + { + "$id": "409", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "410", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "411", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.nextLink", + "serializationOptions": { + "$id": "412", + "json": { + "$id": "413", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "372" + }, + { + "$ref": "382" + } + ], + "Clients": [ + { + "$id": "414", + "Name": "HealthDataAIServicesClient", + "Namespace": "Microsoft.HealthDataAIServices", + "Operations": [], + "Protocol": { + "$id": "415" + }, + "Parameters": [ + { + "$id": "416", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "417", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "418", + "Type": { + "$id": "419", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices" + }, + { + "$id": "420", + "Name": "Operations", + "Namespace": "Microsoft.HealthDataAIServices", + "Operations": [ + { + "$id": "421", + "Name": "list", + "ResourceName": "Operations", + "Doc": "List the operations for the provider", + "Accessibility": "internal", + "Parameters": [ + { + "$id": "422", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "423", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "424", + "Type": { + "$id": "425", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-09-20" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "426", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "427", + "kind": "constant", + "valueType": { + "$id": "428", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "429", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "369" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/providers/Microsoft.HealthDataAIServices/operations", + "BufferResponse": true, + "Paging": { + "$id": "430", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "431", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "Decorators": [], + "Examples": [ + { + "$id": "432", + "kind": "http", + "name": "Operations_List_MaximumSet - generated by [MaximumSet] rule. [stable]", + "description": "Operations_List_MaximumSet - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/Operations_List_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "433", + "parameter": { + "$ref": "422" + }, + "value": { + "$id": "434", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "2024-09-20" + } + } + ], + "responses": [ + { + "$id": "435", + "response": { + "$ref": "429" + }, + "statusCode": 200, + "bodyValue": { + "$id": "436", + "kind": "model", + "type": { + "$ref": "369" + }, + "value": { + "$id": "437", + "value": { + "$id": "438", + "kind": "array", + "type": { + "$ref": "371" + }, + "value": [ + { + "$id": "439", + "kind": "model", + "type": { + "$ref": "372" + }, + "value": { + "$id": "440", + "name": { + "$id": "441", + "kind": "string", + "type": { + "$ref": "374" + }, + "value": "vlozcqymdxttexvmhouwzob" + }, + "isDataAction": { + "$id": "442", + "kind": "boolean", + "type": { + "$ref": "378" + }, + "value": true + }, + "display": { + "$id": "443", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "444", + "provider": { + "$id": "445", + "kind": "string", + "type": { + "$ref": "384" + }, + "value": "hwy" + }, + "resource": { + "$id": "446", + "kind": "string", + "type": { + "$ref": "388" + }, + "value": "yxabgnzjshmqldqthxonpam" + }, + "operation": { + "$id": "447", + "kind": "string", + "type": { + "$ref": "392" + }, + "value": "quwaawjasjgpqhskxoxzx" + }, + "description": { + "$id": "448", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "ayqiodducsbwvzcgno" + } + } + }, + "origin": { + "$id": "449", + "kind": "string", + "type": { + "$ref": "70" + }, + "value": "user" + }, + "actionType": { + "$id": "450", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Internal" + } + } + } + ] + }, + "nextLink": { + "$id": "451", + "kind": "string", + "type": { + "$ref": "410" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + }, + { + "$id": "452", + "kind": "http", + "name": "Operations_List_MinimumSet - generated by [MinimumSet] rule. [stable]", + "description": "Operations_List_MinimumSet - generated by [MinimumSet] rule. [stable]", + "filePath": "2024-09-20/Operations_List_MinimumSet_Gen.json", + "parameters": [ + { + "$id": "453", + "parameter": { + "$ref": "422" + }, + "value": { + "$id": "454", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "2024-09-20" + } + } + ], + "responses": [ + { + "$id": "455", + "response": { + "$ref": "429" + }, + "statusCode": 200, + "bodyValue": { + "$id": "456", + "kind": "model", + "type": { + "$ref": "369" + }, + "value": { + "$id": "457" + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "458" + }, + "Parent": "HealthDataAIServicesClient", + "Parameters": [ + { + "$id": "459", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "460", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "461", + "Type": { + "$id": "462", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices.Operations" + }, + { + "$id": "463", + "Name": "DeidServices", + "Namespace": "Microsoft.HealthDataAIServices", + "Operations": [ + { + "$id": "464", + "Name": "get", + "ResourceName": "DeidService", + "Doc": "Get a DeidService", + "Accessibility": "public", + "Parameters": [ + { + "$id": "465", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "466", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "467", + "Type": { + "$id": "468", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-09-20" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "469", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "470", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "471", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "472", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "474", + "Name": "deidServiceName", + "NameInRequest": "deidServiceName", + "Doc": "The name of the deid service", + "Type": { + "$id": "475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "476", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "477", + "kind": "constant", + "valueType": { + "$id": "478", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "479", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "265" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.get", + "Decorators": [], + "Examples": [ + { + "$id": "480", + "kind": "http", + "name": "DeidServices_Get - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_Get - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "481", + "parameter": { + "$ref": "465" + }, + "value": { + "$id": "482", + "kind": "string", + "type": { + "$ref": "466" + }, + "value": "2024-09-20" + } + }, + { + "$id": "483", + "parameter": { + "$ref": "469" + }, + "value": { + "$id": "484", + "kind": "string", + "type": { + "$ref": "470" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "485", + "parameter": { + "$ref": "472" + }, + "value": { + "$id": "486", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "rgopenapi" + } + }, + { + "$id": "487", + "parameter": { + "$ref": "474" + }, + "value": { + "$id": "488", + "kind": "string", + "type": { + "$ref": "475" + }, + "value": "deidTest" + } + } + ], + "responses": [ + { + "$id": "489", + "response": { + "$ref": "479" + }, + "statusCode": 200, + "bodyValue": { + "$id": "490", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "491", + "properties": { + "$id": "492", + "kind": "model", + "type": { + "$ref": "278" + }, + "value": { + "$id": "493", + "provisioningState": { + "$id": "494", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + }, + "publicNetworkAccess": { + "$id": "495", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Enabled" + }, + "privateEndpointConnections": { + "$id": "496", + "kind": "array", + "type": { + "$ref": "287" + }, + "value": [ + { + "$id": "497", + "kind": "model", + "type": { + "$ref": "288" + }, + "value": { + "$id": "498", + "properties": { + "$id": "499", + "kind": "model", + "type": { + "$ref": "195" + }, + "value": { + "$id": "500", + "privateEndpoint": { + "$id": "501", + "kind": "model", + "type": { + "$ref": "202" + }, + "value": { + "$id": "502", + "id": { + "$id": "503", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "504", + "kind": "model", + "type": { + "$ref": "211" + }, + "value": { + "$id": "505", + "status": { + "$id": "506", + "kind": "string", + "type": { + "$ref": "12" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "507", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "ulb" + }, + "description": { + "$id": "508", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "ddxuoved" + } + } + }, + "groupIds": { + "$id": "509", + "kind": "array", + "type": { + "$ref": "197" + }, + "value": [ + { + "$id": "510", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "511", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "512", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "513", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "514", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "515", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "516", + "createdBy": { + "$id": "517", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "518", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "519", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "520", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "521", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "522", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "serviceUrl": { + "$id": "523", + "kind": "string", + "type": { + "$ref": "283" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + } + } + }, + "identity": { + "$id": "524", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "525", + "type": { + "$id": "526", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "527", + "kind": "dict", + "type": { + "$ref": "315" + }, + "value": { + "$id": "528" + } + }, + "principalId": { + "$id": "529", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "530", + "kind": "string", + "type": { + "$ref": "307" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + } + } + }, + "tags": { + "$id": "531", + "kind": "dict", + "type": { + "$ref": "268" + }, + "value": { + "$id": "532" + } + }, + "location": { + "$id": "533", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "534", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "535", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "536", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "537", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "538", + "createdBy": { + "$id": "539", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "540", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "541", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "542", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "543", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "544", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "545", + "Name": "listByResourceGroup", + "ResourceName": "DeidService", + "Doc": "List DeidService resources by resource group", + "Accessibility": "public", + "Parameters": [ + { + "$id": "546", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "547", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "548", + "Type": { + "$id": "549", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-09-20" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "550", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "551", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "552", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "553", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "555", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "556", + "kind": "constant", + "valueType": { + "$id": "557", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "558", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "333" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices", + "BufferResponse": true, + "Paging": { + "$id": "559", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "560", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "561", + "kind": "http", + "name": "DeidServices_ListByResourceGroup - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_ListByResourceGroup - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "562", + "parameter": { + "$ref": "546" + }, + "value": { + "$id": "563", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "2024-09-20" + } + }, + { + "$id": "564", + "parameter": { + "$ref": "550" + }, + "value": { + "$id": "565", + "kind": "string", + "type": { + "$ref": "551" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "566", + "parameter": { + "$ref": "553" + }, + "value": { + "$id": "567", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "rgopenapi" + } + } + ], + "responses": [ + { + "$id": "568", + "response": { + "$ref": "558" + }, + "statusCode": 200, + "bodyValue": { + "$id": "569", + "kind": "model", + "type": { + "$ref": "333" + }, + "value": { + "$id": "570", + "value": { + "$id": "571", + "kind": "array", + "type": { + "$ref": "335" + }, + "value": [ + { + "$id": "572", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "573", + "properties": { + "$id": "574", + "kind": "model", + "type": { + "$ref": "278" + }, + "value": { + "$id": "575", + "provisioningState": { + "$id": "576", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + }, + "serviceUrl": { + "$id": "577", + "kind": "string", + "type": { + "$ref": "283" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + }, + "privateEndpointConnections": { + "$id": "578", + "kind": "array", + "type": { + "$ref": "287" + }, + "value": [ + { + "$id": "579", + "kind": "model", + "type": { + "$ref": "288" + }, + "value": { + "$id": "580", + "properties": { + "$id": "581", + "kind": "model", + "type": { + "$ref": "195" + }, + "value": { + "$id": "582", + "groupIds": { + "$id": "583", + "kind": "array", + "type": { + "$ref": "197" + }, + "value": [ + { + "$id": "584", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "xbdyjqg" + } + ] + }, + "privateEndpoint": { + "$id": "585", + "kind": "model", + "type": { + "$ref": "202" + }, + "value": { + "$id": "586", + "id": { + "$id": "587", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "588", + "kind": "model", + "type": { + "$ref": "211" + }, + "value": { + "$id": "589", + "status": { + "$id": "590", + "kind": "string", + "type": { + "$ref": "12" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "591", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "ulb" + }, + "description": { + "$id": "592", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "ro" + } + } + }, + "provisioningState": { + "$id": "593", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "594", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "595", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "596", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "597", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "598", + "createdBy": { + "$id": "599", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "600", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "601", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "602", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "603", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "604", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "publicNetworkAccess": { + "$id": "605", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Enabled" + } + } + }, + "identity": { + "$id": "606", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "607", + "principalId": { + "$id": "608", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "609", + "kind": "string", + "type": { + "$ref": "307" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + }, + "type": { + "$id": "610", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "611", + "kind": "dict", + "type": { + "$ref": "315" + }, + "value": { + "$id": "612" + } + } + } + }, + "tags": { + "$id": "613", + "kind": "dict", + "type": { + "$ref": "268" + }, + "value": { + "$id": "614" + } + }, + "location": { + "$id": "615", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "616", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "617", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "618", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "619", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "620", + "createdBy": { + "$id": "621", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "622", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "623", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "624", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "625", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "626", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "627", + "kind": "string", + "type": { + "$ref": "339" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "628", + "Name": "listBySubscription", + "ResourceName": "DeidService", + "Doc": "List DeidService resources by subscription ID", + "Accessibility": "public", + "Parameters": [ + { + "$id": "629", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "630", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "631", + "Type": { + "$id": "632", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-09-20" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "633", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "634", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "636", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "637", + "kind": "constant", + "valueType": { + "$id": "638", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "639", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "333" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.HealthDataAIServices/deidServices", + "BufferResponse": true, + "Paging": { + "$id": "640", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "641", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.listBySubscription", + "Decorators": [], + "Examples": [ + { + "$id": "642", + "kind": "http", + "name": "DeidServices_ListBySubscription - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_ListBySubscription - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_ListBySubscription_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "643", + "parameter": { + "$ref": "629" + }, + "value": { + "$id": "644", + "kind": "string", + "type": { + "$ref": "630" + }, + "value": "2024-09-20" + } + }, + { + "$id": "645", + "parameter": { + "$ref": "633" + }, + "value": { + "$id": "646", + "kind": "string", + "type": { + "$ref": "634" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + } + ], + "responses": [ + { + "$id": "647", + "response": { + "$ref": "639" + }, + "statusCode": 200, + "bodyValue": { + "$id": "648", + "kind": "model", + "type": { + "$ref": "333" + }, + "value": { + "$id": "649", + "value": { + "$id": "650", + "kind": "array", + "type": { + "$ref": "335" + }, + "value": [ + { + "$id": "651", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "652", + "properties": { + "$id": "653", + "kind": "model", + "type": { + "$ref": "278" + }, + "value": { + "$id": "654", + "provisioningState": { + "$id": "655", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + }, + "serviceUrl": { + "$id": "656", + "kind": "string", + "type": { + "$ref": "283" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + }, + "privateEndpointConnections": { + "$id": "657", + "kind": "array", + "type": { + "$ref": "287" + }, + "value": [ + { + "$id": "658", + "kind": "model", + "type": { + "$ref": "288" + }, + "value": { + "$id": "659", + "properties": { + "$id": "660", + "kind": "model", + "type": { + "$ref": "195" + }, + "value": { + "$id": "661", + "groupIds": { + "$id": "662", + "kind": "array", + "type": { + "$ref": "197" + }, + "value": [ + { + "$id": "663", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "xbdyjqg" + } + ] + }, + "privateEndpoint": { + "$id": "664", + "kind": "model", + "type": { + "$ref": "202" + }, + "value": { + "$id": "665", + "id": { + "$id": "666", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "667", + "kind": "model", + "type": { + "$ref": "211" + }, + "value": { + "$id": "668", + "status": { + "$id": "669", + "kind": "string", + "type": { + "$ref": "12" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "670", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "ulb" + }, + "description": { + "$id": "671", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "ro" + } + } + }, + "provisioningState": { + "$id": "672", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "673", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "674", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "675", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "676", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "677", + "createdBy": { + "$id": "678", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "679", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "680", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "681", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "682", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "683", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "publicNetworkAccess": { + "$id": "684", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Enabled" + } + } + }, + "identity": { + "$id": "685", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "686", + "principalId": { + "$id": "687", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "688", + "kind": "string", + "type": { + "$ref": "307" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + }, + "type": { + "$id": "689", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "690", + "kind": "dict", + "type": { + "$ref": "315" + }, + "value": { + "$id": "691" + } + } + } + }, + "tags": { + "$id": "692", + "kind": "dict", + "type": { + "$ref": "268" + }, + "value": { + "$id": "693" + } + }, + "location": { + "$id": "694", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "695", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "696", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "697", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "698", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "699", + "createdBy": { + "$id": "700", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "701", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "702", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "703", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "704", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "705", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "706", + "kind": "string", + "type": { + "$ref": "339" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "707", + "Name": "create", + "ResourceName": "DeidService", + "Doc": "Create a DeidService", + "Accessibility": "public", + "Parameters": [ + { + "$id": "708", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "709", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "710", + "Type": { + "$id": "711", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-09-20" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "712", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "713", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "714", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "715", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "716", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "717", + "Name": "deidServiceName", + "NameInRequest": "deidServiceName", + "Doc": "The name of the deid service", + "Type": { + "$id": "718", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "719", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "720", + "kind": "constant", + "valueType": { + "$id": "721", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "722", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "723", + "kind": "constant", + "valueType": { + "$id": "724", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "725", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "265" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "726", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "265" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "727", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "265" + }, + "Headers": [ + { + "$id": "728", + "Name": "azureAsyncOperation", + "NameInResponse": "Azure-AsyncOperation", + "Doc": "A link to the status monitor", + "Type": { + "$id": "729", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "730", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "731", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "732", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "733", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "265" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.create", + "Decorators": [], + "Examples": [ + { + "$id": "734", + "kind": "http", + "name": "DeidServices_Create - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_Create - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_Create_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "735", + "parameter": { + "$ref": "708" + }, + "value": { + "$id": "736", + "kind": "string", + "type": { + "$ref": "709" + }, + "value": "2024-09-20" + } + }, + { + "$id": "737", + "parameter": { + "$ref": "712" + }, + "value": { + "$id": "738", + "kind": "string", + "type": { + "$ref": "713" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "739", + "parameter": { + "$ref": "715" + }, + "value": { + "$id": "740", + "kind": "string", + "type": { + "$ref": "716" + }, + "value": "rgopenapi" + } + }, + { + "$id": "741", + "parameter": { + "$ref": "717" + }, + "value": { + "$id": "742", + "kind": "string", + "type": { + "$ref": "718" + }, + "value": "deidTest" + } + }, + { + "$id": "743", + "parameter": { + "$ref": "725" + }, + "value": { + "$id": "744", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "745", + "properties": { + "$id": "746", + "kind": "model", + "type": { + "$ref": "278" + }, + "value": { + "$id": "747", + "publicNetworkAccess": { + "$id": "748", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Enabled" + } + } + }, + "identity": { + "$id": "749", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "750", + "type": { + "$id": "751", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "752", + "kind": "dict", + "type": { + "$ref": "315" + }, + "value": { + "$id": "753" + } + } + } + }, + "tags": { + "$id": "754", + "kind": "dict", + "type": { + "$ref": "268" + }, + "value": { + "$id": "755" + } + }, + "location": { + "$id": "756", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + } + } + } + } + ], + "responses": [ + { + "$id": "757", + "response": { + "$ref": "726" + }, + "statusCode": 200, + "bodyValue": { + "$id": "758", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "759", + "properties": { + "$id": "760", + "kind": "model", + "type": { + "$ref": "278" + }, + "value": { + "$id": "761", + "provisioningState": { + "$id": "762", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + }, + "publicNetworkAccess": { + "$id": "763", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Enabled" + }, + "privateEndpointConnections": { + "$id": "764", + "kind": "array", + "type": { + "$ref": "287" + }, + "value": [ + { + "$id": "765", + "kind": "model", + "type": { + "$ref": "288" + }, + "value": { + "$id": "766", + "properties": { + "$id": "767", + "kind": "model", + "type": { + "$ref": "195" + }, + "value": { + "$id": "768", + "privateEndpoint": { + "$id": "769", + "kind": "model", + "type": { + "$ref": "202" + }, + "value": { + "$id": "770", + "id": { + "$id": "771", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "772", + "kind": "model", + "type": { + "$ref": "211" + }, + "value": { + "$id": "773", + "status": { + "$id": "774", + "kind": "string", + "type": { + "$ref": "12" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "775", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "ulb" + }, + "description": { + "$id": "776", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "ddxuoved" + } + } + }, + "groupIds": { + "$id": "777", + "kind": "array", + "type": { + "$ref": "197" + }, + "value": [ + { + "$id": "778", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "779", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "780", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "781", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "782", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "783", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "784", + "createdBy": { + "$id": "785", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "786", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "787", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "788", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "789", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "790", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "serviceUrl": { + "$id": "791", + "kind": "string", + "type": { + "$ref": "283" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + } + } + }, + "identity": { + "$id": "792", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "793", + "type": { + "$id": "794", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "795", + "kind": "dict", + "type": { + "$ref": "315" + }, + "value": { + "$id": "796" + } + }, + "principalId": { + "$id": "797", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "798", + "kind": "string", + "type": { + "$ref": "307" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + } + } + }, + "tags": { + "$id": "799", + "kind": "dict", + "type": { + "$ref": "268" + }, + "value": { + "$id": "800" + } + }, + "location": { + "$id": "801", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "802", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "803", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "804", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "805", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "806", + "createdBy": { + "$id": "807", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "808", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "809", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "810", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "811", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "812", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + }, + { + "$id": "813", + "response": { + "$ref": "727" + }, + "statusCode": 201, + "bodyValue": { + "$id": "814", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "815", + "properties": { + "$id": "816", + "kind": "model", + "type": { + "$ref": "278" + }, + "value": { + "$id": "817", + "provisioningState": { + "$id": "818", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + }, + "publicNetworkAccess": { + "$id": "819", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Enabled" + }, + "privateEndpointConnections": { + "$id": "820", + "kind": "array", + "type": { + "$ref": "287" + }, + "value": [ + { + "$id": "821", + "kind": "model", + "type": { + "$ref": "288" + }, + "value": { + "$id": "822", + "properties": { + "$id": "823", + "kind": "model", + "type": { + "$ref": "195" + }, + "value": { + "$id": "824", + "privateEndpoint": { + "$id": "825", + "kind": "model", + "type": { + "$ref": "202" + }, + "value": { + "$id": "826", + "id": { + "$id": "827", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "828", + "kind": "model", + "type": { + "$ref": "211" + }, + "value": { + "$id": "829", + "status": { + "$id": "830", + "kind": "string", + "type": { + "$ref": "12" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "831", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "ulb" + }, + "description": { + "$id": "832", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "ddxuoved" + } + } + }, + "groupIds": { + "$id": "833", + "kind": "array", + "type": { + "$ref": "197" + }, + "value": [ + { + "$id": "834", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "835", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "836", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "837", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "838", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "839", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "840", + "createdBy": { + "$id": "841", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "842", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "843", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "844", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "845", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "846", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "serviceUrl": { + "$id": "847", + "kind": "string", + "type": { + "$ref": "283" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + } + } + }, + "identity": { + "$id": "848", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "849", + "type": { + "$id": "850", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "851", + "kind": "dict", + "type": { + "$ref": "315" + }, + "value": { + "$id": "852" + } + }, + "principalId": { + "$id": "853", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "854", + "kind": "string", + "type": { + "$ref": "307" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + } + } + }, + "tags": { + "$id": "855", + "kind": "dict", + "type": { + "$ref": "268" + }, + "value": { + "$id": "856" + } + }, + "location": { + "$id": "857", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "858", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "859", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "860", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "861", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "862", + "createdBy": { + "$id": "863", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "864", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "865", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "866", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "867", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "868", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "869", + "Name": "update", + "ResourceName": "DeidService", + "Doc": "Update a DeidService", + "Accessibility": "public", + "Parameters": [ + { + "$id": "870", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "871", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "872", + "Type": { + "$id": "873", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-09-20" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "874", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "875", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "876", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "877", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "878", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "879", + "Name": "deidServiceName", + "NameInRequest": "deidServiceName", + "Doc": "The name of the deid service", + "Type": { + "$id": "880", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "881", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "882", + "kind": "constant", + "valueType": { + "$id": "883", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "884", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "885", + "kind": "constant", + "valueType": { + "$id": "886", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "887", + "Name": "properties", + "NameInRequest": "properties", + "Doc": "The resource properties to be updated.", + "Type": { + "$ref": "343" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "888", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "265" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "889", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "890", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "891", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "892", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "893", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + } + ], + "HttpMethod": "PATCH", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "894", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "895", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "265" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.update", + "Decorators": [], + "Examples": [ + { + "$id": "896", + "kind": "http", + "name": "DeidServices_Update - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_Update - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_Update_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "897", + "parameter": { + "$ref": "870" + }, + "value": { + "$id": "898", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "2024-09-20" + } + }, + { + "$id": "899", + "parameter": { + "$ref": "874" + }, + "value": { + "$id": "900", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "901", + "parameter": { + "$ref": "877" + }, + "value": { + "$id": "902", + "kind": "string", + "type": { + "$ref": "878" + }, + "value": "rgopenapi" + } + }, + { + "$id": "903", + "parameter": { + "$ref": "879" + }, + "value": { + "$id": "904", + "kind": "string", + "type": { + "$ref": "880" + }, + "value": "deidTest" + } + }, + { + "$id": "905", + "parameter": { + "$ref": "887" + }, + "value": { + "$id": "906", + "kind": "model", + "type": { + "$ref": "343" + }, + "value": { + "$id": "907", + "identity": { + "$id": "908", + "kind": "model", + "type": { + "$ref": "351" + }, + "value": { + "$id": "909", + "type": { + "$id": "910", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "911", + "kind": "dict", + "type": { + "$ref": "356" + }, + "value": { + "$id": "912" + } + } + } + }, + "tags": { + "$id": "913", + "kind": "dict", + "type": { + "$ref": "345" + }, + "value": { + "$id": "914" + } + }, + "properties": { + "$id": "915", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "916", + "publicNetworkAccess": { + "$id": "917", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Enabled" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "918", + "response": { + "$ref": "888" + }, + "statusCode": 200, + "bodyValue": { + "$id": "919", + "kind": "model", + "type": { + "$ref": "265" + }, + "value": { + "$id": "920", + "properties": { + "$id": "921", + "kind": "model", + "type": { + "$ref": "278" + }, + "value": { + "$id": "922", + "provisioningState": { + "$id": "923", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Succeeded" + }, + "publicNetworkAccess": { + "$id": "924", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Enabled" + }, + "privateEndpointConnections": { + "$id": "925", + "kind": "array", + "type": { + "$ref": "287" + }, + "value": [ + { + "$id": "926", + "kind": "model", + "type": { + "$ref": "288" + }, + "value": { + "$id": "927", + "properties": { + "$id": "928", + "kind": "model", + "type": { + "$ref": "195" + }, + "value": { + "$id": "929", + "privateEndpoint": { + "$id": "930", + "kind": "model", + "type": { + "$ref": "202" + }, + "value": { + "$id": "931", + "id": { + "$id": "932", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "933", + "kind": "model", + "type": { + "$ref": "211" + }, + "value": { + "$id": "934", + "status": { + "$id": "935", + "kind": "string", + "type": { + "$ref": "12" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "936", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "ulb" + }, + "description": { + "$id": "937", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "ddxuoved" + } + } + }, + "groupIds": { + "$id": "938", + "kind": "array", + "type": { + "$ref": "197" + }, + "value": [ + { + "$id": "939", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "940", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "941", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih/privateEndpointConnections/mdwvqjtwcjcvrh" + }, + "name": { + "$id": "942", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "mdwvqjtwcjcvrh" + }, + "type": { + "$id": "943", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "bzxabjlpbwreez" + }, + "systemData": { + "$id": "944", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "945", + "createdBy": { + "$id": "946", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "947", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "948", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "949", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "950", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "951", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "serviceUrl": { + "$id": "952", + "kind": "string", + "type": { + "$ref": "283" + }, + "value": "woponotsxaippkvhwmibffywnqcfru" + } + } + }, + "identity": { + "$id": "953", + "kind": "model", + "type": { + "$ref": "300" + }, + "value": { + "$id": "954", + "type": { + "$id": "955", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "956", + "kind": "dict", + "type": { + "$ref": "315" + }, + "value": { + "$id": "957" + } + }, + "principalId": { + "$id": "958", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "a82361f4-5320-4a26-8d1b-45832d2164dd" + }, + "tenantId": { + "$id": "959", + "kind": "string", + "type": { + "$ref": "307" + }, + "value": "53a6a686-ae15-4a1d-badf-3e7947918893" + } + } + }, + "tags": { + "$id": "960", + "kind": "dict", + "type": { + "$ref": "268" + }, + "value": { + "$id": "961" + } + }, + "location": { + "$id": "962", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "qwyhvdwcsjulggagdqxlmazcl" + }, + "id": { + "$id": "963", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/nlrthrxaukih" + }, + "name": { + "$id": "964", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "nlrthrxaukih" + }, + "type": { + "$id": "965", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "slyfiibvwlhfdpzjynsywhbfauexk" + }, + "systemData": { + "$id": "966", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "967", + "createdBy": { + "$id": "968", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "969", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "970", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "971", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "972", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "973", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + }, + { + "$id": "974", + "response": { + "$ref": "889" + }, + "statusCode": 202 + } + ] + } + ] + }, + { + "$id": "975", + "Name": "delete", + "ResourceName": "DeidService", + "Doc": "Delete a DeidService", + "Accessibility": "public", + "Parameters": [ + { + "$id": "976", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "977", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "978", + "Type": { + "$id": "979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-09-20" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "980", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "981", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "982", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "983", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "984", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "985", + "Name": "deidServiceName", + "NameInRequest": "deidServiceName", + "Doc": "The name of the deid service", + "Type": { + "$id": "986", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "987", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "988", + "kind": "constant", + "valueType": { + "$id": "989", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "990", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "991", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "992", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "993", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "994", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "995", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}", + "BufferResponse": true, + "LongRunning": { + "$id": "996", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "997", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices.delete", + "Decorators": [], + "Examples": [ + { + "$id": "998", + "kind": "http", + "name": "DeidServices_Delete - generated by [MaximumSet] rule. [stable]", + "description": "DeidServices_Delete - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/DeidServices_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "999", + "parameter": { + "$ref": "976" + }, + "value": { + "$id": "1000", + "kind": "string", + "type": { + "$ref": "977" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1001", + "parameter": { + "$ref": "980" + }, + "value": { + "$id": "1002", + "kind": "string", + "type": { + "$ref": "981" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1003", + "parameter": { + "$ref": "983" + }, + "value": { + "$id": "1004", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1005", + "parameter": { + "$ref": "985" + }, + "value": { + "$id": "1006", + "kind": "string", + "type": { + "$ref": "986" + }, + "value": "deidTest" + } + } + ], + "responses": [ + { + "$id": "1007", + "response": { + "$ref": "990" + }, + "statusCode": 202 + }, + { + "$id": "1008", + "response": { + "$ref": "995" + }, + "statusCode": 204 + } + ] + } + ] + } + ], + "Protocol": { + "$id": "1009" + }, + "Parent": "HealthDataAIServicesClient", + "Parameters": [ + { + "$id": "1010", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "1011", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "1012", + "Type": { + "$id": "1013", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices.DeidServices" + }, + { + "$id": "1014", + "Name": "PrivateEndpointConnections", + "Namespace": "Microsoft.HealthDataAIServices", + "Doc": "Private connection operations", + "Operations": [ + { + "$id": "1015", + "Name": "get", + "ResourceName": "PrivateEndpointConnectionResource", + "Doc": "Get a specific private connection", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1016", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1018", + "Type": { + "$id": "1019", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-09-20" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1020", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1021", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1022", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1023", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1024", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1025", + "Name": "deidServiceName", + "NameInRequest": "deidServiceName", + "Doc": "The name of the deid service", + "Type": { + "$id": "1026", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1027", + "Name": "privateEndpointConnectionName", + "NameInRequest": "privateEndpointConnectionName", + "Doc": "The name of the private endpoint connection associated with the Azure resource.", + "Type": { + "$id": "1028", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1029", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1030", + "kind": "constant", + "valueType": { + "$id": "1031", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1032", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "193" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.get", + "Decorators": [], + "Examples": [ + { + "$id": "1033", + "kind": "http", + "name": "PrivateEndpointConnections_Get - generated by [MaximumSet] rule. [stable]", + "description": "PrivateEndpointConnections_Get - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/PrivateEndpointConnections_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1034", + "parameter": { + "$ref": "1016" + }, + "value": { + "$id": "1035", + "kind": "string", + "type": { + "$ref": "1017" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1036", + "parameter": { + "$ref": "1020" + }, + "value": { + "$id": "1037", + "kind": "string", + "type": { + "$ref": "1021" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1038", + "parameter": { + "$ref": "1023" + }, + "value": { + "$id": "1039", + "kind": "string", + "type": { + "$ref": "1024" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1040", + "parameter": { + "$ref": "1025" + }, + "value": { + "$id": "1041", + "kind": "string", + "type": { + "$ref": "1026" + }, + "value": "deidTest" + } + }, + { + "$id": "1042", + "parameter": { + "$ref": "1027" + }, + "value": { + "$id": "1043", + "kind": "string", + "type": { + "$ref": "1028" + }, + "value": "kgwgrrpabvrsrrvpcgcnfmyfgyrl" + } + } + ], + "responses": [ + { + "$id": "1044", + "response": { + "$ref": "1032" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1045", + "kind": "model", + "type": { + "$ref": "193" + }, + "value": { + "$id": "1046", + "properties": { + "$id": "1047", + "kind": "model", + "type": { + "$ref": "195" + }, + "value": { + "$id": "1048", + "privateEndpoint": { + "$id": "1049", + "kind": "model", + "type": { + "$ref": "202" + }, + "value": { + "$id": "1050", + "id": { + "$id": "1051", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "1052", + "kind": "model", + "type": { + "$ref": "211" + }, + "value": { + "$id": "1053", + "status": { + "$id": "1054", + "kind": "string", + "type": { + "$ref": "12" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "1055", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "ulb" + }, + "description": { + "$id": "1056", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "xr" + } + } + }, + "groupIds": { + "$id": "1057", + "kind": "array", + "type": { + "$ref": "197" + }, + "value": [ + { + "$id": "1058", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "1059", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1060", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/deidTest/privateEndpointConnections/aduyb" + }, + "name": { + "$id": "1061", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "aduyb" + }, + "type": { + "$id": "1062", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "umjjkodjuhccrngl" + }, + "systemData": { + "$id": "1063", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "1064", + "createdBy": { + "$id": "1065", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "1066", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "1067", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1068", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1069", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1070", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1071", + "Name": "create", + "ResourceName": "PrivateEndpointConnectionResource", + "Doc": "Create a Private endpoint connection", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1072", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1073", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1074", + "Type": { + "$id": "1075", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-09-20" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1076", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1077", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1078", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1079", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1080", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1081", + "Name": "deidServiceName", + "NameInRequest": "deidServiceName", + "Doc": "The name of the deid service", + "Type": { + "$id": "1082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1083", + "Name": "privateEndpointConnectionName", + "NameInRequest": "privateEndpointConnectionName", + "Doc": "The name of the private endpoint connection associated with the Azure resource.", + "Type": { + "$id": "1084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1085", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "1086", + "kind": "constant", + "valueType": { + "$id": "1087", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1088", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1089", + "kind": "constant", + "valueType": { + "$id": "1090", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1091", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "193" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1092", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "193" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "1093", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "193" + }, + "Headers": [ + { + "$id": "1094", + "Name": "azureAsyncOperation", + "NameInResponse": "Azure-AsyncOperation", + "Doc": "A link to the status monitor", + "Type": { + "$id": "1095", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1096", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "1097", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "1098", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "1099", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "193" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.create", + "Decorators": [], + "Examples": [ + { + "$id": "1100", + "kind": "http", + "name": "PrivateEndpointConnections_Create - generated by [MaximumSet] rule. [stable]", + "description": "PrivateEndpointConnections_Create - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/PrivateEndpointConnections_Create_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1101", + "parameter": { + "$ref": "1072" + }, + "value": { + "$id": "1102", + "kind": "string", + "type": { + "$ref": "1073" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1103", + "parameter": { + "$ref": "1076" + }, + "value": { + "$id": "1104", + "kind": "string", + "type": { + "$ref": "1077" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1105", + "parameter": { + "$ref": "1079" + }, + "value": { + "$id": "1106", + "kind": "string", + "type": { + "$ref": "1080" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1107", + "parameter": { + "$ref": "1081" + }, + "value": { + "$id": "1108", + "kind": "string", + "type": { + "$ref": "1082" + }, + "value": "deidTest" + } + }, + { + "$id": "1109", + "parameter": { + "$ref": "1083" + }, + "value": { + "$id": "1110", + "kind": "string", + "type": { + "$ref": "1084" + }, + "value": "kgwgrrpabvrsrrvpcgcnfmyfgyrl" + } + }, + { + "$id": "1111", + "parameter": { + "$ref": "1091" + }, + "value": { + "$id": "1112", + "kind": "model", + "type": { + "$ref": "193" + }, + "value": { + "$id": "1113", + "properties": { + "$id": "1114", + "kind": "model", + "type": { + "$ref": "195" + }, + "value": { + "$id": "1115", + "privateEndpoint": { + "$id": "1116", + "kind": "model", + "type": { + "$ref": "202" + }, + "value": { + "$id": "1117" + } + }, + "privateLinkServiceConnectionState": { + "$id": "1118", + "kind": "model", + "type": { + "$ref": "211" + }, + "value": { + "$id": "1119", + "status": { + "$id": "1120", + "kind": "string", + "type": { + "$ref": "12" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "1121", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "ulb" + }, + "description": { + "$id": "1122", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "xr" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1123", + "response": { + "$ref": "1092" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1124", + "kind": "model", + "type": { + "$ref": "193" + }, + "value": { + "$id": "1125", + "properties": { + "$id": "1126", + "kind": "model", + "type": { + "$ref": "195" + }, + "value": { + "$id": "1127", + "privateEndpoint": { + "$id": "1128", + "kind": "model", + "type": { + "$ref": "202" + }, + "value": { + "$id": "1129", + "id": { + "$id": "1130", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "1131", + "kind": "model", + "type": { + "$ref": "211" + }, + "value": { + "$id": "1132", + "status": { + "$id": "1133", + "kind": "string", + "type": { + "$ref": "12" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "1134", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "ulb" + }, + "description": { + "$id": "1135", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "xr" + } + } + }, + "groupIds": { + "$id": "1136", + "kind": "array", + "type": { + "$ref": "197" + }, + "value": [ + { + "$id": "1137", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "1138", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1139", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/deidTest/privateEndpointConnections/aduyb" + }, + "name": { + "$id": "1140", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "aduyb" + }, + "type": { + "$id": "1141", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "umjjkodjuhccrngl" + }, + "systemData": { + "$id": "1142", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "1143", + "createdBy": { + "$id": "1144", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "1145", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "1146", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1147", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1148", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1149", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + }, + { + "$id": "1150", + "response": { + "$ref": "1093" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1151", + "kind": "model", + "type": { + "$ref": "193" + }, + "value": { + "$id": "1152", + "properties": { + "$id": "1153", + "kind": "model", + "type": { + "$ref": "195" + }, + "value": { + "$id": "1154", + "privateEndpoint": { + "$id": "1155", + "kind": "model", + "type": { + "$ref": "202" + }, + "value": { + "$id": "1156", + "id": { + "$id": "1157", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "1158", + "kind": "model", + "type": { + "$ref": "211" + }, + "value": { + "$id": "1159", + "status": { + "$id": "1160", + "kind": "string", + "type": { + "$ref": "12" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "1161", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "ulb" + }, + "description": { + "$id": "1162", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "xr" + } + } + }, + "groupIds": { + "$id": "1163", + "kind": "array", + "type": { + "$ref": "197" + }, + "value": [ + { + "$id": "1164", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "1165", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1166", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/deidTest/privateEndpointConnections/aduyb" + }, + "name": { + "$id": "1167", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "aduyb" + }, + "type": { + "$id": "1168", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "umjjkodjuhccrngl" + }, + "systemData": { + "$id": "1169", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "1170", + "createdBy": { + "$id": "1171", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "1172", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "1173", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1174", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1175", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1176", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1177", + "Name": "delete", + "ResourceName": "PrivateEndpointConnectionResource", + "Doc": "Delete the private endpoint connection", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1178", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1180", + "Type": { + "$id": "1181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-09-20" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1182", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1183", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1185", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1187", + "Name": "deidServiceName", + "NameInRequest": "deidServiceName", + "Doc": "The name of the deid service", + "Type": { + "$id": "1188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1189", + "Name": "privateEndpointConnectionName", + "NameInRequest": "privateEndpointConnectionName", + "Doc": "The name of the private endpoint connection associated with the Azure resource.", + "Type": { + "$id": "1190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1191", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1192", + "kind": "constant", + "valueType": { + "$id": "1193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1194", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "1195", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "1196", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1197", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "1198", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "1199", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "BufferResponse": true, + "LongRunning": { + "$id": "1200", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "1201", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.delete", + "Decorators": [], + "Examples": [ + { + "$id": "1202", + "kind": "http", + "name": "PrivateEndpointConnections_Delete - generated by [MaximumSet] rule. [stable]", + "description": "PrivateEndpointConnections_Delete - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/PrivateEndpointConnections_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1203", + "parameter": { + "$ref": "1178" + }, + "value": { + "$id": "1204", + "kind": "string", + "type": { + "$ref": "1179" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1205", + "parameter": { + "$ref": "1182" + }, + "value": { + "$id": "1206", + "kind": "string", + "type": { + "$ref": "1183" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1207", + "parameter": { + "$ref": "1185" + }, + "value": { + "$id": "1208", + "kind": "string", + "type": { + "$ref": "1186" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1209", + "parameter": { + "$ref": "1187" + }, + "value": { + "$id": "1210", + "kind": "string", + "type": { + "$ref": "1188" + }, + "value": "deidTest" + } + }, + { + "$id": "1211", + "parameter": { + "$ref": "1189" + }, + "value": { + "$id": "1212", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "kgwgrrpabvrsrrvpcgcnfmyfgyrl" + } + } + ], + "responses": [ + { + "$id": "1213", + "response": { + "$ref": "1194" + }, + "statusCode": 202 + }, + { + "$id": "1214", + "response": { + "$ref": "1199" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "1215", + "Name": "listByDeidService", + "ResourceName": "PrivateEndpointConnectionResource", + "Doc": "List private endpoint connections on the given resource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1216", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1218", + "Type": { + "$id": "1219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-09-20" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1220", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1221", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1222", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1223", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1224", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1225", + "Name": "deidServiceName", + "NameInRequest": "deidServiceName", + "Doc": "The name of the deid service", + "Type": { + "$id": "1226", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1227", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1228", + "kind": "constant", + "valueType": { + "$id": "1229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1230", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "255" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections", + "BufferResponse": true, + "Paging": { + "$id": "1231", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "1232", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.listByDeidService", + "Decorators": [], + "Examples": [ + { + "$id": "1233", + "kind": "http", + "name": "PrivateEndpointConnections_ListByDeidService - generated by [MaximumSet] rule. [stable]", + "description": "PrivateEndpointConnections_ListByDeidService - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/PrivateEndpointConnections_ListByDeidService_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1234", + "parameter": { + "$ref": "1216" + }, + "value": { + "$id": "1235", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1236", + "parameter": { + "$ref": "1220" + }, + "value": { + "$id": "1237", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1238", + "parameter": { + "$ref": "1223" + }, + "value": { + "$id": "1239", + "kind": "string", + "type": { + "$ref": "1224" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1240", + "parameter": { + "$ref": "1225" + }, + "value": { + "$id": "1241", + "kind": "string", + "type": { + "$ref": "1226" + }, + "value": "deidTest" + } + } + ], + "responses": [ + { + "$id": "1242", + "response": { + "$ref": "1230" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1243", + "kind": "model", + "type": { + "$ref": "255" + }, + "value": { + "$id": "1244", + "value": { + "$id": "1245", + "kind": "array", + "type": { + "$ref": "257" + }, + "value": [ + { + "$id": "1246", + "kind": "model", + "type": { + "$ref": "193" + }, + "value": { + "$id": "1247", + "properties": { + "$id": "1248", + "kind": "model", + "type": { + "$ref": "195" + }, + "value": { + "$id": "1249", + "privateEndpoint": { + "$id": "1250", + "kind": "model", + "type": { + "$ref": "202" + }, + "value": { + "$id": "1251", + "id": { + "$id": "1252", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "gpnxxbbtsysdhhclm" + } + } + }, + "privateLinkServiceConnectionState": { + "$id": "1253", + "kind": "model", + "type": { + "$ref": "211" + }, + "value": { + "$id": "1254", + "status": { + "$id": "1255", + "kind": "string", + "type": { + "$ref": "12" + }, + "value": "Pending" + }, + "actionsRequired": { + "$id": "1256", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "ulb" + }, + "description": { + "$id": "1257", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "mmvcleuufspfrojjveuith" + } + } + }, + "groupIds": { + "$id": "1258", + "kind": "array", + "type": { + "$ref": "197" + }, + "value": [ + { + "$id": "1259", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "xbdyjqg" + } + ] + }, + "provisioningState": { + "$id": "1260", + "kind": "string", + "type": { + "$ref": "20" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1261", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/deidTest/privateEndpointConnections/aduyb" + }, + "name": { + "$id": "1262", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "aduyb" + }, + "type": { + "$id": "1263", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "umjjkodjuhccrngl" + }, + "systemData": { + "$id": "1264", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "1265", + "createdBy": { + "$id": "1266", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "1267", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "1268", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1269", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1270", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1271", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1272", + "kind": "string", + "type": { + "$ref": "261" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "1273" + }, + "Parent": "HealthDataAIServicesClient", + "Parameters": [ + { + "$id": "1274", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "1275", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "1276", + "Type": { + "$id": "1277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateEndpointConnections" + }, + { + "$id": "1278", + "Name": "PrivateLinks", + "Namespace": "Microsoft.HealthDataAIServices", + "Doc": "Operations for private links on DeidService resource", + "Operations": [ + { + "$id": "1279", + "Name": "listByDeidService", + "ResourceName": "PrivateLinkResource", + "Doc": "List private links on the given resource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1280", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1282", + "Type": { + "$id": "1283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2024-09-20" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1284", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1285", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1287", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1289", + "Name": "deidServiceName", + "NameInRequest": "deidServiceName", + "Doc": "The name of the deid service", + "Type": { + "$id": "1290", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1291", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1292", + "kind": "constant", + "valueType": { + "$id": "1293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1294", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "86" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateLinkResources", + "BufferResponse": true, + "Paging": { + "$id": "1295", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "1296", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateLinks.listByDeidService", + "Decorators": [], + "Examples": [ + { + "$id": "1297", + "kind": "http", + "name": "PrivateLinks_ListByDeidService - generated by [MaximumSet] rule. [stable]", + "description": "PrivateLinks_ListByDeidService - generated by [MaximumSet] rule. [stable]", + "filePath": "2024-09-20/PrivateLinks_ListByDeidService_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1298", + "parameter": { + "$ref": "1280" + }, + "value": { + "$id": "1299", + "kind": "string", + "type": { + "$ref": "1281" + }, + "value": "2024-09-20" + } + }, + { + "$id": "1300", + "parameter": { + "$ref": "1284" + }, + "value": { + "$id": "1301", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "F21BB31B-C214-42C0-ACF0-DACCA05D3011" + } + }, + { + "$id": "1302", + "parameter": { + "$ref": "1287" + }, + "value": { + "$id": "1303", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "rgopenapi" + } + }, + { + "$id": "1304", + "parameter": { + "$ref": "1289" + }, + "value": { + "$id": "1305", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "deidTest" + } + } + ], + "responses": [ + { + "$id": "1306", + "response": { + "$ref": "1294" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1307", + "kind": "model", + "type": { + "$ref": "86" + }, + "value": { + "$id": "1308", + "value": { + "$id": "1309", + "kind": "array", + "type": { + "$ref": "88" + }, + "value": [ + { + "$id": "1310", + "kind": "model", + "type": { + "$ref": "89" + }, + "value": { + "$id": "1311", + "properties": { + "$id": "1312", + "kind": "model", + "type": { + "$ref": "135" + }, + "value": { + "$id": "1313", + "groupId": { + "$id": "1314", + "kind": "string", + "type": { + "$ref": "137" + }, + "value": "flaloakbdcqjisfhfnkrxmt" + }, + "requiredMembers": { + "$id": "1315", + "kind": "array", + "type": { + "$ref": "141" + }, + "value": [ + { + "$id": "1316", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "wbraaugftjqa" + } + ] + }, + "requiredZoneNames": { + "$id": "1317", + "kind": "array", + "type": { + "$ref": "146" + }, + "value": [ + { + "$id": "1318", + "kind": "string", + "type": { + "$ref": "147" + }, + "value": "ndsmc" + } + ] + } + } + }, + "id": { + "$id": "1319", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "/subscriptions/F21BB31B-C214-42C0-ACF0-DACCA05D3011/resourceGroups/rgopenapi/providers/Microsoft.HealthDataAIServices/deidServices/deidTest/privateLinkResources/rmptbzejhgxhlfpdizsekhsq" + }, + "name": { + "$id": "1320", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "rmptbzejhgxhlfpdizsekhsq" + }, + "type": { + "$id": "1321", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "lplbvyjkvsujegzqr" + }, + "systemData": { + "$id": "1322", + "kind": "model", + "type": { + "$ref": "107" + }, + "value": { + "$id": "1323", + "createdBy": { + "$id": "1324", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "p" + }, + "createdByType": { + "$id": "1325", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "createdAt": { + "$id": "1326", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "2024-04-13T19:47:24.985Z" + }, + "lastModifiedBy": { + "$id": "1327", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "pmbozfvwrblbknedeb" + }, + "lastModifiedByType": { + "$id": "1328", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1329", + "kind": "string", + "type": { + "$ref": "128" + }, + "value": "2024-04-13T19:47:24.986Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1330", + "kind": "string", + "type": { + "$ref": "155" + }, + "value": "https://microsoft.com/arzijt" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "1331" + }, + "Parent": "HealthDataAIServicesClient", + "Parameters": [ + { + "$id": "1332", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "1333", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "1334", + "Type": { + "$id": "1335", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.HealthDataAIServices.PrivateLinks" + } + ], + "Auth": { + "$id": "1336", + "OAuth2": { + "$id": "1337", + "Scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/Azure.ResourceManager.ImpactReporting.sln b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/Azure.ResourceManager.ImpactReporting.sln new file mode 100644 index 000000000000..8045641aab8e --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/Azure.ResourceManager.ImpactReporting.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.ImpactReporting.Samples", "samples\Azure.ResourceManager.ImpactReporting.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.ImpactReporting", "src\Azure.ResourceManager.ImpactReporting.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.ImpactReporting.Tests", "tests\Azure.ResourceManager.ImpactReporting.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/CHANGELOG.md b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/Directory.Build.props b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/README.md b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/README.md new file mode 100644 index 000000000000..ab99941d030e --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure ImpactReporting management client library for .NET + +**[Describe the service briefly first.]** + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - 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. + +## Getting started + +### Install the package + +Install the Microsoft Azure ImpactReporting management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.ImpactReporting --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET 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/dev/mgmt_quickstart.md). +- [API References](https://learn.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://aka.ms/azuresdk-net-mgmt-samples) + +## 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 about Microsoft Azure SDK, see [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 +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action 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 other 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/impactreporting/Azure.ResourceManager.ImpactReporting/api/Azure.ResourceManager.ImpactReporting.net8.0.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/api/Azure.ResourceManager.ImpactReporting.net8.0.cs new file mode 100644 index 000000000000..4db467f25c36 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/api/Azure.ResourceManager.ImpactReporting.net8.0.cs @@ -0,0 +1,616 @@ +namespace Azure.ResourceManager.ImpactReporting +{ + public partial class ConnectorCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ConnectorCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string connectorName, Azure.ResourceManager.ImpactReporting.ConnectorData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string connectorName, Azure.ResourceManager.ImpactReporting.ConnectorData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string connectorName, 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 connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string connectorName, 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 ConnectorData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectorData() { } + public Azure.ResourceManager.ImpactReporting.Models.ConnectorProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.ConnectorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.ConnectorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConnectorResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ConnectorResource() { } + public virtual Azure.ResourceManager.ImpactReporting.ConnectorData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string connectorName) { 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; } + Azure.ResourceManager.ImpactReporting.ConnectorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.ConnectorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.ImpactReporting.Models.ConnectorPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ImpactReporting.Models.ConnectorPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ImpactCategoryCollection : Azure.ResourceManager.ArmCollection + { + protected ImpactCategoryCollection() { } + public virtual Azure.Response Exists(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string resourceType, string categoryName = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string resourceType, string categoryName = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ImpactCategoryData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImpactCategoryData() { } + public Azure.ResourceManager.ImpactReporting.Models.ImpactCategoryProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.ImpactCategoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.ImpactCategoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImpactCategoryResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ImpactCategoryResource() { } + public virtual Azure.ResourceManager.ImpactReporting.ImpactCategoryData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string impactCategoryName) { 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; } + Azure.ResourceManager.ImpactReporting.ImpactCategoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.ImpactCategoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public static partial class ImpactReportingExtensions + { + public static Azure.Response GetConnector(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetConnectorAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ImpactReporting.ConnectorResource GetConnectorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ImpactReporting.ConnectorCollection GetConnectors(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } + public static Azure.ResourceManager.ImpactReporting.ImpactCategoryCollection GetImpactCategories(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } + public static Azure.Response GetImpactCategory(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetImpactCategoryAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ImpactReporting.ImpactCategoryResource GetImpactCategoryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ImpactReporting.InsightResource GetInsightResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetWorkloadImpact(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetWorkloadImpactAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ImpactReporting.WorkloadImpactResource GetWorkloadImpactResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ImpactReporting.WorkloadImpactCollection GetWorkloadImpacts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } + } + public partial class InsightCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected InsightCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string insightName, Azure.ResourceManager.ImpactReporting.InsightData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string insightName, Azure.ResourceManager.ImpactReporting.InsightData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string insightName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string insightName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string insightName, 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 insightName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string insightName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string insightName, 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 InsightData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InsightData() { } + public Azure.ResourceManager.ImpactReporting.Models.InsightProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.InsightData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.InsightData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class InsightResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected InsightResource() { } + public virtual Azure.ResourceManager.ImpactReporting.InsightData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string workloadImpactName, string insightName) { 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; } + Azure.ResourceManager.ImpactReporting.InsightData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.InsightData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ImpactReporting.InsightData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ImpactReporting.InsightData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class WorkloadImpactCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkloadImpactCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string workloadImpactName, Azure.ResourceManager.ImpactReporting.WorkloadImpactData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string workloadImpactName, Azure.ResourceManager.ImpactReporting.WorkloadImpactData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string workloadImpactName, 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 workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string workloadImpactName, 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 WorkloadImpactData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkloadImpactData() { } + public Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.WorkloadImpactData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.WorkloadImpactData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkloadImpactResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkloadImpactResource() { } + public virtual Azure.ResourceManager.ImpactReporting.WorkloadImpactData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string workloadImpactName) { 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 GetInsight(string insightName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetInsightAsync(string insightName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ImpactReporting.InsightCollection GetInsights() { throw null; } + Azure.ResourceManager.ImpactReporting.WorkloadImpactData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.WorkloadImpactData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ImpactReporting.WorkloadImpactData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ImpactReporting.WorkloadImpactData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.ImpactReporting.Mocking +{ + public partial class MockableImpactReportingArmClient : Azure.ResourceManager.ArmResource + { + protected MockableImpactReportingArmClient() { } + public virtual Azure.ResourceManager.ImpactReporting.ConnectorResource GetConnectorResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ImpactReporting.ImpactCategoryResource GetImpactCategoryResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ImpactReporting.InsightResource GetInsightResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ImpactReporting.WorkloadImpactResource GetWorkloadImpactResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableImpactReportingSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableImpactReportingSubscriptionResource() { } + public virtual Azure.Response GetConnector(string connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetConnectorAsync(string connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ImpactReporting.ConnectorCollection GetConnectors() { throw null; } + public virtual Azure.ResourceManager.ImpactReporting.ImpactCategoryCollection GetImpactCategories() { throw null; } + public virtual Azure.Response GetImpactCategory(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetImpactCategoryAsync(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetWorkloadImpact(string workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkloadImpactAsync(string workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ImpactReporting.WorkloadImpactCollection GetWorkloadImpacts() { throw null; } + } +} +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public static partial class ArmImpactReportingModelFactory + { + public static Azure.ResourceManager.ImpactReporting.ConnectorData ConnectorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ImpactReporting.Models.ConnectorProperties properties = null) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.ConnectorProperties ConnectorProperties(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState?), string connectorId = null, string tenantId = null, Azure.ResourceManager.ImpactReporting.Models.Platform connectorType = default(Azure.ResourceManager.ImpactReporting.Models.Platform), System.DateTimeOffset lastRunTimeStamp = default(System.DateTimeOffset)) { throw null; } + public static Azure.ResourceManager.ImpactReporting.ImpactCategoryData ImpactCategoryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ImpactReporting.Models.ImpactCategoryProperties properties = null) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.ImpactCategoryProperties ImpactCategoryProperties(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState?), string categoryId = null, string parentCategoryId = null, string description = null, System.Collections.Generic.IEnumerable requiredImpactProperties = null) { throw null; } + public static Azure.ResourceManager.ImpactReporting.InsightData InsightData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ImpactReporting.Models.InsightProperties properties = null) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.InsightProperties InsightProperties(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState?), string category = null, string status = null, string eventId = null, string groupId = null, Azure.ResourceManager.ImpactReporting.Models.Content content = null, System.DateTimeOffset? eventOn = default(System.DateTimeOffset?), string insightUniqueId = null, Azure.ResourceManager.ImpactReporting.Models.ImpactDetails impact = null, Azure.ResourceManager.ImpactReporting.Models.InsightPropertiesAdditionalDetails additionalDetails = null) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.RequiredImpactProperties RequiredImpactProperties(string name = null, System.Collections.Generic.IEnumerable allowedValues = null) { throw null; } + public static Azure.ResourceManager.ImpactReporting.WorkloadImpactData WorkloadImpactData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactProperties properties = null) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactProperties WorkloadImpactProperties(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState?), System.DateTimeOffset startOn = default(System.DateTimeOffset), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string impactedResourceId = null, string impactUniqueId = null, System.DateTimeOffset? reportedTimeUtc = default(System.DateTimeOffset?), string impactCategory = null, string impactDescription = null, System.Collections.Generic.IEnumerable armCorrelationIds = null, System.Collections.Generic.IEnumerable performance = null, Azure.ResourceManager.ImpactReporting.Models.Connectivity connectivity = null, Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactPropertiesAdditionalProperties additionalProperties = null, Azure.ResourceManager.ImpactReporting.Models.ErrorDetailProperties errorDetails = null, Azure.ResourceManager.ImpactReporting.Models.Workload workload = null, string impactGroupId = null, Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel? confidenceLevel = default(Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel?), Azure.ResourceManager.ImpactReporting.Models.ClientIncidentDetails clientIncidentDetails = null) { throw null; } + } + public partial class ClientIncidentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ClientIncidentDetails() { } + public string ClientIncidentId { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.IncidentSource? ClientIncidentSource { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ClientIncidentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ClientIncidentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ConfidenceLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ConfidenceLevel(string value) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel High { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel Low { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel Medium { get { throw null; } } + public bool Equals(Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel 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.ImpactReporting.Models.ConfidenceLevel left, Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel right) { throw null; } + public static implicit operator Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel left, Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel right) { throw null; } + public override string ToString() { throw null; } + } + public partial class Connectivity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Connectivity() { } + public int? Port { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.Protocol? Protocol { get { throw null; } set { } } + public string SourceAzureResourceId { get { throw null; } set { } } + public string TargetAzureResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Connectivity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Connectivity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConnectorPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectorPatch() { } + public Azure.ResourceManager.ImpactReporting.Models.Platform? ConnectorType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ConnectorPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ConnectorPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConnectorProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectorProperties(string connectorId, string tenantId, Azure.ResourceManager.ImpactReporting.Models.Platform connectorType, System.DateTimeOffset lastRunTimeStamp) { } + public string ConnectorId { get { throw null; } } + public Azure.ResourceManager.ImpactReporting.Models.Platform ConnectorType { get { throw null; } set { } } + public System.DateTimeOffset LastRunTimeStamp { get { throw null; } } + public Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public string TenantId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ConnectorProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ConnectorProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class Content : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Content(string title, string description) { } + public string Description { get { throw null; } set { } } + public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Content System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Content System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ErrorDetailProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ErrorDetailProperties() { } + public string ErrorCode { get { throw null; } set { } } + public string ErrorMessage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ErrorDetailProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ErrorDetailProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExpectedValueRange : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExpectedValueRange(double min, double max) { } + public double Max { get { throw null; } set { } } + public double Min { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ExpectedValueRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ExpectedValueRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImpactCategoryProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImpactCategoryProperties() { } + public string CategoryId { get { throw null; } } + public string Description { get { throw null; } } + public string ParentCategoryId { get { throw null; } } + public Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RequiredImpactProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ImpactCategoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ImpactCategoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImpactDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ImpactDetails(string impactedResourceId, System.DateTimeOffset startOn, string impactId) { } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public string ImpactedResourceId { get { throw null; } set { } } + public string ImpactId { get { throw null; } set { } } + public System.DateTimeOffset StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ImpactDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ImpactDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IncidentSource : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IncidentSource(string value) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.IncidentSource AzureDevops { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.IncidentSource ICM { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.IncidentSource Jira { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.IncidentSource Other { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.IncidentSource ServiceNow { get { throw null; } } + public bool Equals(Azure.ResourceManager.ImpactReporting.Models.IncidentSource 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.ImpactReporting.Models.IncidentSource left, Azure.ResourceManager.ImpactReporting.Models.IncidentSource right) { throw null; } + public static implicit operator Azure.ResourceManager.ImpactReporting.Models.IncidentSource (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ImpactReporting.Models.IncidentSource left, Azure.ResourceManager.ImpactReporting.Models.IncidentSource right) { throw null; } + public override string ToString() { throw null; } + } + public partial class InsightProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InsightProperties(string category, Azure.ResourceManager.ImpactReporting.Models.Content content, string insightUniqueId, Azure.ResourceManager.ImpactReporting.Models.ImpactDetails impact) { } + public Azure.ResourceManager.ImpactReporting.Models.InsightPropertiesAdditionalDetails AdditionalDetails { get { throw null; } set { } } + public string Category { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.Content Content { get { throw null; } set { } } + public string EventId { get { throw null; } set { } } + public System.DateTimeOffset? EventOn { get { throw null; } set { } } + public string GroupId { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.ImpactDetails Impact { get { throw null; } set { } } + public string InsightUniqueId { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.InsightProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.InsightProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class InsightPropertiesAdditionalDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InsightPropertiesAdditionalDetails() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.InsightPropertiesAdditionalDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.InsightPropertiesAdditionalDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MetricUnit : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MetricUnit(string value) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit Bytes { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit ByteSeconds { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit BytesPerSecond { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit Cores { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit Count { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit CountPerSecond { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit MilliCores { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit MilliSeconds { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit NanoCores { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit Other { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit Percent { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit Seconds { get { throw null; } } + public bool Equals(Azure.ResourceManager.ImpactReporting.Models.MetricUnit 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.ImpactReporting.Models.MetricUnit left, Azure.ResourceManager.ImpactReporting.Models.MetricUnit right) { throw null; } + public static implicit operator Azure.ResourceManager.ImpactReporting.Models.MetricUnit (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ImpactReporting.Models.MetricUnit left, Azure.ResourceManager.ImpactReporting.Models.MetricUnit right) { throw null; } + public override string ToString() { throw null; } + } + public partial class Performance : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Performance() { } + public double? Actual { get { throw null; } set { } } + public double? Expected { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.ExpectedValueRange ExpectedValueRange { get { throw null; } set { } } + public string MetricName { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.MetricUnit? Unit { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Performance System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Performance System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Platform : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Platform(string value) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.Platform AzureMonitor { get { throw null; } } + public bool Equals(Azure.ResourceManager.ImpactReporting.Models.Platform 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.ImpactReporting.Models.Platform left, Azure.ResourceManager.ImpactReporting.Models.Platform right) { throw null; } + public static implicit operator Azure.ResourceManager.ImpactReporting.Models.Platform (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ImpactReporting.Models.Platform left, Azure.ResourceManager.ImpactReporting.Models.Platform right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Protocol : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Protocol(string value) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol FTP { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol HTTP { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol HTTPS { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol Other { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol RDP { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol SSH { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol TCP { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol UDP { get { throw null; } } + public bool Equals(Azure.ResourceManager.ImpactReporting.Models.Protocol 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.ImpactReporting.Models.Protocol left, Azure.ResourceManager.ImpactReporting.Models.Protocol right) { throw null; } + public static implicit operator Azure.ResourceManager.ImpactReporting.Models.Protocol (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ImpactReporting.Models.Protocol left, Azure.ResourceManager.ImpactReporting.Models.Protocol 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.ImpactReporting.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.ProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ImpactReporting.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.ImpactReporting.Models.ProvisioningState left, Azure.ResourceManager.ImpactReporting.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.ImpactReporting.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState left, Azure.ResourceManager.ImpactReporting.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RequiredImpactProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RequiredImpactProperties() { } + public System.Collections.Generic.IReadOnlyList AllowedValues { get { throw null; } } + public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.RequiredImpactProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.RequiredImpactProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Toolset : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Toolset(string value) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset Ansible { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset ARM { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset Chef { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset Other { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset Portal { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset Puppet { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset SDK { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset Shell { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset Terraform { get { throw null; } } + public bool Equals(Azure.ResourceManager.ImpactReporting.Models.Toolset 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.ImpactReporting.Models.Toolset left, Azure.ResourceManager.ImpactReporting.Models.Toolset right) { throw null; } + public static implicit operator Azure.ResourceManager.ImpactReporting.Models.Toolset (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ImpactReporting.Models.Toolset left, Azure.ResourceManager.ImpactReporting.Models.Toolset right) { throw null; } + public override string ToString() { throw null; } + } + public partial class Workload : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Workload() { } + public string Context { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.Toolset? Toolset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Workload System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Workload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkloadImpactProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkloadImpactProperties(System.DateTimeOffset startOn, string impactedResourceId, string impactCategory) { } + public Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactPropertiesAdditionalProperties AdditionalProperties { get { throw null; } set { } } + public System.Collections.Generic.IList ArmCorrelationIds { get { throw null; } } + public Azure.ResourceManager.ImpactReporting.Models.ClientIncidentDetails ClientIncidentDetails { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel? ConfidenceLevel { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.Connectivity Connectivity { get { throw null; } set { } } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.ErrorDetailProperties ErrorDetails { get { throw null; } set { } } + public string ImpactCategory { get { throw null; } set { } } + public string ImpactDescription { get { throw null; } set { } } + public string ImpactedResourceId { get { throw null; } set { } } + public string ImpactGroupId { get { throw null; } set { } } + public string ImpactUniqueId { get { throw null; } } + public System.Collections.Generic.IList Performance { get { throw null; } } + public Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public System.DateTimeOffset? ReportedTimeUtc { get { throw null; } } + public System.DateTimeOffset StartOn { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.Workload Workload { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkloadImpactPropertiesAdditionalProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkloadImpactPropertiesAdditionalProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactPropertiesAdditionalProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactPropertiesAdditionalProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/api/Azure.ResourceManager.ImpactReporting.netstandard2.0.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/api/Azure.ResourceManager.ImpactReporting.netstandard2.0.cs new file mode 100644 index 000000000000..4db467f25c36 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/api/Azure.ResourceManager.ImpactReporting.netstandard2.0.cs @@ -0,0 +1,616 @@ +namespace Azure.ResourceManager.ImpactReporting +{ + public partial class ConnectorCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ConnectorCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string connectorName, Azure.ResourceManager.ImpactReporting.ConnectorData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string connectorName, Azure.ResourceManager.ImpactReporting.ConnectorData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string connectorName, 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 connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string connectorName, 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 ConnectorData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectorData() { } + public Azure.ResourceManager.ImpactReporting.Models.ConnectorProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.ConnectorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.ConnectorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConnectorResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ConnectorResource() { } + public virtual Azure.ResourceManager.ImpactReporting.ConnectorData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string connectorName) { 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; } + Azure.ResourceManager.ImpactReporting.ConnectorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.ConnectorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.ImpactReporting.Models.ConnectorPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ImpactReporting.Models.ConnectorPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ImpactCategoryCollection : Azure.ResourceManager.ArmCollection + { + protected ImpactCategoryCollection() { } + public virtual Azure.Response Exists(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string resourceType, string categoryName = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string resourceType, string categoryName = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ImpactCategoryData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImpactCategoryData() { } + public Azure.ResourceManager.ImpactReporting.Models.ImpactCategoryProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.ImpactCategoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.ImpactCategoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImpactCategoryResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ImpactCategoryResource() { } + public virtual Azure.ResourceManager.ImpactReporting.ImpactCategoryData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string impactCategoryName) { 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; } + Azure.ResourceManager.ImpactReporting.ImpactCategoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.ImpactCategoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public static partial class ImpactReportingExtensions + { + public static Azure.Response GetConnector(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetConnectorAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ImpactReporting.ConnectorResource GetConnectorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ImpactReporting.ConnectorCollection GetConnectors(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } + public static Azure.ResourceManager.ImpactReporting.ImpactCategoryCollection GetImpactCategories(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } + public static Azure.Response GetImpactCategory(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetImpactCategoryAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ImpactReporting.ImpactCategoryResource GetImpactCategoryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ImpactReporting.InsightResource GetInsightResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetWorkloadImpact(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetWorkloadImpactAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ImpactReporting.WorkloadImpactResource GetWorkloadImpactResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ImpactReporting.WorkloadImpactCollection GetWorkloadImpacts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } + } + public partial class InsightCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected InsightCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string insightName, Azure.ResourceManager.ImpactReporting.InsightData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string insightName, Azure.ResourceManager.ImpactReporting.InsightData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string insightName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string insightName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string insightName, 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 insightName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string insightName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string insightName, 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 InsightData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InsightData() { } + public Azure.ResourceManager.ImpactReporting.Models.InsightProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.InsightData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.InsightData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class InsightResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected InsightResource() { } + public virtual Azure.ResourceManager.ImpactReporting.InsightData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string workloadImpactName, string insightName) { 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; } + Azure.ResourceManager.ImpactReporting.InsightData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.InsightData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ImpactReporting.InsightData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ImpactReporting.InsightData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class WorkloadImpactCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkloadImpactCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string workloadImpactName, Azure.ResourceManager.ImpactReporting.WorkloadImpactData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string workloadImpactName, Azure.ResourceManager.ImpactReporting.WorkloadImpactData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string workloadImpactName, 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 workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string workloadImpactName, 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 WorkloadImpactData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkloadImpactData() { } + public Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.WorkloadImpactData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.WorkloadImpactData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkloadImpactResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkloadImpactResource() { } + public virtual Azure.ResourceManager.ImpactReporting.WorkloadImpactData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string workloadImpactName) { 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 GetInsight(string insightName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetInsightAsync(string insightName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ImpactReporting.InsightCollection GetInsights() { throw null; } + Azure.ResourceManager.ImpactReporting.WorkloadImpactData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.WorkloadImpactData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ImpactReporting.WorkloadImpactData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ImpactReporting.WorkloadImpactData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.ImpactReporting.Mocking +{ + public partial class MockableImpactReportingArmClient : Azure.ResourceManager.ArmResource + { + protected MockableImpactReportingArmClient() { } + public virtual Azure.ResourceManager.ImpactReporting.ConnectorResource GetConnectorResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ImpactReporting.ImpactCategoryResource GetImpactCategoryResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ImpactReporting.InsightResource GetInsightResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ImpactReporting.WorkloadImpactResource GetWorkloadImpactResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableImpactReportingSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableImpactReportingSubscriptionResource() { } + public virtual Azure.Response GetConnector(string connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetConnectorAsync(string connectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ImpactReporting.ConnectorCollection GetConnectors() { throw null; } + public virtual Azure.ResourceManager.ImpactReporting.ImpactCategoryCollection GetImpactCategories() { throw null; } + public virtual Azure.Response GetImpactCategory(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetImpactCategoryAsync(string impactCategoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetWorkloadImpact(string workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkloadImpactAsync(string workloadImpactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ImpactReporting.WorkloadImpactCollection GetWorkloadImpacts() { throw null; } + } +} +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public static partial class ArmImpactReportingModelFactory + { + public static Azure.ResourceManager.ImpactReporting.ConnectorData ConnectorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ImpactReporting.Models.ConnectorProperties properties = null) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.ConnectorProperties ConnectorProperties(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState?), string connectorId = null, string tenantId = null, Azure.ResourceManager.ImpactReporting.Models.Platform connectorType = default(Azure.ResourceManager.ImpactReporting.Models.Platform), System.DateTimeOffset lastRunTimeStamp = default(System.DateTimeOffset)) { throw null; } + public static Azure.ResourceManager.ImpactReporting.ImpactCategoryData ImpactCategoryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ImpactReporting.Models.ImpactCategoryProperties properties = null) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.ImpactCategoryProperties ImpactCategoryProperties(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState?), string categoryId = null, string parentCategoryId = null, string description = null, System.Collections.Generic.IEnumerable requiredImpactProperties = null) { throw null; } + public static Azure.ResourceManager.ImpactReporting.InsightData InsightData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ImpactReporting.Models.InsightProperties properties = null) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.InsightProperties InsightProperties(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState?), string category = null, string status = null, string eventId = null, string groupId = null, Azure.ResourceManager.ImpactReporting.Models.Content content = null, System.DateTimeOffset? eventOn = default(System.DateTimeOffset?), string insightUniqueId = null, Azure.ResourceManager.ImpactReporting.Models.ImpactDetails impact = null, Azure.ResourceManager.ImpactReporting.Models.InsightPropertiesAdditionalDetails additionalDetails = null) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.RequiredImpactProperties RequiredImpactProperties(string name = null, System.Collections.Generic.IEnumerable allowedValues = null) { throw null; } + public static Azure.ResourceManager.ImpactReporting.WorkloadImpactData WorkloadImpactData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactProperties properties = null) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactProperties WorkloadImpactProperties(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState?), System.DateTimeOffset startOn = default(System.DateTimeOffset), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string impactedResourceId = null, string impactUniqueId = null, System.DateTimeOffset? reportedTimeUtc = default(System.DateTimeOffset?), string impactCategory = null, string impactDescription = null, System.Collections.Generic.IEnumerable armCorrelationIds = null, System.Collections.Generic.IEnumerable performance = null, Azure.ResourceManager.ImpactReporting.Models.Connectivity connectivity = null, Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactPropertiesAdditionalProperties additionalProperties = null, Azure.ResourceManager.ImpactReporting.Models.ErrorDetailProperties errorDetails = null, Azure.ResourceManager.ImpactReporting.Models.Workload workload = null, string impactGroupId = null, Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel? confidenceLevel = default(Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel?), Azure.ResourceManager.ImpactReporting.Models.ClientIncidentDetails clientIncidentDetails = null) { throw null; } + } + public partial class ClientIncidentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ClientIncidentDetails() { } + public string ClientIncidentId { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.IncidentSource? ClientIncidentSource { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ClientIncidentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ClientIncidentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ConfidenceLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ConfidenceLevel(string value) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel High { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel Low { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel Medium { get { throw null; } } + public bool Equals(Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel 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.ImpactReporting.Models.ConfidenceLevel left, Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel right) { throw null; } + public static implicit operator Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel left, Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel right) { throw null; } + public override string ToString() { throw null; } + } + public partial class Connectivity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Connectivity() { } + public int? Port { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.Protocol? Protocol { get { throw null; } set { } } + public string SourceAzureResourceId { get { throw null; } set { } } + public string TargetAzureResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Connectivity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Connectivity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConnectorPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectorPatch() { } + public Azure.ResourceManager.ImpactReporting.Models.Platform? ConnectorType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ConnectorPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ConnectorPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConnectorProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectorProperties(string connectorId, string tenantId, Azure.ResourceManager.ImpactReporting.Models.Platform connectorType, System.DateTimeOffset lastRunTimeStamp) { } + public string ConnectorId { get { throw null; } } + public Azure.ResourceManager.ImpactReporting.Models.Platform ConnectorType { get { throw null; } set { } } + public System.DateTimeOffset LastRunTimeStamp { get { throw null; } } + public Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public string TenantId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ConnectorProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ConnectorProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class Content : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Content(string title, string description) { } + public string Description { get { throw null; } set { } } + public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Content System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Content System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ErrorDetailProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ErrorDetailProperties() { } + public string ErrorCode { get { throw null; } set { } } + public string ErrorMessage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ErrorDetailProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ErrorDetailProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExpectedValueRange : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExpectedValueRange(double min, double max) { } + public double Max { get { throw null; } set { } } + public double Min { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ExpectedValueRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ExpectedValueRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImpactCategoryProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImpactCategoryProperties() { } + public string CategoryId { get { throw null; } } + public string Description { get { throw null; } } + public string ParentCategoryId { get { throw null; } } + public Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RequiredImpactProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ImpactCategoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ImpactCategoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImpactDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ImpactDetails(string impactedResourceId, System.DateTimeOffset startOn, string impactId) { } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public string ImpactedResourceId { get { throw null; } set { } } + public string ImpactId { get { throw null; } set { } } + public System.DateTimeOffset StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ImpactDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.ImpactDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IncidentSource : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IncidentSource(string value) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.IncidentSource AzureDevops { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.IncidentSource ICM { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.IncidentSource Jira { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.IncidentSource Other { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.IncidentSource ServiceNow { get { throw null; } } + public bool Equals(Azure.ResourceManager.ImpactReporting.Models.IncidentSource 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.ImpactReporting.Models.IncidentSource left, Azure.ResourceManager.ImpactReporting.Models.IncidentSource right) { throw null; } + public static implicit operator Azure.ResourceManager.ImpactReporting.Models.IncidentSource (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ImpactReporting.Models.IncidentSource left, Azure.ResourceManager.ImpactReporting.Models.IncidentSource right) { throw null; } + public override string ToString() { throw null; } + } + public partial class InsightProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InsightProperties(string category, Azure.ResourceManager.ImpactReporting.Models.Content content, string insightUniqueId, Azure.ResourceManager.ImpactReporting.Models.ImpactDetails impact) { } + public Azure.ResourceManager.ImpactReporting.Models.InsightPropertiesAdditionalDetails AdditionalDetails { get { throw null; } set { } } + public string Category { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.Content Content { get { throw null; } set { } } + public string EventId { get { throw null; } set { } } + public System.DateTimeOffset? EventOn { get { throw null; } set { } } + public string GroupId { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.ImpactDetails Impact { get { throw null; } set { } } + public string InsightUniqueId { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.InsightProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.InsightProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class InsightPropertiesAdditionalDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InsightPropertiesAdditionalDetails() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.InsightPropertiesAdditionalDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.InsightPropertiesAdditionalDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MetricUnit : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MetricUnit(string value) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit Bytes { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit ByteSeconds { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit BytesPerSecond { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit Cores { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit Count { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit CountPerSecond { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit MilliCores { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit MilliSeconds { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit NanoCores { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit Other { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit Percent { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.MetricUnit Seconds { get { throw null; } } + public bool Equals(Azure.ResourceManager.ImpactReporting.Models.MetricUnit 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.ImpactReporting.Models.MetricUnit left, Azure.ResourceManager.ImpactReporting.Models.MetricUnit right) { throw null; } + public static implicit operator Azure.ResourceManager.ImpactReporting.Models.MetricUnit (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ImpactReporting.Models.MetricUnit left, Azure.ResourceManager.ImpactReporting.Models.MetricUnit right) { throw null; } + public override string ToString() { throw null; } + } + public partial class Performance : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Performance() { } + public double? Actual { get { throw null; } set { } } + public double? Expected { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.ExpectedValueRange ExpectedValueRange { get { throw null; } set { } } + public string MetricName { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.MetricUnit? Unit { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Performance System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Performance System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Platform : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Platform(string value) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.Platform AzureMonitor { get { throw null; } } + public bool Equals(Azure.ResourceManager.ImpactReporting.Models.Platform 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.ImpactReporting.Models.Platform left, Azure.ResourceManager.ImpactReporting.Models.Platform right) { throw null; } + public static implicit operator Azure.ResourceManager.ImpactReporting.Models.Platform (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ImpactReporting.Models.Platform left, Azure.ResourceManager.ImpactReporting.Models.Platform right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Protocol : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Protocol(string value) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol FTP { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol HTTP { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol HTTPS { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol Other { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol RDP { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol SSH { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol TCP { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Protocol UDP { get { throw null; } } + public bool Equals(Azure.ResourceManager.ImpactReporting.Models.Protocol 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.ImpactReporting.Models.Protocol left, Azure.ResourceManager.ImpactReporting.Models.Protocol right) { throw null; } + public static implicit operator Azure.ResourceManager.ImpactReporting.Models.Protocol (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ImpactReporting.Models.Protocol left, Azure.ResourceManager.ImpactReporting.Models.Protocol 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.ImpactReporting.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.ProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ImpactReporting.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.ImpactReporting.Models.ProvisioningState left, Azure.ResourceManager.ImpactReporting.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.ImpactReporting.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ImpactReporting.Models.ProvisioningState left, Azure.ResourceManager.ImpactReporting.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RequiredImpactProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RequiredImpactProperties() { } + public System.Collections.Generic.IReadOnlyList AllowedValues { get { throw null; } } + public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.RequiredImpactProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.RequiredImpactProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Toolset : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Toolset(string value) { throw null; } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset Ansible { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset ARM { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset Chef { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset Other { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset Portal { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset Puppet { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset SDK { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset Shell { get { throw null; } } + public static Azure.ResourceManager.ImpactReporting.Models.Toolset Terraform { get { throw null; } } + public bool Equals(Azure.ResourceManager.ImpactReporting.Models.Toolset 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.ImpactReporting.Models.Toolset left, Azure.ResourceManager.ImpactReporting.Models.Toolset right) { throw null; } + public static implicit operator Azure.ResourceManager.ImpactReporting.Models.Toolset (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ImpactReporting.Models.Toolset left, Azure.ResourceManager.ImpactReporting.Models.Toolset right) { throw null; } + public override string ToString() { throw null; } + } + public partial class Workload : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Workload() { } + public string Context { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.Toolset? Toolset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Workload System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.Workload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkloadImpactProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkloadImpactProperties(System.DateTimeOffset startOn, string impactedResourceId, string impactCategory) { } + public Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactPropertiesAdditionalProperties AdditionalProperties { get { throw null; } set { } } + public System.Collections.Generic.IList ArmCorrelationIds { get { throw null; } } + public Azure.ResourceManager.ImpactReporting.Models.ClientIncidentDetails ClientIncidentDetails { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.ConfidenceLevel? ConfidenceLevel { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.Connectivity Connectivity { get { throw null; } set { } } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.ErrorDetailProperties ErrorDetails { get { throw null; } set { } } + public string ImpactCategory { get { throw null; } set { } } + public string ImpactDescription { get { throw null; } set { } } + public string ImpactedResourceId { get { throw null; } set { } } + public string ImpactGroupId { get { throw null; } set { } } + public string ImpactUniqueId { get { throw null; } } + public System.Collections.Generic.IList Performance { get { throw null; } } + public Azure.ResourceManager.ImpactReporting.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public System.DateTimeOffset? ReportedTimeUtc { get { throw null; } } + public System.DateTimeOffset StartOn { get { throw null; } set { } } + public Azure.ResourceManager.ImpactReporting.Models.Workload Workload { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkloadImpactPropertiesAdditionalProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkloadImpactPropertiesAdditionalProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactPropertiesAdditionalProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ImpactReporting.Models.WorkloadImpactPropertiesAdditionalProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/assets.json b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/assets.json new file mode 100644 index 000000000000..547ee1975d7d --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/impactreporting/Azure.ResourceManager.ImpactReporting", + "Tag": "" +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Azure.ResourceManager.ImpactReporting.Samples.csproj b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Azure.ResourceManager.ImpactReporting.Samples.csproj new file mode 100644 index 000000000000..01724b6d9e57 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Azure.ResourceManager.ImpactReporting.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ConnectorCollection.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ConnectorCollection.cs new file mode 100644 index 000000000000..269ee514ecfb --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ConnectorCollection.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ImpactReporting.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.ImpactReporting.Samples +{ + public partial class Sample_ConnectorCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ConnectorsCreateOrUpdate() + { + // Generated from example definition: 2024-05-01-preview/Connectors_CreateOrUpdate.json + // this example is just showing the usage of "Connector_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "74f5e23f-d4d9-410a-bb4d-8f0608adb10d"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this ConnectorResource + ConnectorCollection collection = subscriptionResource.GetConnectors(); + + // invoke the operation + string connectorName = "testconnector1"; + ConnectorData data = new ConnectorData + { + Properties = new ConnectorProperties(null, null, Platform.AzureMonitor, default), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, connectorName, data); + ConnectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ConnectorsGet() + { + // Generated from example definition: 2024-05-01-preview/Connectors_Get.json + // this example is just showing the usage of "Connector_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "74f5e23f-d4d9-410a-bb4d-8f0608adb10d"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this ConnectorResource + ConnectorCollection collection = subscriptionResource.GetConnectors(); + + // invoke the operation + string connectorName = "testconnector1"; + ConnectorResource result = await collection.GetAsync(connectorName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ConnectorsListBySubscription() + { + // Generated from example definition: 2024-05-01-preview/Connectors_ListBySubscription.json + // this example is just showing the usage of "Connector_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "74f5e23f-d4d9-410a-bb4d-8f0608adb10d"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this ConnectorResource + ConnectorCollection collection = subscriptionResource.GetConnectors(); + + // invoke the operation and iterate over the result + await foreach (ConnectorResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectorData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ConnectorsGet() + { + // Generated from example definition: 2024-05-01-preview/Connectors_Get.json + // this example is just showing the usage of "Connector_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "74f5e23f-d4d9-410a-bb4d-8f0608adb10d"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this ConnectorResource + ConnectorCollection collection = subscriptionResource.GetConnectors(); + + // invoke the operation + string connectorName = "testconnector1"; + bool result = await collection.ExistsAsync(connectorName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ConnectorsGet() + { + // Generated from example definition: 2024-05-01-preview/Connectors_Get.json + // this example is just showing the usage of "Connector_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "74f5e23f-d4d9-410a-bb4d-8f0608adb10d"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this ConnectorResource + ConnectorCollection collection = subscriptionResource.GetConnectors(); + + // invoke the operation + string connectorName = "testconnector1"; + NullableResponse response = await collection.GetIfExistsAsync(connectorName); + ConnectorResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ConnectorResource.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ConnectorResource.cs new file mode 100644 index 000000000000..efc8966b25cf --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ConnectorResource.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ImpactReporting.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ImpactReporting.Samples +{ + public partial class Sample_ConnectorResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ConnectorsGet() + { + // Generated from example definition: 2024-05-01-preview/Connectors_Get.json + // this example is just showing the usage of "Connector_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectorResource created on azure + // for more information of creating ConnectorResource, please refer to the document of ConnectorResource + string subscriptionId = "74f5e23f-d4d9-410a-bb4d-8f0608adb10d"; + string connectorName = "testconnector1"; + ResourceIdentifier connectorResourceId = ConnectorResource.CreateResourceIdentifier(subscriptionId, connectorName); + ConnectorResource connector = client.GetConnectorResource(connectorResourceId); + + // invoke the operation + ConnectorResource result = await connector.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ConnectorsDelete() + { + // Generated from example definition: 2024-05-01-preview/Connectors_Delete.json + // this example is just showing the usage of "Connector_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectorResource created on azure + // for more information of creating ConnectorResource, please refer to the document of ConnectorResource + string subscriptionId = "8F74B371-8573-4773-9BDA-D546505BDB3A"; + string connectorName = "testconnector1"; + ResourceIdentifier connectorResourceId = ConnectorResource.CreateResourceIdentifier(subscriptionId, connectorName); + ConnectorResource connector = client.GetConnectorResource(connectorResourceId); + + // invoke the operation + await connector.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ConnectorsUpdate() + { + // Generated from example definition: 2024-05-01-preview/Connectors_Update.json + // this example is just showing the usage of "Connector_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectorResource created on azure + // for more information of creating ConnectorResource, please refer to the document of ConnectorResource + string subscriptionId = "74f5e23f-d4d9-410a-bb4d-8f0608adb10d"; + string connectorName = "testconnector1"; + ResourceIdentifier connectorResourceId = ConnectorResource.CreateResourceIdentifier(subscriptionId, connectorName); + ConnectorResource connector = client.GetConnectorResource(connectorResourceId); + + // invoke the operation + ConnectorPatch patch = new ConnectorPatch + { + ConnectorType = Platform.AzureMonitor, + }; + ConnectorResource result = await connector.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ImpactCategoryCollection.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ImpactCategoryCollection.cs new file mode 100644 index 000000000000..65a75ca469b4 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ImpactCategoryCollection.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.ImpactReporting.Samples +{ + public partial class Sample_ImpactCategoryCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetWorkloadImpactResourceByName() + { + // Generated from example definition: 2024-05-01-preview/ImpactCategories_Get.json + // this example is just showing the usage of "ImpactCategory_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this ImpactCategoryResource + ImpactCategoryCollection collection = subscriptionResource.GetImpactCategories(); + + // invoke the operation + string impactCategoryName = "ARMOperation.Create"; + ImpactCategoryResource result = await collection.GetAsync(impactCategoryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImpactCategoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_GetImpactCategoriesListBySubscription() + { + // Generated from example definition: 2024-05-01-preview/ImpactCategories_ListBySubscription.json + // this example is just showing the usage of "ImpactCategory_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this ImpactCategoryResource + ImpactCategoryCollection collection = subscriptionResource.GetImpactCategories(); + + // invoke the operation and iterate over the result + string resourceType = "microsoft.compute/virtualmachines"; + await foreach (ImpactCategoryResource item in collection.GetAllAsync(resourceType)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImpactCategoryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetWorkloadImpactResourceByName() + { + // Generated from example definition: 2024-05-01-preview/ImpactCategories_Get.json + // this example is just showing the usage of "ImpactCategory_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this ImpactCategoryResource + ImpactCategoryCollection collection = subscriptionResource.GetImpactCategories(); + + // invoke the operation + string impactCategoryName = "ARMOperation.Create"; + bool result = await collection.ExistsAsync(impactCategoryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetWorkloadImpactResourceByName() + { + // Generated from example definition: 2024-05-01-preview/ImpactCategories_Get.json + // this example is just showing the usage of "ImpactCategory_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this ImpactCategoryResource + ImpactCategoryCollection collection = subscriptionResource.GetImpactCategories(); + + // invoke the operation + string impactCategoryName = "ARMOperation.Create"; + NullableResponse response = await collection.GetIfExistsAsync(impactCategoryName); + ImpactCategoryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImpactCategoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ImpactCategoryResource.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ImpactCategoryResource.cs new file mode 100644 index 000000000000..1764be354dc9 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_ImpactCategoryResource.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.ImpactReporting.Samples +{ + public partial class Sample_ImpactCategoryResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetWorkloadImpactResourceByName() + { + // Generated from example definition: 2024-05-01-preview/ImpactCategories_Get.json + // this example is just showing the usage of "ImpactCategory_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ImpactCategoryResource created on azure + // for more information of creating ImpactCategoryResource, please refer to the document of ImpactCategoryResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string impactCategoryName = "ARMOperation.Create"; + ResourceIdentifier impactCategoryResourceId = ImpactCategoryResource.CreateResourceIdentifier(subscriptionId, impactCategoryName); + ImpactCategoryResource impactCategory = client.GetImpactCategoryResource(impactCategoryResourceId); + + // invoke the operation + ImpactCategoryResource result = await impactCategory.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ImpactCategoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_InsightCollection.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_InsightCollection.cs new file mode 100644 index 000000000000..38c33592e5bf --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_InsightCollection.cs @@ -0,0 +1,405 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ImpactReporting.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ImpactReporting.Samples +{ + public partial class Sample_InsightCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreatingAnInsight() + { + // Generated from example definition: 2024-05-01-preview/Insights_Create.json + // this example is just showing the usage of "Insight_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactid22"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // get the collection of this InsightResource + InsightCollection collection = workloadImpact.GetInsights(); + + // invoke the operation + string insightName = "insightId12"; + InsightData data = new InsightData + { + Properties = new InsightProperties("repair", new Content("Impact Has been correlated to an outage", "At 2018-11-08T00:00:00Z UTC, your services dependent on these resources VM1 may have experienced an issue.
We have identified an outage that affected these resources(s). You can look at outage information on NL2W-VCZ link.
"), "00000000-0000-0000-0000-000000000000", new ImpactDetails("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-rg/providers/Microsoft.Sql/sqlserver/dbservername", DateTimeOffset.Parse("2023-06-15T01:00:00.009223Z"), "/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.Impact/workloadImpacts/impactid22")) + { + Status = "resolved", + EventOn = DateTimeOffset.Parse("2023-06-15T04:00:00.009223Z"), + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, insightName, data); + InsightResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InsightData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetInsightSampleForDiagnosticsCategory() + { + // Generated from example definition: 2024-05-01-preview/Insights_Get_diagnostics.json + // this example is just showing the usage of "Insight_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactid"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // get the collection of this InsightResource + InsightCollection collection = workloadImpact.GetInsights(); + + // invoke the operation + string insightName = "insight1"; + InsightResource result = await collection.GetAsync(insightName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InsightData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetInsightSampleForMitigationActionCategory() + { + // Generated from example definition: 2024-05-01-preview/Insights_Get_mitigationAction.json + // this example is just showing the usage of "Insight_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactId"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // get the collection of this InsightResource + InsightCollection collection = workloadImpact.GetInsights(); + + // invoke the operation + string insightName = "HPCUASucceeded"; + InsightResource result = await collection.GetAsync(insightName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InsightData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetInsightSampleForServiceHealthCategory() + { + // Generated from example definition: 2024-05-01-preview/Insights_Get_servicehealth.json + // this example is just showing the usage of "Insight_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactid"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // get the collection of this InsightResource + InsightCollection collection = workloadImpact.GetInsights(); + + // invoke the operation + string insightName = "insightname"; + InsightResource result = await collection.GetAsync(insightName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InsightData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListInsightResourcesByWorkloadImpactName() + { + // Generated from example definition: 2024-05-01-preview/Insights_ListBySubscription.json + // this example is just showing the usage of "Insight_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactid22"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // get the collection of this InsightResource + InsightCollection collection = workloadImpact.GetInsights(); + + // invoke the operation and iterate over the result + await foreach (InsightResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InsightData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetInsightSampleForDiagnosticsCategory() + { + // Generated from example definition: 2024-05-01-preview/Insights_Get_diagnostics.json + // this example is just showing the usage of "Insight_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactid"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // get the collection of this InsightResource + InsightCollection collection = workloadImpact.GetInsights(); + + // invoke the operation + string insightName = "insight1"; + bool result = await collection.ExistsAsync(insightName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetInsightSampleForMitigationActionCategory() + { + // Generated from example definition: 2024-05-01-preview/Insights_Get_mitigationAction.json + // this example is just showing the usage of "Insight_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactId"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // get the collection of this InsightResource + InsightCollection collection = workloadImpact.GetInsights(); + + // invoke the operation + string insightName = "HPCUASucceeded"; + bool result = await collection.ExistsAsync(insightName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetInsightSampleForServiceHealthCategory() + { + // Generated from example definition: 2024-05-01-preview/Insights_Get_servicehealth.json + // this example is just showing the usage of "Insight_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactid"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // get the collection of this InsightResource + InsightCollection collection = workloadImpact.GetInsights(); + + // invoke the operation + string insightName = "insightname"; + bool result = await collection.ExistsAsync(insightName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetInsightSampleForDiagnosticsCategory() + { + // Generated from example definition: 2024-05-01-preview/Insights_Get_diagnostics.json + // this example is just showing the usage of "Insight_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactid"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // get the collection of this InsightResource + InsightCollection collection = workloadImpact.GetInsights(); + + // invoke the operation + string insightName = "insight1"; + NullableResponse response = await collection.GetIfExistsAsync(insightName); + InsightResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InsightData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetInsightSampleForMitigationActionCategory() + { + // Generated from example definition: 2024-05-01-preview/Insights_Get_mitigationAction.json + // this example is just showing the usage of "Insight_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactId"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // get the collection of this InsightResource + InsightCollection collection = workloadImpact.GetInsights(); + + // invoke the operation + string insightName = "HPCUASucceeded"; + NullableResponse response = await collection.GetIfExistsAsync(insightName); + InsightResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InsightData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetInsightSampleForServiceHealthCategory() + { + // Generated from example definition: 2024-05-01-preview/Insights_Get_servicehealth.json + // this example is just showing the usage of "Insight_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactid"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // get the collection of this InsightResource + InsightCollection collection = workloadImpact.GetInsights(); + + // invoke the operation + string insightName = "insightname"; + NullableResponse response = await collection.GetIfExistsAsync(insightName); + InsightResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InsightData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_InsightResource.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_InsightResource.cs new file mode 100644 index 000000000000..a5e82a2cd079 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_InsightResource.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ImpactReporting.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ImpactReporting.Samples +{ + public partial class Sample_InsightResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetInsightSampleForDiagnosticsCategory() + { + // Generated from example definition: 2024-05-01-preview/Insights_Get_diagnostics.json + // this example is just showing the usage of "Insight_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InsightResource created on azure + // for more information of creating InsightResource, please refer to the document of InsightResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactid"; + string insightName = "insight1"; + ResourceIdentifier insightResourceId = InsightResource.CreateResourceIdentifier(subscriptionId, workloadImpactName, insightName); + InsightResource insight = client.GetInsightResource(insightResourceId); + + // invoke the operation + InsightResource result = await insight.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InsightData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetInsightSampleForMitigationActionCategory() + { + // Generated from example definition: 2024-05-01-preview/Insights_Get_mitigationAction.json + // this example is just showing the usage of "Insight_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InsightResource created on azure + // for more information of creating InsightResource, please refer to the document of InsightResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactId"; + string insightName = "HPCUASucceeded"; + ResourceIdentifier insightResourceId = InsightResource.CreateResourceIdentifier(subscriptionId, workloadImpactName, insightName); + InsightResource insight = client.GetInsightResource(insightResourceId); + + // invoke the operation + InsightResource result = await insight.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InsightData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetInsightSampleForServiceHealthCategory() + { + // Generated from example definition: 2024-05-01-preview/Insights_Get_servicehealth.json + // this example is just showing the usage of "Insight_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InsightResource created on azure + // for more information of creating InsightResource, please refer to the document of InsightResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactid"; + string insightName = "insightname"; + ResourceIdentifier insightResourceId = InsightResource.CreateResourceIdentifier(subscriptionId, workloadImpactName, insightName); + InsightResource insight = client.GetInsightResource(insightResourceId); + + // invoke the operation + InsightResource result = await insight.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InsightData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteAnInsight() + { + // Generated from example definition: 2024-05-01-preview/Insights_Delete.json + // this example is just showing the usage of "Insight_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InsightResource created on azure + // for more information of creating InsightResource, please refer to the document of InsightResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactid22"; + string insightName = "insightId12"; + ResourceIdentifier insightResourceId = InsightResource.CreateResourceIdentifier(subscriptionId, workloadImpactName, insightName); + InsightResource insight = client.GetInsightResource(insightResourceId); + + // invoke the operation + await insight.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_CreatingAnInsight() + { + // Generated from example definition: 2024-05-01-preview/Insights_Create.json + // this example is just showing the usage of "Insight_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InsightResource created on azure + // for more information of creating InsightResource, please refer to the document of InsightResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impactid22"; + string insightName = "insightId12"; + ResourceIdentifier insightResourceId = InsightResource.CreateResourceIdentifier(subscriptionId, workloadImpactName, insightName); + InsightResource insight = client.GetInsightResource(insightResourceId); + + // invoke the operation + InsightData data = new InsightData + { + Properties = new InsightProperties("repair", new Content("Impact Has been correlated to an outage", "At 2018-11-08T00:00:00Z UTC, your services dependent on these resources VM1 may have experienced an issue.
We have identified an outage that affected these resources(s). You can look at outage information on NL2W-VCZ link.
"), "00000000-0000-0000-0000-000000000000", new ImpactDetails("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-rg/providers/Microsoft.Sql/sqlserver/dbservername", DateTimeOffset.Parse("2023-06-15T01:00:00.009223Z"), "/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.Impact/workloadImpacts/impactid22")) + { + Status = "resolved", + EventOn = DateTimeOffset.Parse("2023-06-15T04:00:00.009223Z"), + }, + }; + ArmOperation lro = await insight.UpdateAsync(WaitUntil.Completed, data); + InsightResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InsightData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_WorkloadImpactCollection.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_WorkloadImpactCollection.cs new file mode 100644 index 000000000000..6520c4244a99 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_WorkloadImpactCollection.cs @@ -0,0 +1,368 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ImpactReporting.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.ImpactReporting.Samples +{ + public partial class Sample_WorkloadImpactCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ReportingArmOperationFailure() + { + // Generated from example definition: 2024-05-01-preview/WorkloadArmOperation_create.json + // this example is just showing the usage of "WorkloadImpact_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this WorkloadImpactResource + WorkloadImpactCollection collection = subscriptionResource.GetWorkloadImpacts(); + + // invoke the operation + string workloadImpactName = "impact-002"; + WorkloadImpactData data = new WorkloadImpactData + { + Properties = new WorkloadImpactProperties(DateTimeOffset.Parse("2022-06-15T05:59:46.6517821Z"), "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-rg/providers/Microsoft.Sql/sqlserver/dbservercontext", "ArmOperation") + { + ImpactDescription = "deletion of resource failed", + ArmCorrelationIds = { "00000000-0000-0000-0000-000000000000" }, + Workload = new Workload + { + Context = "webapp/scenario1", + Toolset = Toolset.Other, + }, + ClientIncidentDetails = new ClientIncidentDetails + { + ClientIncidentId = "AA123", + ClientIncidentSource = IncidentSource.Jira, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, workloadImpactName, data); + WorkloadImpactResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkloadImpactData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ReportingAvailabilityRelatedImpact() + { + // Generated from example definition: 2024-05-01-preview/WorkloadAvailability_Create.json + // this example is just showing the usage of "WorkloadImpact_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this WorkloadImpactResource + WorkloadImpactCollection collection = subscriptionResource.GetWorkloadImpacts(); + + // invoke the operation + string workloadImpactName = "impact-002"; + WorkloadImpactData data = new WorkloadImpactData + { + Properties = new WorkloadImpactProperties(DateTimeOffset.Parse("2022-06-15T05:59:46.6517821Z"), "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-rg/providers/Microsoft.Sql/sqlserver/dbservercontext", "Availability") + { + ImpactDescription = "read calls failed", + Workload = new Workload + { + Context = "webapp/scenario1", + Toolset = Toolset.Other, + }, + ClientIncidentDetails = new ClientIncidentDetails + { + ClientIncidentId = "AA123", + ClientIncidentSource = IncidentSource.Jira, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, workloadImpactName, data); + WorkloadImpactResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkloadImpactData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ReportingAConnectivityImpact() + { + // Generated from example definition: 2024-05-01-preview/WorkloadConnectivityImpact_Create.json + // this example is just showing the usage of "WorkloadImpact_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this WorkloadImpactResource + WorkloadImpactCollection collection = subscriptionResource.GetWorkloadImpacts(); + + // invoke the operation + string workloadImpactName = "impact-001"; + WorkloadImpactData data = new WorkloadImpactData + { + Properties = new WorkloadImpactProperties(DateTimeOffset.Parse("2022-06-15T05:59:46.6517821Z"), "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-rg/providers/Microsoft.Sql/sqlserver/dbservercontext", "Resource.Connectivity") + { + ImpactDescription = "conection failure", + Connectivity = new Connectivity + { + Protocol = Protocol.TCP, + Port = 1443, + SourceAzureResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceSub/providers/Microsoft.compute/virtualmachines/vm1", + TargetAzureResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceSub/providers/Microsoft.compute/virtualmachines/vm2", + }, + Workload = new Workload + { + Context = "webapp/scenario1", + Toolset = Toolset.Other, + }, + ClientIncidentDetails = new ClientIncidentDetails + { + ClientIncidentId = "AA123", + ClientIncidentSource = IncidentSource.Jira, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, workloadImpactName, data); + WorkloadImpactResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkloadImpactData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ReportingPerformanceRelatedImpact() + { + // Generated from example definition: 2024-05-01-preview/WorkloadPerformance_Create.json + // this example is just showing the usage of "WorkloadImpact_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this WorkloadImpactResource + WorkloadImpactCollection collection = subscriptionResource.GetWorkloadImpacts(); + + // invoke the operation + string workloadImpactName = "impact-002"; + WorkloadImpactData data = new WorkloadImpactData + { + Properties = new WorkloadImpactProperties(DateTimeOffset.Parse("2022-06-15T05:59:46.6517821Z"), "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-rg/providers/Microsoft.Sql/sqlserver/dbservercontext", "Resource.Performance") + { + ImpactDescription = "high cpu utilization", + Performance = {new Performance +{ +MetricName = "CPU", +Expected = 60, +Actual = 90, +}}, + Workload = new Workload + { + Context = "webapp/scenario1", + Toolset = Toolset.Other, + }, + ClientIncidentDetails = new ClientIncidentDetails + { + ClientIncidentId = "AA123", + ClientIncidentSource = IncidentSource.Jira, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, workloadImpactName, data); + WorkloadImpactResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkloadImpactData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetWorkloadImpactResourceByNameExample() + { + // Generated from example definition: 2024-05-01-preview/WorkloadImpact_Get.json + // this example is just showing the usage of "WorkloadImpact_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this WorkloadImpactResource + WorkloadImpactCollection collection = subscriptionResource.GetWorkloadImpacts(); + + // invoke the operation + string workloadImpactName = "impact-001"; + WorkloadImpactResource result = await collection.GetAsync(workloadImpactName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkloadImpactData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListWorkloadImpactResourcesBySubscription() + { + // Generated from example definition: 2024-05-01-preview/WorkloadImpacts_ListBySubscription.json + // this example is just showing the usage of "WorkloadImpact_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this WorkloadImpactResource + WorkloadImpactCollection collection = subscriptionResource.GetWorkloadImpacts(); + + // invoke the operation and iterate over the result + await foreach (WorkloadImpactResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkloadImpactData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetWorkloadImpactResourceByNameExample() + { + // Generated from example definition: 2024-05-01-preview/WorkloadImpact_Get.json + // this example is just showing the usage of "WorkloadImpact_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this WorkloadImpactResource + WorkloadImpactCollection collection = subscriptionResource.GetWorkloadImpacts(); + + // invoke the operation + string workloadImpactName = "impact-001"; + bool result = await collection.ExistsAsync(workloadImpactName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetWorkloadImpactResourceByNameExample() + { + // Generated from example definition: 2024-05-01-preview/WorkloadImpact_Get.json + // this example is just showing the usage of "WorkloadImpact_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this WorkloadImpactResource + WorkloadImpactCollection collection = subscriptionResource.GetWorkloadImpacts(); + + // invoke the operation + string workloadImpactName = "impact-001"; + NullableResponse response = await collection.GetIfExistsAsync(workloadImpactName); + WorkloadImpactResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkloadImpactData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_WorkloadImpactResource.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_WorkloadImpactResource.cs new file mode 100644 index 000000000000..6bab7d41a76f --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/samples/Generated/Samples/Sample_WorkloadImpactResource.cs @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ImpactReporting.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ImpactReporting.Samples +{ + public partial class Sample_WorkloadImpactResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetWorkloadImpactResourceByNameExample() + { + // Generated from example definition: 2024-05-01-preview/WorkloadImpact_Get.json + // this example is just showing the usage of "WorkloadImpact_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impact-001"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // invoke the operation + WorkloadImpactResource result = await workloadImpact.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkloadImpactData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteWorkloadImpactResourceByNameExample() + { + // Generated from example definition: 2024-05-01-preview/WorkloadImpact_Delete.json + // this example is just showing the usage of "WorkloadImpact_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impact-001"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // invoke the operation + await workloadImpact.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ReportingArmOperationFailure() + { + // Generated from example definition: 2024-05-01-preview/WorkloadArmOperation_create.json + // this example is just showing the usage of "WorkloadImpact_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impact-002"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // invoke the operation + WorkloadImpactData data = new WorkloadImpactData + { + Properties = new WorkloadImpactProperties(DateTimeOffset.Parse("2022-06-15T05:59:46.6517821Z"), "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-rg/providers/Microsoft.Sql/sqlserver/dbservercontext", "ArmOperation") + { + ImpactDescription = "deletion of resource failed", + ArmCorrelationIds = { "00000000-0000-0000-0000-000000000000" }, + Workload = new Workload + { + Context = "webapp/scenario1", + Toolset = Toolset.Other, + }, + ClientIncidentDetails = new ClientIncidentDetails + { + ClientIncidentId = "AA123", + ClientIncidentSource = IncidentSource.Jira, + }, + }, + }; + ArmOperation lro = await workloadImpact.UpdateAsync(WaitUntil.Completed, data); + WorkloadImpactResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkloadImpactData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ReportingAvailabilityRelatedImpact() + { + // Generated from example definition: 2024-05-01-preview/WorkloadAvailability_Create.json + // this example is just showing the usage of "WorkloadImpact_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impact-002"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // invoke the operation + WorkloadImpactData data = new WorkloadImpactData + { + Properties = new WorkloadImpactProperties(DateTimeOffset.Parse("2022-06-15T05:59:46.6517821Z"), "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-rg/providers/Microsoft.Sql/sqlserver/dbservercontext", "Availability") + { + ImpactDescription = "read calls failed", + Workload = new Workload + { + Context = "webapp/scenario1", + Toolset = Toolset.Other, + }, + ClientIncidentDetails = new ClientIncidentDetails + { + ClientIncidentId = "AA123", + ClientIncidentSource = IncidentSource.Jira, + }, + }, + }; + ArmOperation lro = await workloadImpact.UpdateAsync(WaitUntil.Completed, data); + WorkloadImpactResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkloadImpactData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ReportingAConnectivityImpact() + { + // Generated from example definition: 2024-05-01-preview/WorkloadConnectivityImpact_Create.json + // this example is just showing the usage of "WorkloadImpact_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impact-001"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // invoke the operation + WorkloadImpactData data = new WorkloadImpactData + { + Properties = new WorkloadImpactProperties(DateTimeOffset.Parse("2022-06-15T05:59:46.6517821Z"), "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-rg/providers/Microsoft.Sql/sqlserver/dbservercontext", "Resource.Connectivity") + { + ImpactDescription = "conection failure", + Connectivity = new Connectivity + { + Protocol = Protocol.TCP, + Port = 1443, + SourceAzureResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceSub/providers/Microsoft.compute/virtualmachines/vm1", + TargetAzureResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceSub/providers/Microsoft.compute/virtualmachines/vm2", + }, + Workload = new Workload + { + Context = "webapp/scenario1", + Toolset = Toolset.Other, + }, + ClientIncidentDetails = new ClientIncidentDetails + { + ClientIncidentId = "AA123", + ClientIncidentSource = IncidentSource.Jira, + }, + }, + }; + ArmOperation lro = await workloadImpact.UpdateAsync(WaitUntil.Completed, data); + WorkloadImpactResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkloadImpactData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ReportingPerformanceRelatedImpact() + { + // Generated from example definition: 2024-05-01-preview/WorkloadPerformance_Create.json + // this example is just showing the usage of "WorkloadImpact_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkloadImpactResource created on azure + // for more information of creating WorkloadImpactResource, please refer to the document of WorkloadImpactResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string workloadImpactName = "impact-002"; + ResourceIdentifier workloadImpactResourceId = WorkloadImpactResource.CreateResourceIdentifier(subscriptionId, workloadImpactName); + WorkloadImpactResource workloadImpact = client.GetWorkloadImpactResource(workloadImpactResourceId); + + // invoke the operation + WorkloadImpactData data = new WorkloadImpactData + { + Properties = new WorkloadImpactProperties(DateTimeOffset.Parse("2022-06-15T05:59:46.6517821Z"), "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-rg/providers/Microsoft.Sql/sqlserver/dbservercontext", "Resource.Performance") + { + ImpactDescription = "high cpu utilization", + Performance = {new Performance +{ +MetricName = "CPU", +Expected = 60, +Actual = 90, +}}, + Workload = new Workload + { + Context = "webapp/scenario1", + Toolset = Toolset.Other, + }, + ClientIncidentDetails = new ClientIncidentDetails + { + ClientIncidentId = "AA123", + ClientIncidentSource = IncidentSource.Jira, + }, + }, + }; + ArmOperation lro = await workloadImpact.UpdateAsync(WaitUntil.Completed, data); + WorkloadImpactResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkloadImpactData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Azure.ResourceManager.ImpactReporting.csproj b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Azure.ResourceManager.ImpactReporting.csproj new file mode 100644 index 000000000000..5a6d51438445 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Azure.ResourceManager.ImpactReporting.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider ImpactReporting. + 1.0.0-beta.1 + azure;management;arm;resource manager;impactreporting + Azure.ResourceManager.ImpactReporting + + diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ArmImpactReportingModelFactory.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ArmImpactReportingModelFactory.cs new file mode 100644 index 000000000000..b3c9fbc3798b --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ArmImpactReportingModelFactory.cs @@ -0,0 +1,213 @@ +// 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; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// Model factory for models. + public static partial class ArmImpactReportingModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ConnectorData ConnectorData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ConnectorProperties properties = null) + { + return new ConnectorData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Resource provisioning state. + /// unique id of the connector. + /// tenant id of this connector. + /// connector type. + /// last run time stamp of this connector in UTC time zone. + /// A new instance for mocking. + public static ConnectorProperties ConnectorProperties(ProvisioningState? provisioningState = null, string connectorId = null, string tenantId = null, Platform connectorType = default, DateTimeOffset lastRunTimeStamp = default) + { + return new ConnectorProperties( + provisioningState, + connectorId, + tenantId, + connectorType, + lastRunTimeStamp, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static InsightData InsightData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, InsightProperties properties = null) + { + return new InsightData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Resource provisioning state. + /// category of the insight. + /// status of the insight. example resolved, repaired, other. + /// Identifier of the event that has been correlated with this insight. This can be used to aggregate insights for the same event. + /// Identifier that can be used to group similar insights. + /// Contains title & description for the insight. + /// Time of the event, which has been correlated the impact. + /// unique id of the insight. + /// details of of the impact for which insight has been generated. + /// additional details of the insight. + /// A new instance for mocking. + public static InsightProperties InsightProperties(ProvisioningState? provisioningState = null, string category = null, string status = null, string eventId = null, string groupId = null, Content content = null, DateTimeOffset? eventOn = null, string insightUniqueId = null, ImpactDetails impact = null, InsightPropertiesAdditionalDetails additionalDetails = null) + { + return new InsightProperties( + provisioningState, + category, + status, + eventId, + groupId, + content, + eventOn, + insightUniqueId, + impact, + additionalDetails, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ImpactCategoryData ImpactCategoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ImpactCategoryProperties properties = null) + { + return new ImpactCategoryData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Resource provisioning state. + /// Unique ID of the category. + /// Unique ID of the parent category. + /// Description of the category. + /// The workloadImpact properties which are required when reporting with the impact category. + /// A new instance for mocking. + public static ImpactCategoryProperties ImpactCategoryProperties(ProvisioningState? provisioningState = null, string categoryId = null, string parentCategoryId = null, string description = null, IEnumerable requiredImpactProperties = null) + { + requiredImpactProperties ??= new List(); + + return new ImpactCategoryProperties( + provisioningState, + categoryId, + parentCategoryId, + description, + requiredImpactProperties?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Name of the property. + /// Allowed values values for the property. + /// A new instance for mocking. + public static RequiredImpactProperties RequiredImpactProperties(string name = null, IEnumerable allowedValues = null) + { + allowedValues ??= new List(); + + return new RequiredImpactProperties(name, allowedValues?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static WorkloadImpactData WorkloadImpactData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkloadImpactProperties properties = null) + { + return new WorkloadImpactData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Resource provisioning state. + /// Time at which impact was observed. + /// Time at which impact has ended. + /// Azure resource id of the impacted resource. + /// Unique ID of the impact (UUID). + /// Time at which impact is reported. + /// Category of the impact, details can found from /impactCategories API. + /// A detailed description of the impact. + /// The ARM correlation ids, this is important field for control plane related impacts. + /// Details about performance issue. Applicable for performance impacts. + /// Details about connectivity issue. Applicable when root resource causing the issue is not identified. For example, when a VM is impacted due to a network issue, the impacted resource is identified as the VM, but the root cause is the network. In such cases, the connectivity field will have the details about the network issue. + /// Additional fields related to impact, applicable fields per resource type are list under /impactCategories API. + /// ARM error code and error message associated with the impact. + /// Information about the impacted workload. + /// Use this field to group impacts. + /// Degree of confidence on the impact being a platform issue. + /// Client incident details ex: incidentId , incident source. + /// A new instance for mocking. + public static WorkloadImpactProperties WorkloadImpactProperties(ProvisioningState? provisioningState = null, DateTimeOffset startOn = default, DateTimeOffset? endOn = null, string impactedResourceId = null, string impactUniqueId = null, DateTimeOffset? reportedTimeUtc = null, string impactCategory = null, string impactDescription = null, IEnumerable armCorrelationIds = null, IEnumerable performance = null, Connectivity connectivity = null, WorkloadImpactPropertiesAdditionalProperties additionalProperties = null, ErrorDetailProperties errorDetails = null, Workload workload = null, string impactGroupId = null, ConfidenceLevel? confidenceLevel = null, ClientIncidentDetails clientIncidentDetails = null) + { + armCorrelationIds ??= new List(); + performance ??= new List(); + + return new WorkloadImpactProperties( + provisioningState, + startOn, + endOn, + impactedResourceId, + impactUniqueId, + reportedTimeUtc, + impactCategory, + impactDescription, + armCorrelationIds?.ToList(), + performance?.ToList(), + connectivity, + additionalProperties, + errorDetails, + workload, + impactGroupId, + confidenceLevel, + clientIncidentDetails, + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorCollection.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorCollection.cs new file mode 100644 index 000000000000..259c35fa239e --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ImpactReporting +{ + /// + /// 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 GetConnectors method from an instance of . + /// + public partial class ConnectorCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _connectorClientDiagnostics; + private readonly ConnectorsRestOperations _connectorRestClient; + + /// Initializes a new instance of the class for mocking. + protected ConnectorCollection() + { + } + + /// 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 ConnectorCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _connectorClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ImpactReporting", ConnectorResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ConnectorResource.ResourceType, out string connectorApiVersion); + _connectorRestClient = new ConnectorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectorApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SubscriptionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); + } + + /// + /// Create a Connector + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 connector. + /// Resource create parameters. + /// 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 connectorName, ConnectorData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectorClientDiagnostics.CreateScope("ConnectorCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _connectorRestClient.CreateOrUpdateAsync(Id.SubscriptionId, connectorName, data, cancellationToken).ConfigureAwait(false); + var operation = new ImpactReportingArmOperation(new ConnectorOperationSource(Client), _connectorClientDiagnostics, Pipeline, _connectorRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, connectorName, 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 Connector + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 connector. + /// Resource create parameters. + /// 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 connectorName, ConnectorData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectorClientDiagnostics.CreateScope("ConnectorCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _connectorRestClient.CreateOrUpdate(Id.SubscriptionId, connectorName, data, cancellationToken); + var operation = new ImpactReportingArmOperation(new ConnectorOperationSource(Client), _connectorClientDiagnostics, Pipeline, _connectorRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, connectorName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Connector + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the connector. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var scope = _connectorClientDiagnostics.CreateScope("ConnectorCollection.Get"); + scope.Start(); + try + { + var response = await _connectorRestClient.GetAsync(Id.SubscriptionId, connectorName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Connector + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the connector. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var scope = _connectorClientDiagnostics.CreateScope("ConnectorCollection.Get"); + scope.Start(); + try + { + var response = _connectorRestClient.Get(Id.SubscriptionId, connectorName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Connector resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors + /// + /// + /// Operation Id + /// Connector_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _connectorRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectorRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ConnectorResource(Client, ConnectorData.DeserializeConnectorData(e)), _connectorClientDiagnostics, Pipeline, "ConnectorCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Connector resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors + /// + /// + /// Operation Id + /// Connector_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _connectorRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectorRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ConnectorResource(Client, ConnectorData.DeserializeConnectorData(e)), _connectorClientDiagnostics, Pipeline, "ConnectorCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the connector. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var scope = _connectorClientDiagnostics.CreateScope("ConnectorCollection.Exists"); + scope.Start(); + try + { + var response = await _connectorRestClient.GetAsync(Id.SubscriptionId, connectorName, 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}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the connector. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var scope = _connectorClientDiagnostics.CreateScope("ConnectorCollection.Exists"); + scope.Start(); + try + { + var response = _connectorRestClient.Get(Id.SubscriptionId, connectorName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the connector. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var scope = _connectorClientDiagnostics.CreateScope("ConnectorCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _connectorRestClient.GetAsync(Id.SubscriptionId, connectorName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the connector. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var scope = _connectorClientDiagnostics.CreateScope("ConnectorCollection.GetIfExists"); + scope.Start(); + try + { + var response = _connectorRestClient.Get(Id.SubscriptionId, connectorName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ConnectorResource(Client, response.Value), 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/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorData.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorData.Serialization.cs new file mode 100644 index 000000000000..900752318bfa --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ImpactReporting.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ImpactReporting +{ + public partial class ConnectorData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectorData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectorData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectorData(document.RootElement, options); + } + + internal static ConnectorData DeserializeConnectorData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConnectorProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ConnectorProperties.DeserializeConnectorProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectorData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectorData)} does not support writing '{options.Format}' format."); + } + } + + ConnectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeConnectorData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectorData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorData.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorData.cs new file mode 100644 index 000000000000..b2d1ae438890 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorData.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; +using Azure.ResourceManager.ImpactReporting.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ImpactReporting +{ + /// + /// A class representing the Connector data model. + /// A connector is a resource that can be used to proactively report impacts against workloads in Azure to Microsoft. + /// + public partial class ConnectorData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ConnectorData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ConnectorData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ConnectorProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public ConnectorProperties Properties { get; set; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorResource.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorResource.Serialization.cs new file mode 100644 index 000000000000..9234dc158038 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ImpactReporting +{ + public partial class ConnectorResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ConnectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorResource.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorResource.cs new file mode 100644 index 000000000000..45fb32d37f5e --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ConnectorResource.cs @@ -0,0 +1,343 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ImpactReporting.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ImpactReporting +{ + /// + /// A Class representing a Connector 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 GetConnectorResource method. + /// Otherwise you can get one from its parent resource using the GetConnector method. + /// + public partial class ConnectorResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The connectorName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string connectorName) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _connectorClientDiagnostics; + private readonly ConnectorsRestOperations _connectorRestClient; + private readonly ConnectorData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Impact/connectors"; + + /// Initializes a new instance of the class for mocking. + protected ConnectorResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ConnectorResource(ArmClient client, ConnectorData 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 ConnectorResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _connectorClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ImpactReporting", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string connectorApiVersion); + _connectorRestClient = new ConnectorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectorApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 ConnectorData 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 Connector + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _connectorClientDiagnostics.CreateScope("ConnectorResource.Get"); + scope.Start(); + try + { + var response = await _connectorRestClient.GetAsync(Id.SubscriptionId, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Connector + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _connectorClientDiagnostics.CreateScope("ConnectorResource.Get"); + scope.Start(); + try + { + var response = _connectorRestClient.Get(Id.SubscriptionId, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Connector + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Delete + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _connectorClientDiagnostics.CreateScope("ConnectorResource.Delete"); + scope.Start(); + try + { + var response = await _connectorRestClient.DeleteAsync(Id.SubscriptionId, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _connectorRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ImpactReportingArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Connector + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Delete + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _connectorClientDiagnostics.CreateScope("ConnectorResource.Delete"); + scope.Start(); + try + { + var response = _connectorRestClient.Delete(Id.SubscriptionId, Id.Name, cancellationToken); + var uri = _connectorRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ImpactReportingArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Connector + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Update + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ConnectorPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _connectorClientDiagnostics.CreateScope("ConnectorResource.Update"); + scope.Start(); + try + { + var response = await _connectorRestClient.UpdateAsync(Id.SubscriptionId, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Connector + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Update + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ConnectorPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _connectorClientDiagnostics.CreateScope("ConnectorResource.Update"); + scope.Start(); + try + { + var response = _connectorRestClient.Update(Id.SubscriptionId, Id.Name, patch, cancellationToken); + return Response.FromValue(new ConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Extensions/ImpactReportingExtensions.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Extensions/ImpactReportingExtensions.cs new file mode 100644 index 000000000000..63e82bb6e2b0 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Extensions/ImpactReportingExtensions.cs @@ -0,0 +1,385 @@ +// 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.Core; +using Azure.ResourceManager.ImpactReporting.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ImpactReporting +{ + /// A class to add extension methods to Azure.ResourceManager.ImpactReporting. + public static partial class ImpactReportingExtensions + { + private static MockableImpactReportingArmClient GetMockableImpactReportingArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableImpactReportingArmClient(client0)); + } + + private static MockableImpactReportingSubscriptionResource GetMockableImpactReportingSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableImpactReportingSubscriptionResource(client, resource.Id)); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WorkloadImpactResource GetWorkloadImpactResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableImpactReportingArmClient(client).GetWorkloadImpactResource(id); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ImpactCategoryResource GetImpactCategoryResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableImpactReportingArmClient(client).GetImpactCategoryResource(id); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static InsightResource GetInsightResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableImpactReportingArmClient(client).GetInsightResource(id); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ConnectorResource GetConnectorResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableImpactReportingArmClient(client).GetConnectorResource(id); + } + + /// + /// Gets a collection of WorkloadImpactResources in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of WorkloadImpactResources and their operations over a WorkloadImpactResource. + public static WorkloadImpactCollection GetWorkloadImpacts(this SubscriptionResource subscriptionResource) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableImpactReportingSubscriptionResource(subscriptionResource).GetWorkloadImpacts(); + } + + /// + /// Get a WorkloadImpact + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// workloadImpact resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetWorkloadImpactAsync(this SubscriptionResource subscriptionResource, string workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableImpactReportingSubscriptionResource(subscriptionResource).GetWorkloadImpactAsync(workloadImpactName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a WorkloadImpact + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// workloadImpact resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetWorkloadImpact(this SubscriptionResource subscriptionResource, string workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableImpactReportingSubscriptionResource(subscriptionResource).GetWorkloadImpact(workloadImpactName, cancellationToken); + } + + /// + /// Gets a collection of ImpactCategoryResources in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of ImpactCategoryResources and their operations over a ImpactCategoryResource. + public static ImpactCategoryCollection GetImpactCategories(this SubscriptionResource subscriptionResource) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableImpactReportingSubscriptionResource(subscriptionResource).GetImpactCategories(); + } + + /// + /// Get a ImpactCategory + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/impactCategories/{impactCategoryName} + /// + /// + /// Operation Id + /// ImpactCategory_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the impact category. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetImpactCategoryAsync(this SubscriptionResource subscriptionResource, string impactCategoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableImpactReportingSubscriptionResource(subscriptionResource).GetImpactCategoryAsync(impactCategoryName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ImpactCategory + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/impactCategories/{impactCategoryName} + /// + /// + /// Operation Id + /// ImpactCategory_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the impact category. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetImpactCategory(this SubscriptionResource subscriptionResource, string impactCategoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableImpactReportingSubscriptionResource(subscriptionResource).GetImpactCategory(impactCategoryName, cancellationToken); + } + + /// + /// Gets a collection of ConnectorResources in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of ConnectorResources and their operations over a ConnectorResource. + public static ConnectorCollection GetConnectors(this SubscriptionResource subscriptionResource) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableImpactReportingSubscriptionResource(subscriptionResource).GetConnectors(); + } + + /// + /// Get a Connector + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the connector. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetConnectorAsync(this SubscriptionResource subscriptionResource, string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableImpactReportingSubscriptionResource(subscriptionResource).GetConnectorAsync(connectorName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Connector + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the connector. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetConnector(this SubscriptionResource subscriptionResource, string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableImpactReportingSubscriptionResource(subscriptionResource).GetConnector(connectorName, cancellationToken); + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Extensions/MockableImpactReportingArmClient.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Extensions/MockableImpactReportingArmClient.cs new file mode 100644 index 000000000000..eb3eaa76ba96 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Extensions/MockableImpactReportingArmClient.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableImpactReportingArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableImpactReportingArmClient() + { + } + + /// 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 MockableImpactReportingArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableImpactReportingArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual WorkloadImpactResource GetWorkloadImpactResource(ResourceIdentifier id) + { + WorkloadImpactResource.ValidateResourceId(id); + return new WorkloadImpactResource(Client, id); + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual ImpactCategoryResource GetImpactCategoryResource(ResourceIdentifier id) + { + ImpactCategoryResource.ValidateResourceId(id); + return new ImpactCategoryResource(Client, id); + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual InsightResource GetInsightResource(ResourceIdentifier id) + { + InsightResource.ValidateResourceId(id); + return new InsightResource(Client, id); + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual ConnectorResource GetConnectorResource(ResourceIdentifier id) + { + ConnectorResource.ValidateResourceId(id); + return new ConnectorResource(Client, id); + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Extensions/MockableImpactReportingSubscriptionResource.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Extensions/MockableImpactReportingSubscriptionResource.cs new file mode 100644 index 000000000000..65d4b48c48b0 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Extensions/MockableImpactReportingSubscriptionResource.cs @@ -0,0 +1,243 @@ +// 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.Core; + +namespace Azure.ResourceManager.ImpactReporting.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableImpactReportingSubscriptionResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableImpactReportingSubscriptionResource() + { + } + + /// 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 MockableImpactReportingSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of WorkloadImpactResources in the SubscriptionResource. + /// An object representing collection of WorkloadImpactResources and their operations over a WorkloadImpactResource. + public virtual WorkloadImpactCollection GetWorkloadImpacts() + { + return GetCachedClient(client => new WorkloadImpactCollection(client, Id)); + } + + /// + /// Get a WorkloadImpact + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// workloadImpact resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkloadImpactAsync(string workloadImpactName, CancellationToken cancellationToken = default) + { + return await GetWorkloadImpacts().GetAsync(workloadImpactName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a WorkloadImpact + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// workloadImpact resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkloadImpact(string workloadImpactName, CancellationToken cancellationToken = default) + { + return GetWorkloadImpacts().Get(workloadImpactName, cancellationToken); + } + + /// Gets a collection of ImpactCategoryResources in the SubscriptionResource. + /// An object representing collection of ImpactCategoryResources and their operations over a ImpactCategoryResource. + public virtual ImpactCategoryCollection GetImpactCategories() + { + return GetCachedClient(client => new ImpactCategoryCollection(client, Id)); + } + + /// + /// Get a ImpactCategory + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/impactCategories/{impactCategoryName} + /// + /// + /// Operation Id + /// ImpactCategory_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the impact category. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetImpactCategoryAsync(string impactCategoryName, CancellationToken cancellationToken = default) + { + return await GetImpactCategories().GetAsync(impactCategoryName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ImpactCategory + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/impactCategories/{impactCategoryName} + /// + /// + /// Operation Id + /// ImpactCategory_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the impact category. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetImpactCategory(string impactCategoryName, CancellationToken cancellationToken = default) + { + return GetImpactCategories().Get(impactCategoryName, cancellationToken); + } + + /// Gets a collection of ConnectorResources in the SubscriptionResource. + /// An object representing collection of ConnectorResources and their operations over a ConnectorResource. + public virtual ConnectorCollection GetConnectors() + { + return GetCachedClient(client => new ConnectorCollection(client, Id)); + } + + /// + /// Get a Connector + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the connector. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetConnectorAsync(string connectorName, CancellationToken cancellationToken = default) + { + return await GetConnectors().GetAsync(connectorName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Connector + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the connector. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetConnector(string connectorName, CancellationToken cancellationToken = default) + { + return GetConnectors().Get(connectorName, cancellationToken); + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryCollection.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryCollection.cs new file mode 100644 index 000000000000..a3ea25e4ff0f --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryCollection.cs @@ -0,0 +1,389 @@ +// 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 Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ImpactReporting +{ + /// + /// 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 GetImpactCategories method from an instance of . + /// + public partial class ImpactCategoryCollection : ArmCollection + { + private readonly ClientDiagnostics _impactCategoryClientDiagnostics; + private readonly ImpactCategoriesRestOperations _impactCategoryRestClient; + + /// Initializes a new instance of the class for mocking. + protected ImpactCategoryCollection() + { + } + + /// 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 ImpactCategoryCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _impactCategoryClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ImpactReporting", ImpactCategoryResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ImpactCategoryResource.ResourceType, out string impactCategoryApiVersion); + _impactCategoryRestClient = new ImpactCategoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, impactCategoryApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SubscriptionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); + } + + /// + /// Get a ImpactCategory + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/impactCategories/{impactCategoryName} + /// + /// + /// Operation Id + /// ImpactCategory_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the impact category. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string impactCategoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(impactCategoryName, nameof(impactCategoryName)); + + using var scope = _impactCategoryClientDiagnostics.CreateScope("ImpactCategoryCollection.Get"); + scope.Start(); + try + { + var response = await _impactCategoryRestClient.GetAsync(Id.SubscriptionId, impactCategoryName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ImpactCategoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ImpactCategory + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/impactCategories/{impactCategoryName} + /// + /// + /// Operation Id + /// ImpactCategory_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the impact category. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string impactCategoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(impactCategoryName, nameof(impactCategoryName)); + + using var scope = _impactCategoryClientDiagnostics.CreateScope("ImpactCategoryCollection.Get"); + scope.Start(); + try + { + var response = _impactCategoryRestClient.Get(Id.SubscriptionId, impactCategoryName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ImpactCategoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List ImpactCategory resources by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/impactCategories + /// + /// + /// Operation Id + /// ImpactCategory_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Filter by resource type. + /// Filter by category name. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string resourceType, string categoryName = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceType, nameof(resourceType)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _impactCategoryRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, resourceType, categoryName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _impactCategoryRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, resourceType, categoryName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ImpactCategoryResource(Client, ImpactCategoryData.DeserializeImpactCategoryData(e)), _impactCategoryClientDiagnostics, Pipeline, "ImpactCategoryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List ImpactCategory resources by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/impactCategories + /// + /// + /// Operation Id + /// ImpactCategory_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Filter by resource type. + /// Filter by category name. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string resourceType, string categoryName = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceType, nameof(resourceType)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _impactCategoryRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, resourceType, categoryName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _impactCategoryRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, resourceType, categoryName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ImpactCategoryResource(Client, ImpactCategoryData.DeserializeImpactCategoryData(e)), _impactCategoryClientDiagnostics, Pipeline, "ImpactCategoryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/impactCategories/{impactCategoryName} + /// + /// + /// Operation Id + /// ImpactCategory_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the impact category. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string impactCategoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(impactCategoryName, nameof(impactCategoryName)); + + using var scope = _impactCategoryClientDiagnostics.CreateScope("ImpactCategoryCollection.Exists"); + scope.Start(); + try + { + var response = await _impactCategoryRestClient.GetAsync(Id.SubscriptionId, impactCategoryName, 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}/providers/Microsoft.Impact/impactCategories/{impactCategoryName} + /// + /// + /// Operation Id + /// ImpactCategory_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the impact category. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string impactCategoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(impactCategoryName, nameof(impactCategoryName)); + + using var scope = _impactCategoryClientDiagnostics.CreateScope("ImpactCategoryCollection.Exists"); + scope.Start(); + try + { + var response = _impactCategoryRestClient.Get(Id.SubscriptionId, impactCategoryName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/impactCategories/{impactCategoryName} + /// + /// + /// Operation Id + /// ImpactCategory_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the impact category. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string impactCategoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(impactCategoryName, nameof(impactCategoryName)); + + using var scope = _impactCategoryClientDiagnostics.CreateScope("ImpactCategoryCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _impactCategoryRestClient.GetAsync(Id.SubscriptionId, impactCategoryName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ImpactCategoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/impactCategories/{impactCategoryName} + /// + /// + /// Operation Id + /// ImpactCategory_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the impact category. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string impactCategoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(impactCategoryName, nameof(impactCategoryName)); + + using var scope = _impactCategoryClientDiagnostics.CreateScope("ImpactCategoryCollection.GetIfExists"); + scope.Start(); + try + { + var response = _impactCategoryRestClient.Get(Id.SubscriptionId, impactCategoryName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ImpactCategoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryData.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryData.Serialization.cs new file mode 100644 index 000000000000..1877d9d1bce1 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ImpactReporting.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ImpactReporting +{ + public partial class ImpactCategoryData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImpactCategoryData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ImpactCategoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImpactCategoryData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImpactCategoryData(document.RootElement, options); + } + + internal static ImpactCategoryData DeserializeImpactCategoryData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ImpactCategoryProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ImpactCategoryProperties.DeserializeImpactCategoryProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImpactCategoryData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ImpactCategoryData)} does not support writing '{options.Format}' format."); + } + } + + ImpactCategoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeImpactCategoryData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImpactCategoryData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryData.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryData.cs new file mode 100644 index 000000000000..6605b9661ceb --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryData.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; +using Azure.ResourceManager.ImpactReporting.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ImpactReporting +{ + /// + /// A class representing the ImpactCategory data model. + /// ImpactCategory resource + /// + public partial class ImpactCategoryData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ImpactCategoryData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ImpactCategoryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ImpactCategoryProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public ImpactCategoryProperties Properties { get; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryResource.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryResource.Serialization.cs new file mode 100644 index 000000000000..225490832a38 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ImpactReporting +{ + public partial class ImpactCategoryResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ImpactCategoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ImpactCategoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryResource.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryResource.cs new file mode 100644 index 000000000000..4d1590547b24 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ImpactCategoryResource.cs @@ -0,0 +1,170 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ImpactReporting +{ + /// + /// A Class representing an ImpactCategory 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 GetImpactCategoryResource method. + /// Otherwise you can get one from its parent resource using the GetImpactCategory method. + /// + public partial class ImpactCategoryResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The impactCategoryName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string impactCategoryName) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Microsoft.Impact/impactCategories/{impactCategoryName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _impactCategoryClientDiagnostics; + private readonly ImpactCategoriesRestOperations _impactCategoryRestClient; + private readonly ImpactCategoryData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Impact/impactCategories"; + + /// Initializes a new instance of the class for mocking. + protected ImpactCategoryResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ImpactCategoryResource(ArmClient client, ImpactCategoryData 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 ImpactCategoryResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _impactCategoryClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ImpactReporting", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string impactCategoryApiVersion); + _impactCategoryRestClient = new ImpactCategoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, impactCategoryApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 ImpactCategoryData 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 ImpactCategory + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/impactCategories/{impactCategoryName} + /// + /// + /// Operation Id + /// ImpactCategory_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _impactCategoryClientDiagnostics.CreateScope("ImpactCategoryResource.Get"); + scope.Start(); + try + { + var response = await _impactCategoryRestClient.GetAsync(Id.SubscriptionId, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ImpactCategoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ImpactCategory + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/impactCategories/{impactCategoryName} + /// + /// + /// Operation Id + /// ImpactCategory_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _impactCategoryClientDiagnostics.CreateScope("ImpactCategoryResource.Get"); + scope.Start(); + try + { + var response = _impactCategoryRestClient.Get(Id.SubscriptionId, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ImpactCategoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightCollection.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightCollection.cs new file mode 100644 index 000000000000..5f628d8a4a83 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ImpactReporting +{ + /// + /// 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 GetInsights method from an instance of . + /// + public partial class InsightCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _insightClientDiagnostics; + private readonly InsightsRestOperations _insightRestClient; + + /// Initializes a new instance of the class for mocking. + protected InsightCollection() + { + } + + /// 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 InsightCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _insightClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ImpactReporting", InsightResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(InsightResource.ResourceType, out string insightApiVersion); + _insightRestClient = new InsightsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, insightApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WorkloadImpactResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkloadImpactResource.ResourceType), nameof(id)); + } + + /// + /// Create Insight resource, This is Admin only operation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Create + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Name of the insight. + /// Resource create parameters. + /// 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 insightName, InsightData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(insightName, nameof(insightName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _insightClientDiagnostics.CreateScope("InsightCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _insightRestClient.CreateAsync(Id.SubscriptionId, Id.Name, insightName, data, cancellationToken).ConfigureAwait(false); + var uri = _insightRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.Name, insightName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ImpactReportingArmOperation(Response.FromValue(new InsightResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create Insight resource, This is Admin only operation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Create + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Name of the insight. + /// Resource create parameters. + /// 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 insightName, InsightData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(insightName, nameof(insightName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _insightClientDiagnostics.CreateScope("InsightCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _insightRestClient.Create(Id.SubscriptionId, Id.Name, insightName, data, cancellationToken); + var uri = _insightRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.Name, insightName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ImpactReportingArmOperation(Response.FromValue(new InsightResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Insight resources by workloadImpactName and insightName + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the insight. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string insightName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(insightName, nameof(insightName)); + + using var scope = _insightClientDiagnostics.CreateScope("InsightCollection.Get"); + scope.Start(); + try + { + var response = await _insightRestClient.GetAsync(Id.SubscriptionId, Id.Name, insightName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InsightResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Insight resources by workloadImpactName and insightName + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the insight. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string insightName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(insightName, nameof(insightName)); + + using var scope = _insightClientDiagnostics.CreateScope("InsightCollection.Get"); + scope.Start(); + try + { + var response = _insightRestClient.Get(Id.SubscriptionId, Id.Name, insightName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InsightResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Insight resources by workloadImpactName + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights + /// + /// + /// Operation Id + /// Insight_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _insightRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _insightRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new InsightResource(Client, InsightData.DeserializeInsightData(e)), _insightClientDiagnostics, Pipeline, "InsightCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Insight resources by workloadImpactName + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights + /// + /// + /// Operation Id + /// Insight_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _insightRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _insightRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new InsightResource(Client, InsightData.DeserializeInsightData(e)), _insightClientDiagnostics, Pipeline, "InsightCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the insight. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string insightName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(insightName, nameof(insightName)); + + using var scope = _insightClientDiagnostics.CreateScope("InsightCollection.Exists"); + scope.Start(); + try + { + var response = await _insightRestClient.GetAsync(Id.SubscriptionId, Id.Name, insightName, 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}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the insight. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string insightName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(insightName, nameof(insightName)); + + using var scope = _insightClientDiagnostics.CreateScope("InsightCollection.Exists"); + scope.Start(); + try + { + var response = _insightRestClient.Get(Id.SubscriptionId, Id.Name, insightName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the insight. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string insightName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(insightName, nameof(insightName)); + + using var scope = _insightClientDiagnostics.CreateScope("InsightCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _insightRestClient.GetAsync(Id.SubscriptionId, Id.Name, insightName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new InsightResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the insight. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string insightName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(insightName, nameof(insightName)); + + using var scope = _insightClientDiagnostics.CreateScope("InsightCollection.GetIfExists"); + scope.Start(); + try + { + var response = _insightRestClient.Get(Id.SubscriptionId, Id.Name, insightName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new InsightResource(Client, response.Value), 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/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightData.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightData.Serialization.cs new file mode 100644 index 000000000000..c217f92548d3 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ImpactReporting.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ImpactReporting +{ + public partial class InsightData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InsightData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + InsightData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InsightData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInsightData(document.RootElement, options); + } + + internal static InsightData DeserializeInsightData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InsightProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = InsightProperties.DeserializeInsightProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InsightData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InsightData)} does not support writing '{options.Format}' format."); + } + } + + InsightData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeInsightData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InsightData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightData.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightData.cs new file mode 100644 index 000000000000..c5bb97ad25a8 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightData.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; +using Azure.ResourceManager.ImpactReporting.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ImpactReporting +{ + /// + /// A class representing the Insight data model. + /// Insight resource + /// + public partial class InsightData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public InsightData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal InsightData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, InsightProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public InsightProperties Properties { get; set; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightResource.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightResource.Serialization.cs new file mode 100644 index 000000000000..c5a59366e0f5 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ImpactReporting +{ + public partial class InsightResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + InsightData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + InsightData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightResource.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightResource.cs new file mode 100644 index 000000000000..c1945374eac6 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/InsightResource.cs @@ -0,0 +1,354 @@ +// 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.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ImpactReporting +{ + /// + /// A Class representing an Insight 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 GetInsightResource method. + /// Otherwise you can get one from its parent resource using the GetInsight method. + /// + public partial class InsightResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The workloadImpactName. + /// The insightName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string workloadImpactName, string insightName) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _insightClientDiagnostics; + private readonly InsightsRestOperations _insightRestClient; + private readonly InsightData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Impact/workloadImpacts/insights"; + + /// Initializes a new instance of the class for mocking. + protected InsightResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal InsightResource(ArmClient client, InsightData 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 InsightResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _insightClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ImpactReporting", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string insightApiVersion); + _insightRestClient = new InsightsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, insightApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 InsightData 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 Insight resources by workloadImpactName and insightName + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _insightClientDiagnostics.CreateScope("InsightResource.Get"); + scope.Start(); + try + { + var response = await _insightRestClient.GetAsync(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InsightResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Insight resources by workloadImpactName and insightName + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _insightClientDiagnostics.CreateScope("InsightResource.Get"); + scope.Start(); + try + { + var response = _insightRestClient.Get(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InsightResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Insight resource, This is Admin only operation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Delete + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _insightClientDiagnostics.CreateScope("InsightResource.Delete"); + scope.Start(); + try + { + var response = await _insightRestClient.DeleteAsync(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _insightRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ImpactReportingArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Insight resource, This is Admin only operation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Delete + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _insightClientDiagnostics.CreateScope("InsightResource.Delete"); + scope.Start(); + try + { + var response = _insightRestClient.Delete(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _insightRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ImpactReportingArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create Insight resource, This is Admin only operation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Create + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, InsightData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _insightClientDiagnostics.CreateScope("InsightResource.Update"); + scope.Start(); + try + { + var response = await _insightRestClient.CreateAsync(Id.SubscriptionId, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _insightRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ImpactReportingArmOperation(Response.FromValue(new InsightResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create Insight resource, This is Admin only operation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Create + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, InsightData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _insightClientDiagnostics.CreateScope("InsightResource.Update"); + scope.Start(); + try + { + var response = _insightRestClient.Create(Id.SubscriptionId, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _insightRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ImpactReportingArmOperation(Response.FromValue(new InsightResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/Argument.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..8bcc5c0fc004 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ImpactReporting +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..beda10e4a2a1 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ImpactReporting +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/ChangeTrackingList.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..a9c54ec968fb --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// 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.Linq; + +namespace Azure.ResourceManager.ImpactReporting +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..3c187775bf14 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/Optional.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..d987d8b2a49d --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/Optional.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; + +namespace Azure.ResourceManager.ImpactReporting +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..2838ccf740d2 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/ConnectorOperationSource.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/ConnectorOperationSource.cs new file mode 100644 index 000000000000..c3f300b2e544 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/ConnectorOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting +{ + internal class ConnectorOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ConnectorOperationSource(ArmClient client) + { + _client = client; + } + + ConnectorResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new ConnectorResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new ConnectorResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/ImpactReportingArmOperation.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/ImpactReportingArmOperation.cs new file mode 100644 index 000000000000..a7933fad4913 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/ImpactReportingArmOperation.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ImpactReporting +{ +#pragma warning disable SA1649 // File name should match first type name + internal class ImpactReportingArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of ImpactReportingArmOperation for mocking. + protected ImpactReportingArmOperation() + { + } + + internal ImpactReportingArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal ImpactReportingArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "ImpactReportingArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + 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/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/ImpactReportingArmOperationOfT.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/ImpactReportingArmOperationOfT.cs new file mode 100644 index 000000000000..d8cff351e27f --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/ImpactReportingArmOperationOfT.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ImpactReporting +{ +#pragma warning disable SA1649 // File name should match first type name + internal class ImpactReportingArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of ImpactReportingArmOperation for mocking. + protected ImpactReportingArmOperation() + { + } + + internal ImpactReportingArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal ImpactReportingArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "ImpactReportingArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + 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/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/WorkloadImpactOperationSource.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/WorkloadImpactOperationSource.cs new file mode 100644 index 000000000000..1f45a13f9012 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/LongRunningOperation/WorkloadImpactOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting +{ + internal class WorkloadImpactOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal WorkloadImpactOperationSource(ArmClient client) + { + _client = client; + } + + WorkloadImpactResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new WorkloadImpactResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new WorkloadImpactResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ClientIncidentDetails.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ClientIncidentDetails.Serialization.cs new file mode 100644 index 000000000000..fa0e2e9aec75 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ClientIncidentDetails.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class ClientIncidentDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClientIncidentDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ClientIncidentId)) + { + writer.WritePropertyName("clientIncidentId"u8); + writer.WriteStringValue(ClientIncidentId); + } + if (Optional.IsDefined(ClientIncidentSource)) + { + writer.WritePropertyName("clientIncidentSource"u8); + writer.WriteStringValue(ClientIncidentSource.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ClientIncidentDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClientIncidentDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeClientIncidentDetails(document.RootElement, options); + } + + internal static ClientIncidentDetails DeserializeClientIncidentDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clientIncidentId = default; + IncidentSource? clientIncidentSource = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clientIncidentId"u8)) + { + clientIncidentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientIncidentSource"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientIncidentSource = new IncidentSource(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ClientIncidentDetails(clientIncidentId, clientIncidentSource, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ClientIncidentDetails)} does not support writing '{options.Format}' format."); + } + } + + ClientIncidentDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeClientIncidentDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ClientIncidentDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ClientIncidentDetails.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ClientIncidentDetails.cs new file mode 100644 index 000000000000..b205106b1f81 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ClientIncidentDetails.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; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// Client incident details ex: incidentId , incident source. + public partial class ClientIncidentDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ClientIncidentDetails() + { + } + + /// Initializes a new instance of . + /// Client incident id. ex : id of the incident created to investigate and address the impact if any. + /// Client incident source. ex : source system name where the incident is created. + /// Keeps track of any properties unknown to the library. + internal ClientIncidentDetails(string clientIncidentId, IncidentSource? clientIncidentSource, IDictionary serializedAdditionalRawData) + { + ClientIncidentId = clientIncidentId; + ClientIncidentSource = clientIncidentSource; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Client incident id. ex : id of the incident created to investigate and address the impact if any. + public string ClientIncidentId { get; set; } + /// Client incident source. ex : source system name where the incident is created. + public IncidentSource? ClientIncidentSource { get; set; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConfidenceLevel.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConfidenceLevel.cs new file mode 100644 index 000000000000..fc05addd46a7 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConfidenceLevel.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.ImpactReporting.Models +{ + /// Degree of confidence on the impact being a platform issue. + public readonly partial struct ConfidenceLevel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConfidenceLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LowValue = "Low"; + private const string MediumValue = "Medium"; + private const string HighValue = "High"; + + /// Low confidence on azure being the source of impact. + public static ConfidenceLevel Low { get; } = new ConfidenceLevel(LowValue); + /// Medium confidence on azure being the source of impact. + public static ConfidenceLevel Medium { get; } = new ConfidenceLevel(MediumValue); + /// High confidence on azure being the source of impact. + public static ConfidenceLevel High { get; } = new ConfidenceLevel(HighValue); + /// Determines if two values are the same. + public static bool operator ==(ConfidenceLevel left, ConfidenceLevel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConfidenceLevel left, ConfidenceLevel right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ConfidenceLevel(string value) => new ConfidenceLevel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConfidenceLevel other && Equals(other); + /// + public bool Equals(ConfidenceLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Connectivity.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Connectivity.Serialization.cs new file mode 100644 index 000000000000..c3cae14e8d4e --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Connectivity.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class Connectivity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Connectivity)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Protocol)) + { + writer.WritePropertyName("protocol"u8); + writer.WriteStringValue(Protocol.Value.ToString()); + } + if (Optional.IsDefined(Port)) + { + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port.Value); + } + if (Optional.IsDefined(Source)) + { + writer.WritePropertyName("source"u8); + writer.WriteObjectValue(Source, options); + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteObjectValue(Target, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + Connectivity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Connectivity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectivity(document.RootElement, options); + } + + internal static Connectivity DeserializeConnectivity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Protocol? protocol = default; + int? port = default; + SourceOrTarget source = default; + SourceOrTarget target = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("protocol"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protocol = new Protocol(property.Value.GetString()); + continue; + } + if (property.NameEquals("port"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("source"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + source = SourceOrTarget.DeserializeSourceOrTarget(property.Value, options); + continue; + } + if (property.NameEquals("target"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + target = SourceOrTarget.DeserializeSourceOrTarget(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Connectivity(protocol, port, source, target, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(Connectivity)} does not support writing '{options.Format}' format."); + } + } + + Connectivity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeConnectivity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Connectivity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Connectivity.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Connectivity.cs new file mode 100644 index 000000000000..84038e4d0ca0 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Connectivity.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; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// Details about connectivity issue. Applicable when root resource causing the issue is not identified. For example, when a VM is impacted due to a network issue, the impacted resource could be VM or the network. In such cases, the connectivity field will have the details about both VM and network. + public partial class Connectivity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public Connectivity() + { + } + + /// Initializes a new instance of . + /// Protocol used for the connection. + /// Port number for the connection. + /// Source from which the connection was attempted. + /// target which connection was attempted. + /// Keeps track of any properties unknown to the library. + internal Connectivity(Protocol? protocol, int? port, SourceOrTarget source, SourceOrTarget target, IDictionary serializedAdditionalRawData) + { + Protocol = protocol; + Port = port; + Source = source; + Target = target; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Protocol used for the connection. + public Protocol? Protocol { get; set; } + /// Port number for the connection. + public int? Port { get; set; } + /// Source from which the connection was attempted. + internal SourceOrTarget Source { get; set; } + /// Azure resource id, example /subscription/{subscription}/resourceGroup/{rg}/Microsoft.compute/virtualMachine/{vmName}. + public string SourceAzureResourceId + { + get => Source is null ? default : Source.AzureResourceId; + set + { + if (Source is null) + Source = new SourceOrTarget(); + Source.AzureResourceId = value; + } + } + + /// target which connection was attempted. + internal SourceOrTarget Target { get; set; } + /// Azure resource id, example /subscription/{subscription}/resourceGroup/{rg}/Microsoft.compute/virtualMachine/{vmName}. + public string TargetAzureResourceId + { + get => Target is null ? default : Target.AzureResourceId; + set + { + if (Target is null) + Target = new SourceOrTarget(); + Target.AzureResourceId = value; + } + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorListResult.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorListResult.Serialization.cs new file mode 100644 index 000000000000..e344a110788b --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + internal partial class ConnectorListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectorListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectorListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectorListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectorListResult(document.RootElement, options); + } + + internal static ConnectorListResult DeserializeConnectorListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConnectorData.DeserializeConnectorData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectorListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectorListResult)} does not support writing '{options.Format}' format."); + } + } + + ConnectorListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeConnectorListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectorListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorListResult.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorListResult.cs new file mode 100644 index 000000000000..917b75ae474a --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// The response of a Connector list operation. + internal partial class ConnectorListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Connector items on this page. + /// is null. + internal ConnectorListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Connector items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ConnectorListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConnectorListResult() + { + } + + /// The Connector items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorPatch.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorPatch.Serialization.cs new file mode 100644 index 000000000000..01edf123e42a --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorPatch.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class ConnectorPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectorPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectorPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectorPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectorPatch(document.RootElement, options); + } + + internal static ConnectorPatch DeserializeConnectorPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConnectorUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ConnectorUpdateProperties.DeserializeConnectorUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectorPatch(properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectorPatch)} does not support writing '{options.Format}' format."); + } + } + + ConnectorPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeConnectorPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectorPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorPatch.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorPatch.cs new file mode 100644 index 000000000000..2a13e3d48424 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorPatch.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// The type used for update operations of the Connector. + public partial class ConnectorPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ConnectorPatch() + { + } + + /// Initializes a new instance of . + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ConnectorPatch(ConnectorUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + internal ConnectorUpdateProperties Properties { get; set; } + /// connector type. + public Platform? ConnectorType + { + get => Properties is null ? default : Properties.ConnectorType; + set + { + if (Properties is null) + Properties = new ConnectorUpdateProperties(); + Properties.ConnectorType = value; + } + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorProperties.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorProperties.Serialization.cs new file mode 100644 index 000000000000..1737f12407b7 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorProperties.Serialization.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class ConnectorProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectorProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W") + { + writer.WritePropertyName("connectorId"u8); + writer.WriteStringValue(ConnectorId); + } + if (options.Format != "W") + { + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId); + } + writer.WritePropertyName("connectorType"u8); + writer.WriteStringValue(ConnectorType.ToString()); + if (options.Format != "W") + { + writer.WritePropertyName("lastRunTimeStamp"u8); + writer.WriteStringValue(LastRunTimeStamp, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectorProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectorProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectorProperties(document.RootElement, options); + } + + internal static ConnectorProperties DeserializeConnectorProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProvisioningState? provisioningState = default; + string connectorId = default; + string tenantId = default; + Platform connectorType = default; + DateTimeOffset lastRunTimeStamp = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("connectorId"u8)) + { + connectorId = property.Value.GetString(); + continue; + } + if (property.NameEquals("tenantId"u8)) + { + tenantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectorType"u8)) + { + connectorType = new Platform(property.Value.GetString()); + continue; + } + if (property.NameEquals("lastRunTimeStamp"u8)) + { + lastRunTimeStamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectorProperties( + provisioningState, + connectorId, + tenantId, + connectorType, + lastRunTimeStamp, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectorProperties)} does not support writing '{options.Format}' format."); + } + } + + ConnectorProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeConnectorProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectorProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorProperties.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorProperties.cs new file mode 100644 index 000000000000..669e13c50b6a --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorProperties.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// Details of the Connector. + public partial class ConnectorProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// unique id of the connector. + /// tenant id of this connector. + /// connector type. + /// last run time stamp of this connector in UTC time zone. + public ConnectorProperties(string connectorId, string tenantId, Platform connectorType, DateTimeOffset lastRunTimeStamp) + { + ConnectorId = connectorId; + TenantId = tenantId; + ConnectorType = connectorType; + LastRunTimeStamp = lastRunTimeStamp; + } + + /// Initializes a new instance of . + /// Resource provisioning state. + /// unique id of the connector. + /// tenant id of this connector. + /// connector type. + /// last run time stamp of this connector in UTC time zone. + /// Keeps track of any properties unknown to the library. + internal ConnectorProperties(ProvisioningState? provisioningState, string connectorId, string tenantId, Platform connectorType, DateTimeOffset lastRunTimeStamp, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + ConnectorId = connectorId; + TenantId = tenantId; + ConnectorType = connectorType; + LastRunTimeStamp = lastRunTimeStamp; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConnectorProperties() + { + } + + /// Resource provisioning state. + public ProvisioningState? ProvisioningState { get; } + /// unique id of the connector. + public string ConnectorId { get; } + /// tenant id of this connector. + public string TenantId { get; } + /// connector type. + public Platform ConnectorType { get; set; } + /// last run time stamp of this connector in UTC time zone. + public DateTimeOffset LastRunTimeStamp { get; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorUpdateProperties.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..2d50fbfb4791 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorUpdateProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + internal partial class ConnectorUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectorUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ConnectorType)) + { + writer.WritePropertyName("connectorType"u8); + writer.WriteStringValue(ConnectorType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectorUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectorUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectorUpdateProperties(document.RootElement, options); + } + + internal static ConnectorUpdateProperties DeserializeConnectorUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Platform? connectorType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("connectorType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectorType = new Platform(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectorUpdateProperties(connectorType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectorUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + ConnectorUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeConnectorUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectorUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorUpdateProperties.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorUpdateProperties.cs new file mode 100644 index 000000000000..3521d7cb9e48 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ConnectorUpdateProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// The updatable properties of the Connector. + internal partial class ConnectorUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ConnectorUpdateProperties() + { + } + + /// Initializes a new instance of . + /// connector type. + /// Keeps track of any properties unknown to the library. + internal ConnectorUpdateProperties(Platform? connectorType, IDictionary serializedAdditionalRawData) + { + ConnectorType = connectorType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// connector type. + public Platform? ConnectorType { get; set; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Content.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Content.Serialization.cs new file mode 100644 index 000000000000..a036f56fd40b --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Content.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class Content : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Content)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + Content IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Content)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContent(document.RootElement, options); + } + + internal static Content DeserializeContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string title = default; + string description = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("title"u8)) + { + title = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Content(title, description, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(Content)} does not support writing '{options.Format}' format."); + } + } + + Content IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Content)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Content.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Content.cs new file mode 100644 index 000000000000..e04c8545c8f8 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Content.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// Article details of the insight like title, description etc. + public partial class Content + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Title of the insight. + /// Description of the insight. + /// or is null. + public Content(string title, string description) + { + Argument.AssertNotNull(title, nameof(title)); + Argument.AssertNotNull(description, nameof(description)); + + Title = title; + Description = description; + } + + /// Initializes a new instance of . + /// Title of the insight. + /// Description of the insight. + /// Keeps track of any properties unknown to the library. + internal Content(string title, string description, IDictionary serializedAdditionalRawData) + { + Title = title; + Description = description; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal Content() + { + } + + /// Title of the insight. + public string Title { get; set; } + /// Description of the insight. + public string Description { get; set; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ErrorDetailProperties.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ErrorDetailProperties.Serialization.cs new file mode 100644 index 000000000000..a4eebaa4a7da --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ErrorDetailProperties.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class ErrorDetailProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ErrorDetailProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ErrorCode)) + { + writer.WritePropertyName("errorCode"u8); + writer.WriteStringValue(ErrorCode); + } + if (Optional.IsDefined(ErrorMessage)) + { + writer.WritePropertyName("errorMessage"u8); + writer.WriteStringValue(ErrorMessage); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ErrorDetailProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ErrorDetailProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeErrorDetailProperties(document.RootElement, options); + } + + internal static ErrorDetailProperties DeserializeErrorDetailProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string errorCode = default; + string errorMessage = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("errorCode"u8)) + { + errorCode = property.Value.GetString(); + continue; + } + if (property.NameEquals("errorMessage"u8)) + { + errorMessage = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ErrorDetailProperties(errorCode, errorMessage, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ErrorDetailProperties)} does not support writing '{options.Format}' format."); + } + } + + ErrorDetailProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeErrorDetailProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ErrorDetailProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ErrorDetailProperties.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ErrorDetailProperties.cs new file mode 100644 index 000000000000..f6568d77a03e --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ErrorDetailProperties.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; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// ARM error code and error message associated with the impact. + public partial class ErrorDetailProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ErrorDetailProperties() + { + } + + /// Initializes a new instance of . + /// ARM Error code associated with the impact. + /// ARM Error Message associated with the impact. + /// Keeps track of any properties unknown to the library. + internal ErrorDetailProperties(string errorCode, string errorMessage, IDictionary serializedAdditionalRawData) + { + ErrorCode = errorCode; + ErrorMessage = errorMessage; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// ARM Error code associated with the impact. + public string ErrorCode { get; set; } + /// ARM Error Message associated with the impact. + public string ErrorMessage { get; set; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ExpectedValueRange.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ExpectedValueRange.Serialization.cs new file mode 100644 index 000000000000..de74004dd171 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ExpectedValueRange.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class ExpectedValueRange : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExpectedValueRange)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("min"u8); + writer.WriteNumberValue(Min); + writer.WritePropertyName("max"u8); + writer.WriteNumberValue(Max); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExpectedValueRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExpectedValueRange)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExpectedValueRange(document.RootElement, options); + } + + internal static ExpectedValueRange DeserializeExpectedValueRange(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double min = default; + double max = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("min"u8)) + { + min = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("max"u8)) + { + max = property.Value.GetDouble(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExpectedValueRange(min, max, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExpectedValueRange)} does not support writing '{options.Format}' format."); + } + } + + ExpectedValueRange IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExpectedValueRange(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExpectedValueRange)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ExpectedValueRange.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ExpectedValueRange.cs new file mode 100644 index 000000000000..b6de2f1af960 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ExpectedValueRange.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; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// Max and Min Threshold values for the metric. + public partial class ExpectedValueRange + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Min threshold value for the metric. + /// Max threshold value for the metric. + public ExpectedValueRange(double min, double max) + { + Min = min; + Max = max; + } + + /// Initializes a new instance of . + /// Min threshold value for the metric. + /// Max threshold value for the metric. + /// Keeps track of any properties unknown to the library. + internal ExpectedValueRange(double min, double max, IDictionary serializedAdditionalRawData) + { + Min = min; + Max = max; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExpectedValueRange() + { + } + + /// Min threshold value for the metric. + public double Min { get; set; } + /// Max threshold value for the metric. + public double Max { get; set; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryListResult.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryListResult.Serialization.cs new file mode 100644 index 000000000000..5396a6ba36f1 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + internal partial class ImpactCategoryListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImpactCategoryListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ImpactCategoryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImpactCategoryListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImpactCategoryListResult(document.RootElement, options); + } + + internal static ImpactCategoryListResult DeserializeImpactCategoryListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ImpactCategoryData.DeserializeImpactCategoryData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImpactCategoryListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ImpactCategoryListResult)} does not support writing '{options.Format}' format."); + } + } + + ImpactCategoryListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeImpactCategoryListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImpactCategoryListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryListResult.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryListResult.cs new file mode 100644 index 000000000000..ba44039d1f6c --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// The response of a ImpactCategory list operation. + internal partial class ImpactCategoryListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ImpactCategory items on this page. + /// is null. + internal ImpactCategoryListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ImpactCategory items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ImpactCategoryListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ImpactCategoryListResult() + { + } + + /// The ImpactCategory items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryProperties.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryProperties.Serialization.cs new file mode 100644 index 000000000000..be7ee5afcf86 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryProperties.Serialization.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class ImpactCategoryProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImpactCategoryProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WritePropertyName("categoryId"u8); + writer.WriteStringValue(CategoryId); + if (Optional.IsDefined(ParentCategoryId)) + { + writer.WritePropertyName("parentCategoryId"u8); + writer.WriteStringValue(ParentCategoryId); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(RequiredImpactProperties)) + { + writer.WritePropertyName("requiredImpactProperties"u8); + writer.WriteStartArray(); + foreach (var item in RequiredImpactProperties) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ImpactCategoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImpactCategoryProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImpactCategoryProperties(document.RootElement, options); + } + + internal static ImpactCategoryProperties DeserializeImpactCategoryProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProvisioningState? provisioningState = default; + string categoryId = default; + string parentCategoryId = default; + string description = default; + IReadOnlyList requiredImpactProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("categoryId"u8)) + { + categoryId = property.Value.GetString(); + continue; + } + if (property.NameEquals("parentCategoryId"u8)) + { + parentCategoryId = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("requiredImpactProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.RequiredImpactProperties.DeserializeRequiredImpactProperties(item, options)); + } + requiredImpactProperties = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImpactCategoryProperties( + provisioningState, + categoryId, + parentCategoryId, + description, + requiredImpactProperties ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ImpactCategoryProperties)} does not support writing '{options.Format}' format."); + } + } + + ImpactCategoryProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeImpactCategoryProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImpactCategoryProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryProperties.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryProperties.cs new file mode 100644 index 000000000000..af4c8b3aac08 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactCategoryProperties.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// Impact category properties. + public partial class ImpactCategoryProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Unique ID of the category. + /// is null. + internal ImpactCategoryProperties(string categoryId) + { + Argument.AssertNotNull(categoryId, nameof(categoryId)); + + CategoryId = categoryId; + RequiredImpactProperties = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Resource provisioning state. + /// Unique ID of the category. + /// Unique ID of the parent category. + /// Description of the category. + /// The workloadImpact properties which are required when reporting with the impact category. + /// Keeps track of any properties unknown to the library. + internal ImpactCategoryProperties(ProvisioningState? provisioningState, string categoryId, string parentCategoryId, string description, IReadOnlyList requiredImpactProperties, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + CategoryId = categoryId; + ParentCategoryId = parentCategoryId; + Description = description; + RequiredImpactProperties = requiredImpactProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ImpactCategoryProperties() + { + } + + /// Resource provisioning state. + public ProvisioningState? ProvisioningState { get; } + /// Unique ID of the category. + public string CategoryId { get; } + /// Unique ID of the parent category. + public string ParentCategoryId { get; } + /// Description of the category. + public string Description { get; } + /// The workloadImpact properties which are required when reporting with the impact category. + public IReadOnlyList RequiredImpactProperties { get; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactDetails.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactDetails.Serialization.cs new file mode 100644 index 000000000000..d96af8bbb134 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactDetails.Serialization.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class ImpactDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImpactDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("impactedResourceId"u8); + writer.WriteStringValue(ImpactedResourceId); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn, "O"); + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + writer.WritePropertyName("impactId"u8); + writer.WriteStringValue(ImpactId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ImpactDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImpactDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImpactDetails(document.RootElement, options); + } + + internal static ImpactDetails DeserializeImpactDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string impactedResourceId = default; + DateTimeOffset startTime = default; + DateTimeOffset? endTime = default; + string impactId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("impactedResourceId"u8)) + { + impactedResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("impactId"u8)) + { + impactId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImpactDetails(impactedResourceId, startTime, endTime, impactId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ImpactDetails)} does not support writing '{options.Format}' format."); + } + } + + ImpactDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeImpactDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImpactDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactDetails.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactDetails.cs new file mode 100644 index 000000000000..9c12f1480dc1 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ImpactDetails.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// details of of the impact for which insight has been generated. + public partial class ImpactDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// List of impacted Azure resources. + /// Time at which impact was started according to reported impact. + /// Azure Id of the impact. + /// or is null. + public ImpactDetails(string impactedResourceId, DateTimeOffset startOn, string impactId) + { + Argument.AssertNotNull(impactedResourceId, nameof(impactedResourceId)); + Argument.AssertNotNull(impactId, nameof(impactId)); + + ImpactedResourceId = impactedResourceId; + StartOn = startOn; + ImpactId = impactId; + } + + /// Initializes a new instance of . + /// List of impacted Azure resources. + /// Time at which impact was started according to reported impact. + /// Time at which impact was ended according to reported impact. + /// Azure Id of the impact. + /// Keeps track of any properties unknown to the library. + internal ImpactDetails(string impactedResourceId, DateTimeOffset startOn, DateTimeOffset? endOn, string impactId, IDictionary serializedAdditionalRawData) + { + ImpactedResourceId = impactedResourceId; + StartOn = startOn; + EndOn = endOn; + ImpactId = impactId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ImpactDetails() + { + } + + /// List of impacted Azure resources. + public string ImpactedResourceId { get; set; } + /// Time at which impact was started according to reported impact. + public DateTimeOffset StartOn { get; set; } + /// Time at which impact was ended according to reported impact. + public DateTimeOffset? EndOn { get; set; } + /// Azure Id of the impact. + public string ImpactId { get; set; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/IncidentSource.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/IncidentSource.cs new file mode 100644 index 000000000000..b1a1a24ecc52 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/IncidentSource.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.ImpactReporting.Models +{ + /// List of incident interfaces. + public readonly partial struct IncidentSource : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IncidentSource(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureDevopsValue = "AzureDevops"; + private const string ICMValue = "ICM"; + private const string JiraValue = "Jira"; + private const string ServiceNowValue = "ServiceNow"; + private const string OtherValue = "Other"; + + /// When source of Incident is AzureDevops. + public static IncidentSource AzureDevops { get; } = new IncidentSource(AzureDevopsValue); + /// When source of Incident is Microsoft ICM. + public static IncidentSource ICM { get; } = new IncidentSource(ICMValue); + /// When source of Incident is Jira. + public static IncidentSource Jira { get; } = new IncidentSource(JiraValue); + /// When source of Incident is ServiceNow. + public static IncidentSource ServiceNow { get; } = new IncidentSource(ServiceNowValue); + /// When source of Incident is Other. + public static IncidentSource Other { get; } = new IncidentSource(OtherValue); + /// Determines if two values are the same. + public static bool operator ==(IncidentSource left, IncidentSource right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IncidentSource left, IncidentSource right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator IncidentSource(string value) => new IncidentSource(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IncidentSource other && Equals(other); + /// + public bool Equals(IncidentSource other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightListResult.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightListResult.Serialization.cs new file mode 100644 index 000000000000..dfdb97b7f023 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + internal partial class InsightListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InsightListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InsightListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InsightListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInsightListResult(document.RootElement, options); + } + + internal static InsightListResult DeserializeInsightListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(InsightData.DeserializeInsightData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InsightListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InsightListResult)} does not support writing '{options.Format}' format."); + } + } + + InsightListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeInsightListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InsightListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightListResult.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightListResult.cs new file mode 100644 index 000000000000..79f58ae35662 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// The response of a Insight list operation. + internal partial class InsightListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Insight items on this page. + /// is null. + internal InsightListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Insight items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal InsightListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal InsightListResult() + { + } + + /// The Insight items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightProperties.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightProperties.Serialization.cs new file mode 100644 index 000000000000..2ff8164fd197 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightProperties.Serialization.cs @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class InsightProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InsightProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + } + if (Optional.IsDefined(EventId)) + { + writer.WritePropertyName("eventId"u8); + writer.WriteStringValue(EventId); + } + if (Optional.IsDefined(GroupId)) + { + writer.WritePropertyName("groupId"u8); + writer.WriteStringValue(GroupId); + } + writer.WritePropertyName("content"u8); + writer.WriteObjectValue(Content, options); + if (Optional.IsDefined(EventOn)) + { + writer.WritePropertyName("eventTime"u8); + writer.WriteStringValue(EventOn.Value, "O"); + } + writer.WritePropertyName("insightUniqueId"u8); + writer.WriteStringValue(InsightUniqueId); + writer.WritePropertyName("impact"u8); + writer.WriteObjectValue(Impact, options); + if (Optional.IsDefined(AdditionalDetails)) + { + writer.WritePropertyName("additionalDetails"u8); + writer.WriteObjectValue(AdditionalDetails, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InsightProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InsightProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInsightProperties(document.RootElement, options); + } + + internal static InsightProperties DeserializeInsightProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProvisioningState? provisioningState = default; + string category = default; + string status = default; + string eventId = default; + string groupId = default; + Content content = default; + DateTimeOffset? eventTime = default; + string insightUniqueId = default; + ImpactDetails impact = default; + InsightPropertiesAdditionalDetails additionalDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("eventId"u8)) + { + eventId = property.Value.GetString(); + continue; + } + if (property.NameEquals("groupId"u8)) + { + groupId = property.Value.GetString(); + continue; + } + if (property.NameEquals("content"u8)) + { + content = Content.DeserializeContent(property.Value, options); + continue; + } + if (property.NameEquals("eventTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + eventTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("insightUniqueId"u8)) + { + insightUniqueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("impact"u8)) + { + impact = ImpactDetails.DeserializeImpactDetails(property.Value, options); + continue; + } + if (property.NameEquals("additionalDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalDetails = InsightPropertiesAdditionalDetails.DeserializeInsightPropertiesAdditionalDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InsightProperties( + provisioningState, + category, + status, + eventId, + groupId, + content, + eventTime, + insightUniqueId, + impact, + additionalDetails, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InsightProperties)} does not support writing '{options.Format}' format."); + } + } + + InsightProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeInsightProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InsightProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightProperties.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightProperties.cs new file mode 100644 index 000000000000..e9b3a2c49686 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightProperties.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// Impact category properties. + public partial class InsightProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// category of the insight. + /// Contains title & description for the insight. + /// unique id of the insight. + /// details of of the impact for which insight has been generated. + /// , , or is null. + public InsightProperties(string category, Content content, string insightUniqueId, ImpactDetails impact) + { + Argument.AssertNotNull(category, nameof(category)); + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(insightUniqueId, nameof(insightUniqueId)); + Argument.AssertNotNull(impact, nameof(impact)); + + Category = category; + Content = content; + InsightUniqueId = insightUniqueId; + Impact = impact; + } + + /// Initializes a new instance of . + /// Resource provisioning state. + /// category of the insight. + /// status of the insight. example resolved, repaired, other. + /// Identifier of the event that has been correlated with this insight. This can be used to aggregate insights for the same event. + /// Identifier that can be used to group similar insights. + /// Contains title & description for the insight. + /// Time of the event, which has been correlated the impact. + /// unique id of the insight. + /// details of of the impact for which insight has been generated. + /// additional details of the insight. + /// Keeps track of any properties unknown to the library. + internal InsightProperties(ProvisioningState? provisioningState, string category, string status, string eventId, string groupId, Content content, DateTimeOffset? eventOn, string insightUniqueId, ImpactDetails impact, InsightPropertiesAdditionalDetails additionalDetails, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + Category = category; + Status = status; + EventId = eventId; + GroupId = groupId; + Content = content; + EventOn = eventOn; + InsightUniqueId = insightUniqueId; + Impact = impact; + AdditionalDetails = additionalDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal InsightProperties() + { + } + + /// Resource provisioning state. + public ProvisioningState? ProvisioningState { get; } + /// category of the insight. + public string Category { get; set; } + /// status of the insight. example resolved, repaired, other. + public string Status { get; set; } + /// Identifier of the event that has been correlated with this insight. This can be used to aggregate insights for the same event. + public string EventId { get; set; } + /// Identifier that can be used to group similar insights. + public string GroupId { get; set; } + /// Contains title & description for the insight. + public Content Content { get; set; } + /// Time of the event, which has been correlated the impact. + public DateTimeOffset? EventOn { get; set; } + /// unique id of the insight. + public string InsightUniqueId { get; set; } + /// details of of the impact for which insight has been generated. + public ImpactDetails Impact { get; set; } + /// additional details of the insight. + public InsightPropertiesAdditionalDetails AdditionalDetails { get; set; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightPropertiesAdditionalDetails.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightPropertiesAdditionalDetails.Serialization.cs new file mode 100644 index 000000000000..ad5344880f67 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightPropertiesAdditionalDetails.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class InsightPropertiesAdditionalDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InsightPropertiesAdditionalDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InsightPropertiesAdditionalDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InsightPropertiesAdditionalDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInsightPropertiesAdditionalDetails(document.RootElement, options); + } + + internal static InsightPropertiesAdditionalDetails DeserializeInsightPropertiesAdditionalDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InsightPropertiesAdditionalDetails(serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InsightPropertiesAdditionalDetails)} does not support writing '{options.Format}' format."); + } + } + + InsightPropertiesAdditionalDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeInsightPropertiesAdditionalDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InsightPropertiesAdditionalDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightPropertiesAdditionalDetails.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightPropertiesAdditionalDetails.cs new file mode 100644 index 000000000000..9c4878c129cf --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/InsightPropertiesAdditionalDetails.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// The InsightPropertiesAdditionalDetails. + public partial class InsightPropertiesAdditionalDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public InsightPropertiesAdditionalDetails() + { + } + + /// Initializes a new instance of . + /// Keeps track of any properties unknown to the library. + internal InsightPropertiesAdditionalDetails(IDictionary serializedAdditionalRawData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/MetricUnit.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/MetricUnit.cs new file mode 100644 index 000000000000..0afe0b5c1194 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/MetricUnit.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// List of unit of the metric. + public readonly partial struct MetricUnit : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MetricUnit(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ByteSecondsValue = "ByteSeconds"; + private const string BytesValue = "Bytes"; + private const string BytesPerSecondValue = "BytesPerSecond"; + private const string CoresValue = "Cores"; + private const string CountValue = "Count"; + private const string CountPerSecondValue = "CountPerSecond"; + private const string MilliCoresValue = "MilliCores"; + private const string MilliSecondsValue = "MilliSeconds"; + private const string NanoCoresValue = "NanoCores"; + private const string PercentValue = "Percent"; + private const string SecondsValue = "Seconds"; + private const string OtherValue = "Other"; + + /// When measurement is in ByteSeconds. + public static MetricUnit ByteSeconds { get; } = new MetricUnit(ByteSecondsValue); + /// When measurement is in Bytes. + public static MetricUnit Bytes { get; } = new MetricUnit(BytesValue); + /// When measurement is in BytesPerSecond. + public static MetricUnit BytesPerSecond { get; } = new MetricUnit(BytesPerSecondValue); + /// When measurement is in Cores. + public static MetricUnit Cores { get; } = new MetricUnit(CoresValue); + /// When measurement is in Count. + public static MetricUnit Count { get; } = new MetricUnit(CountValue); + /// When measurement is in CountPerSecond. + public static MetricUnit CountPerSecond { get; } = new MetricUnit(CountPerSecondValue); + /// When measurement is in MilliCores. + public static MetricUnit MilliCores { get; } = new MetricUnit(MilliCoresValue); + /// When measurement is in MilliSeconds. + public static MetricUnit MilliSeconds { get; } = new MetricUnit(MilliSecondsValue); + /// When measurement is in NanoCores. + public static MetricUnit NanoCores { get; } = new MetricUnit(NanoCoresValue); + /// When measurement is in Percent. + public static MetricUnit Percent { get; } = new MetricUnit(PercentValue); + /// When measurement is in Seconds. + public static MetricUnit Seconds { get; } = new MetricUnit(SecondsValue); + /// When measurement is in Other than listed. + public static MetricUnit Other { get; } = new MetricUnit(OtherValue); + /// Determines if two values are the same. + public static bool operator ==(MetricUnit left, MetricUnit right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MetricUnit left, MetricUnit right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MetricUnit(string value) => new MetricUnit(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MetricUnit other && Equals(other); + /// + public bool Equals(MetricUnit other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Performance.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Performance.Serialization.cs new file mode 100644 index 000000000000..20926864e2ea --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Performance.Serialization.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class Performance : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Performance)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MetricName)) + { + writer.WritePropertyName("metricName"u8); + writer.WriteStringValue(MetricName); + } + if (Optional.IsDefined(Expected)) + { + writer.WritePropertyName("expected"u8); + writer.WriteNumberValue(Expected.Value); + } + if (Optional.IsDefined(Actual)) + { + writer.WritePropertyName("actual"u8); + writer.WriteNumberValue(Actual.Value); + } + if (Optional.IsDefined(ExpectedValueRange)) + { + writer.WritePropertyName("expectedValueRange"u8); + writer.WriteObjectValue(ExpectedValueRange, options); + } + if (Optional.IsDefined(Unit)) + { + writer.WritePropertyName("unit"u8); + writer.WriteStringValue(Unit.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + Performance IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Performance)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePerformance(document.RootElement, options); + } + + internal static Performance DeserializePerformance(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string metricName = default; + double? expected = default; + double? actual = default; + ExpectedValueRange expectedValueRange = default; + MetricUnit? unit = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metricName"u8)) + { + metricName = property.Value.GetString(); + continue; + } + if (property.NameEquals("expected"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expected = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("actual"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actual = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("expectedValueRange"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expectedValueRange = ExpectedValueRange.DeserializeExpectedValueRange(property.Value, options); + continue; + } + if (property.NameEquals("unit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + unit = new MetricUnit(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Performance( + metricName, + expected, + actual, + expectedValueRange, + unit, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(Performance)} does not support writing '{options.Format}' format."); + } + } + + Performance IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePerformance(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Performance)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Performance.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Performance.cs new file mode 100644 index 000000000000..52de89fe19b3 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Performance.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// Details about impacted performance metrics. Applicable for performance related impact. + public partial class Performance + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public Performance() + { + } + + /// Initializes a new instance of . + /// Name of the Metric examples: Disk, IOPs, CPU, GPU, Memory, details can be found from /impactCategories API. + /// Threshold value for the metric. + /// Observed value for the metric. + /// Max and Min Threshold values for the metric. + /// Unit of the metric ex: Bytes, Percentage, Count, Seconds, Milliseconds, Bytes/Second, Count/Second, etc.., Other. + /// Keeps track of any properties unknown to the library. + internal Performance(string metricName, double? expected, double? actual, ExpectedValueRange expectedValueRange, MetricUnit? unit, IDictionary serializedAdditionalRawData) + { + MetricName = metricName; + Expected = expected; + Actual = actual; + ExpectedValueRange = expectedValueRange; + Unit = unit; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Name of the Metric examples: Disk, IOPs, CPU, GPU, Memory, details can be found from /impactCategories API. + public string MetricName { get; set; } + /// Threshold value for the metric. + public double? Expected { get; set; } + /// Observed value for the metric. + public double? Actual { get; set; } + /// Max and Min Threshold values for the metric. + public ExpectedValueRange ExpectedValueRange { get; set; } + /// Unit of the metric ex: Bytes, Percentage, Count, Seconds, Milliseconds, Bytes/Second, Count/Second, etc.., Other. + public MetricUnit? Unit { get; set; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Platform.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Platform.cs new file mode 100644 index 000000000000..978aaaa0e070 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Platform.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.ImpactReporting.Models +{ + /// Enum for connector types. + public readonly partial struct Platform : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Platform(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureMonitorValue = "AzureMonitor"; + + /// Type of Azure Monitor. + public static Platform AzureMonitor { get; } = new Platform(AzureMonitorValue); + /// Determines if two values are the same. + public static bool operator ==(Platform left, Platform right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Platform left, Platform right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator Platform(string value) => new Platform(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Platform other && Equals(other); + /// + public bool Equals(Platform other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Protocol.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Protocol.cs new file mode 100644 index 000000000000..dd3557f30bfb --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Protocol.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// List of protocols. + public readonly partial struct Protocol : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Protocol(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TCPValue = "TCP"; + private const string UDPValue = "UDP"; + private const string HTTPValue = "HTTP"; + private const string HTTPSValue = "HTTPS"; + private const string RDPValue = "RDP"; + private const string FTPValue = "FTP"; + private const string SSHValue = "SSH"; + private const string OtherValue = "Other"; + + /// When communication protocol is TCP. + public static Protocol TCP { get; } = new Protocol(TCPValue); + /// When communication protocol is UDP. + public static Protocol UDP { get; } = new Protocol(UDPValue); + /// When communication protocol is HTTP. + public static Protocol HTTP { get; } = new Protocol(HTTPValue); + /// When communication protocol is HTTPS. + public static Protocol HTTPS { get; } = new Protocol(HTTPSValue); + /// When communication protocol is RDP. + public static Protocol RDP { get; } = new Protocol(RDPValue); + /// When communication protocol is FTP. + public static Protocol FTP { get; } = new Protocol(FTPValue); + /// When communication protocol is SSH. + public static Protocol SSH { get; } = new Protocol(SSHValue); + /// When communication protocol is Other. + public static Protocol Other { get; } = new Protocol(OtherValue); + /// Determines if two values are the same. + public static bool operator ==(Protocol left, Protocol right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Protocol left, Protocol right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator Protocol(string value) => new Protocol(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Protocol other && Equals(other); + /// + public bool Equals(Protocol other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ProvisioningState.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..7f8995037fb0 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/ProvisioningState.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.ImpactReporting.Models +{ + /// Provisioning state of the resource. + 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 SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Provisioning Succeeded. + public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); + /// Provisioning Failed. + public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); + /// Provisioning Canceled. + public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); + /// 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 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 != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/RequiredImpactProperties.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/RequiredImpactProperties.Serialization.cs new file mode 100644 index 000000000000..e657012d2972 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/RequiredImpactProperties.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class RequiredImpactProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RequiredImpactProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsCollectionDefined(AllowedValues)) + { + writer.WritePropertyName("allowedValues"u8); + writer.WriteStartArray(); + foreach (var item in AllowedValues) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RequiredImpactProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RequiredImpactProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRequiredImpactProperties(document.RootElement, options); + } + + internal static RequiredImpactProperties DeserializeRequiredImpactProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IReadOnlyList allowedValues = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("allowedValues"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedValues = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RequiredImpactProperties(name, allowedValues ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RequiredImpactProperties)} does not support writing '{options.Format}' format."); + } + } + + RequiredImpactProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRequiredImpactProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RequiredImpactProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/RequiredImpactProperties.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/RequiredImpactProperties.cs new file mode 100644 index 000000000000..53ed7245ccf3 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/RequiredImpactProperties.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// Required impact properties. + public partial class RequiredImpactProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the property. + /// is null. + internal RequiredImpactProperties(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + AllowedValues = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Name of the property. + /// Allowed values values for the property. + /// Keeps track of any properties unknown to the library. + internal RequiredImpactProperties(string name, IReadOnlyList allowedValues, IDictionary serializedAdditionalRawData) + { + Name = name; + AllowedValues = allowedValues; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RequiredImpactProperties() + { + } + + /// Name of the property. + public string Name { get; } + /// Allowed values values for the property. + public IReadOnlyList AllowedValues { get; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/SourceOrTarget.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/SourceOrTarget.Serialization.cs new file mode 100644 index 000000000000..daeee4566adb --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/SourceOrTarget.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + internal partial class SourceOrTarget : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SourceOrTarget)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AzureResourceId)) + { + writer.WritePropertyName("azureResourceId"u8); + writer.WriteStringValue(AzureResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SourceOrTarget IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SourceOrTarget)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSourceOrTarget(document.RootElement, options); + } + + internal static SourceOrTarget DeserializeSourceOrTarget(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string azureResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureResourceId"u8)) + { + azureResourceId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SourceOrTarget(azureResourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SourceOrTarget)} does not support writing '{options.Format}' format."); + } + } + + SourceOrTarget IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSourceOrTarget(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SourceOrTarget)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/SourceOrTarget.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/SourceOrTarget.cs new file mode 100644 index 000000000000..f424234d0eee --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/SourceOrTarget.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// Resource details. + internal partial class SourceOrTarget + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SourceOrTarget() + { + } + + /// Initializes a new instance of . + /// Azure resource id, example /subscription/{subscription}/resourceGroup/{rg}/Microsoft.compute/virtualMachine/{vmName}. + /// Keeps track of any properties unknown to the library. + internal SourceOrTarget(string azureResourceId, IDictionary serializedAdditionalRawData) + { + AzureResourceId = azureResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Azure resource id, example /subscription/{subscription}/resourceGroup/{rg}/Microsoft.compute/virtualMachine/{vmName}. + public string AzureResourceId { get; set; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Toolset.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Toolset.cs new file mode 100644 index 000000000000..18e2aa31bfd0 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Toolset.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// List of azure interfaces. + public readonly partial struct Toolset : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Toolset(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TerraformValue = "Terraform"; + private const string PuppetValue = "Puppet"; + private const string ChefValue = "Chef"; + private const string SDKValue = "SDK"; + private const string AnsibleValue = "Ansible"; + private const string ARMValue = "ARM"; + private const string PortalValue = "Portal"; + private const string ShellValue = "Shell"; + private const string OtherValue = "Other"; + + /// If communication toolset is Terraform. + public static Toolset Terraform { get; } = new Toolset(TerraformValue); + /// If communication toolset is Puppet. + public static Toolset Puppet { get; } = new Toolset(PuppetValue); + /// If communication toolset is Chef. + public static Toolset Chef { get; } = new Toolset(ChefValue); + /// If communication toolset is SDK. + public static Toolset SDK { get; } = new Toolset(SDKValue); + /// If communication toolset is Ansible. + public static Toolset Ansible { get; } = new Toolset(AnsibleValue); + /// If communication toolset is ARM. + public static Toolset ARM { get; } = new Toolset(ARMValue); + /// If communication toolset is Portal. + public static Toolset Portal { get; } = new Toolset(PortalValue); + /// If communication toolset is Shell. + public static Toolset Shell { get; } = new Toolset(ShellValue); + /// If communication toolset is Other. + public static Toolset Other { get; } = new Toolset(OtherValue); + /// Determines if two values are the same. + public static bool operator ==(Toolset left, Toolset right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Toolset left, Toolset right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator Toolset(string value) => new Toolset(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Toolset other && Equals(other); + /// + public bool Equals(Toolset other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Workload.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Workload.Serialization.cs new file mode 100644 index 000000000000..9661e9b11aed --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Workload.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class Workload : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Workload)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Context)) + { + writer.WritePropertyName("context"u8); + writer.WriteStringValue(Context); + } + if (Optional.IsDefined(Toolset)) + { + writer.WritePropertyName("toolset"u8); + writer.WriteStringValue(Toolset.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + Workload IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Workload)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkload(document.RootElement, options); + } + + internal static Workload DeserializeWorkload(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string context = default; + Toolset? toolset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("context"u8)) + { + context = property.Value.GetString(); + continue; + } + if (property.NameEquals("toolset"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + toolset = new Toolset(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Workload(context, toolset, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(Workload)} does not support writing '{options.Format}' format."); + } + } + + Workload IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWorkload(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Workload)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Workload.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Workload.cs new file mode 100644 index 000000000000..ca0edd5f8cdb --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/Workload.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; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// Information about the impacted workload. + public partial class Workload + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public Workload() + { + } + + /// Initializes a new instance of . + /// the scenario for the workload. + /// Tool used to interact with Azure. SDK, AzPortal, etc.., Other. + /// Keeps track of any properties unknown to the library. + internal Workload(string context, Toolset? toolset, IDictionary serializedAdditionalRawData) + { + Context = context; + Toolset = toolset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// the scenario for the workload. + public string Context { get; set; } + /// Tool used to interact with Azure. SDK, AzPortal, etc.., Other. + public Toolset? Toolset { get; set; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactListResult.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactListResult.Serialization.cs new file mode 100644 index 000000000000..ec6c68e1aaba --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + internal partial class WorkloadImpactListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkloadImpactListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WorkloadImpactListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkloadImpactListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkloadImpactListResult(document.RootElement, options); + } + + internal static WorkloadImpactListResult DeserializeWorkloadImpactListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkloadImpactData.DeserializeWorkloadImpactData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkloadImpactListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WorkloadImpactListResult)} does not support writing '{options.Format}' format."); + } + } + + WorkloadImpactListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWorkloadImpactListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkloadImpactListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactListResult.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactListResult.cs new file mode 100644 index 000000000000..91a0bf749286 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// The response of a WorkloadImpact list operation. + internal partial class WorkloadImpactListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The WorkloadImpact items on this page. + /// is null. + internal WorkloadImpactListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The WorkloadImpact items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal WorkloadImpactListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkloadImpactListResult() + { + } + + /// The WorkloadImpact items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactProperties.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactProperties.Serialization.cs new file mode 100644 index 000000000000..7ff91866f503 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactProperties.Serialization.cs @@ -0,0 +1,378 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class WorkloadImpactProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkloadImpactProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WritePropertyName("startDateTime"u8); + writer.WriteStringValue(StartOn, "O"); + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endDateTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + writer.WritePropertyName("impactedResourceId"u8); + writer.WriteStringValue(ImpactedResourceId); + if (options.Format != "W" && Optional.IsDefined(ImpactUniqueId)) + { + writer.WritePropertyName("impactUniqueId"u8); + writer.WriteStringValue(ImpactUniqueId); + } + if (options.Format != "W" && Optional.IsDefined(ReportedTimeUtc)) + { + writer.WritePropertyName("reportedTimeUtc"u8); + writer.WriteStringValue(ReportedTimeUtc.Value, "O"); + } + writer.WritePropertyName("impactCategory"u8); + writer.WriteStringValue(ImpactCategory); + if (Optional.IsDefined(ImpactDescription)) + { + writer.WritePropertyName("impactDescription"u8); + writer.WriteStringValue(ImpactDescription); + } + if (Optional.IsCollectionDefined(ArmCorrelationIds)) + { + writer.WritePropertyName("armCorrelationIds"u8); + writer.WriteStartArray(); + foreach (var item in ArmCorrelationIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Performance)) + { + writer.WritePropertyName("performance"u8); + writer.WriteStartArray(); + foreach (var item in Performance) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Connectivity)) + { + writer.WritePropertyName("connectivity"u8); + writer.WriteObjectValue(Connectivity, options); + } + if (Optional.IsDefined(AdditionalProperties)) + { + writer.WritePropertyName("additionalProperties"u8); + writer.WriteObjectValue(AdditionalProperties, options); + } + if (Optional.IsDefined(ErrorDetails)) + { + writer.WritePropertyName("errorDetails"u8); + writer.WriteObjectValue(ErrorDetails, options); + } + if (Optional.IsDefined(Workload)) + { + writer.WritePropertyName("workload"u8); + writer.WriteObjectValue(Workload, options); + } + if (Optional.IsDefined(ImpactGroupId)) + { + writer.WritePropertyName("impactGroupId"u8); + writer.WriteStringValue(ImpactGroupId); + } + if (Optional.IsDefined(ConfidenceLevel)) + { + writer.WritePropertyName("confidenceLevel"u8); + writer.WriteStringValue(ConfidenceLevel.Value.ToString()); + } + if (Optional.IsDefined(ClientIncidentDetails)) + { + writer.WritePropertyName("clientIncidentDetails"u8); + writer.WriteObjectValue(ClientIncidentDetails, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WorkloadImpactProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkloadImpactProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkloadImpactProperties(document.RootElement, options); + } + + internal static WorkloadImpactProperties DeserializeWorkloadImpactProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProvisioningState? provisioningState = default; + DateTimeOffset startDateTime = default; + DateTimeOffset? endDateTime = default; + string impactedResourceId = default; + string impactUniqueId = default; + DateTimeOffset? reportedTimeUtc = default; + string impactCategory = default; + string impactDescription = default; + IList armCorrelationIds = default; + IList performance = default; + Connectivity connectivity = default; + WorkloadImpactPropertiesAdditionalProperties additionalProperties = default; + ErrorDetailProperties errorDetails = default; + Workload workload = default; + string impactGroupId = default; + ConfidenceLevel? confidenceLevel = default; + ClientIncidentDetails clientIncidentDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("startDateTime"u8)) + { + startDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("impactedResourceId"u8)) + { + impactedResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("impactUniqueId"u8)) + { + impactUniqueId = property.Value.GetString(); + continue; + } + if (property.NameEquals("reportedTimeUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reportedTimeUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("impactCategory"u8)) + { + impactCategory = property.Value.GetString(); + continue; + } + if (property.NameEquals("impactDescription"u8)) + { + impactDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("armCorrelationIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + armCorrelationIds = array; + continue; + } + if (property.NameEquals("performance"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.Performance.DeserializePerformance(item, options)); + } + performance = array; + continue; + } + if (property.NameEquals("connectivity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectivity = Connectivity.DeserializeConnectivity(property.Value, options); + continue; + } + if (property.NameEquals("additionalProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalProperties = WorkloadImpactPropertiesAdditionalProperties.DeserializeWorkloadImpactPropertiesAdditionalProperties(property.Value, options); + continue; + } + if (property.NameEquals("errorDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorDetails = ErrorDetailProperties.DeserializeErrorDetailProperties(property.Value, options); + continue; + } + if (property.NameEquals("workload"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workload = Workload.DeserializeWorkload(property.Value, options); + continue; + } + if (property.NameEquals("impactGroupId"u8)) + { + impactGroupId = property.Value.GetString(); + continue; + } + if (property.NameEquals("confidenceLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + confidenceLevel = new ConfidenceLevel(property.Value.GetString()); + continue; + } + if (property.NameEquals("clientIncidentDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientIncidentDetails = ClientIncidentDetails.DeserializeClientIncidentDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkloadImpactProperties( + provisioningState, + startDateTime, + endDateTime, + impactedResourceId, + impactUniqueId, + reportedTimeUtc, + impactCategory, + impactDescription, + armCorrelationIds ?? new ChangeTrackingList(), + performance ?? new ChangeTrackingList(), + connectivity, + additionalProperties, + errorDetails, + workload, + impactGroupId, + confidenceLevel, + clientIncidentDetails, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WorkloadImpactProperties)} does not support writing '{options.Format}' format."); + } + } + + WorkloadImpactProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWorkloadImpactProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkloadImpactProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactProperties.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactProperties.cs new file mode 100644 index 000000000000..b4745430bff7 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactProperties.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// Workload impact properties. + public partial class WorkloadImpactProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Time at which impact was observed. + /// Azure resource id of the impacted resource. + /// Category of the impact, details can found from /impactCategories API. + /// or is null. + public WorkloadImpactProperties(DateTimeOffset startOn, string impactedResourceId, string impactCategory) + { + Argument.AssertNotNull(impactedResourceId, nameof(impactedResourceId)); + Argument.AssertNotNull(impactCategory, nameof(impactCategory)); + + StartOn = startOn; + ImpactedResourceId = impactedResourceId; + ImpactCategory = impactCategory; + ArmCorrelationIds = new ChangeTrackingList(); + Performance = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Resource provisioning state. + /// Time at which impact was observed. + /// Time at which impact has ended. + /// Azure resource id of the impacted resource. + /// Unique ID of the impact (UUID). + /// Time at which impact is reported. + /// Category of the impact, details can found from /impactCategories API. + /// A detailed description of the impact. + /// The ARM correlation ids, this is important field for control plane related impacts. + /// Details about performance issue. Applicable for performance impacts. + /// Details about connectivity issue. Applicable when root resource causing the issue is not identified. For example, when a VM is impacted due to a network issue, the impacted resource is identified as the VM, but the root cause is the network. In such cases, the connectivity field will have the details about the network issue. + /// Additional fields related to impact, applicable fields per resource type are list under /impactCategories API. + /// ARM error code and error message associated with the impact. + /// Information about the impacted workload. + /// Use this field to group impacts. + /// Degree of confidence on the impact being a platform issue. + /// Client incident details ex: incidentId , incident source. + /// Keeps track of any properties unknown to the library. + internal WorkloadImpactProperties(ProvisioningState? provisioningState, DateTimeOffset startOn, DateTimeOffset? endOn, string impactedResourceId, string impactUniqueId, DateTimeOffset? reportedTimeUtc, string impactCategory, string impactDescription, IList armCorrelationIds, IList performance, Connectivity connectivity, WorkloadImpactPropertiesAdditionalProperties additionalProperties, ErrorDetailProperties errorDetails, Workload workload, string impactGroupId, ConfidenceLevel? confidenceLevel, ClientIncidentDetails clientIncidentDetails, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + StartOn = startOn; + EndOn = endOn; + ImpactedResourceId = impactedResourceId; + ImpactUniqueId = impactUniqueId; + ReportedTimeUtc = reportedTimeUtc; + ImpactCategory = impactCategory; + ImpactDescription = impactDescription; + ArmCorrelationIds = armCorrelationIds; + Performance = performance; + Connectivity = connectivity; + AdditionalProperties = additionalProperties; + ErrorDetails = errorDetails; + Workload = workload; + ImpactGroupId = impactGroupId; + ConfidenceLevel = confidenceLevel; + ClientIncidentDetails = clientIncidentDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkloadImpactProperties() + { + } + + /// Resource provisioning state. + public ProvisioningState? ProvisioningState { get; } + /// Time at which impact was observed. + public DateTimeOffset StartOn { get; set; } + /// Time at which impact has ended. + public DateTimeOffset? EndOn { get; set; } + /// Azure resource id of the impacted resource. + public string ImpactedResourceId { get; set; } + /// Unique ID of the impact (UUID). + public string ImpactUniqueId { get; } + /// Time at which impact is reported. + public DateTimeOffset? ReportedTimeUtc { get; } + /// Category of the impact, details can found from /impactCategories API. + public string ImpactCategory { get; set; } + /// A detailed description of the impact. + public string ImpactDescription { get; set; } + /// The ARM correlation ids, this is important field for control plane related impacts. + public IList ArmCorrelationIds { get; } + /// Details about performance issue. Applicable for performance impacts. + public IList Performance { get; } + /// Details about connectivity issue. Applicable when root resource causing the issue is not identified. For example, when a VM is impacted due to a network issue, the impacted resource is identified as the VM, but the root cause is the network. In such cases, the connectivity field will have the details about the network issue. + public Connectivity Connectivity { get; set; } + /// Additional fields related to impact, applicable fields per resource type are list under /impactCategories API. + public WorkloadImpactPropertiesAdditionalProperties AdditionalProperties { get; set; } + /// ARM error code and error message associated with the impact. + public ErrorDetailProperties ErrorDetails { get; set; } + /// Information about the impacted workload. + public Workload Workload { get; set; } + /// Use this field to group impacts. + public string ImpactGroupId { get; set; } + /// Degree of confidence on the impact being a platform issue. + public ConfidenceLevel? ConfidenceLevel { get; set; } + /// Client incident details ex: incidentId , incident source. + public ClientIncidentDetails ClientIncidentDetails { get; set; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactPropertiesAdditionalProperties.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactPropertiesAdditionalProperties.Serialization.cs new file mode 100644 index 000000000000..b8b8eff131ad --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactPropertiesAdditionalProperties.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + public partial class WorkloadImpactPropertiesAdditionalProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkloadImpactPropertiesAdditionalProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WorkloadImpactPropertiesAdditionalProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkloadImpactPropertiesAdditionalProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkloadImpactPropertiesAdditionalProperties(document.RootElement, options); + } + + internal static WorkloadImpactPropertiesAdditionalProperties DeserializeWorkloadImpactPropertiesAdditionalProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkloadImpactPropertiesAdditionalProperties(serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WorkloadImpactPropertiesAdditionalProperties)} does not support writing '{options.Format}' format."); + } + } + + WorkloadImpactPropertiesAdditionalProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWorkloadImpactPropertiesAdditionalProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkloadImpactPropertiesAdditionalProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactPropertiesAdditionalProperties.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactPropertiesAdditionalProperties.cs new file mode 100644 index 000000000000..a46fed669515 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/Models/WorkloadImpactPropertiesAdditionalProperties.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ImpactReporting.Models +{ + /// The WorkloadImpactPropertiesAdditionalProperties. + public partial class WorkloadImpactPropertiesAdditionalProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WorkloadImpactPropertiesAdditionalProperties() + { + } + + /// Initializes a new instance of . + /// Keeps track of any properties unknown to the library. + internal WorkloadImpactPropertiesAdditionalProperties(IDictionary serializedAdditionalRawData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ProviderConstants.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..71ee32aa17a0 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/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.ImpactReporting +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/ConnectorsRestOperations.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/ConnectorsRestOperations.cs new file mode 100644 index 000000000000..5793e3446c44 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/ConnectorsRestOperations.cs @@ -0,0 +1,533 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ImpactReporting.Models; + +namespace Azure.ResourceManager.ImpactReporting +{ + internal partial class ConnectorsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ConnectorsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public ConnectorsRestOperations(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 ?? "2024-05-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string connectorName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/connectors/", false); + uri.AppendPath(connectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string connectorName) + { + 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.Impact/connectors/", false); + uri.AppendPath(connectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Connector. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the connector. + /// 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 connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var message = CreateGetRequest(subscriptionId, connectorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConnectorData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ConnectorData.DeserializeConnectorData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConnectorData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Connector. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the connector. + /// 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 connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var message = CreateGetRequest(subscriptionId, connectorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConnectorData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ConnectorData.DeserializeConnectorData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConnectorData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string connectorName, ConnectorData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/connectors/", false); + uri.AppendPath(connectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string connectorName, ConnectorData 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("/providers/Microsoft.Impact/connectors/", false); + uri.AppendPath(connectorName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Connector. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the connector. + /// Resource create parameters. + /// 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 connectorName, ConnectorData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, connectorName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Connector. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the connector. + /// Resource create parameters. + /// 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 connectorName, ConnectorData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, connectorName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string connectorName, ConnectorPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/connectors/", false); + uri.AppendPath(connectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string connectorName, ConnectorPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/connectors/", false); + uri.AppendPath(connectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Connector. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the connector. + /// The resource properties to be updated. + /// 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 connectorName, ConnectorPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, connectorName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConnectorData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ConnectorData.DeserializeConnectorData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Connector. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the connector. + /// The resource properties to be updated. + /// 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 connectorName, ConnectorPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, connectorName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConnectorData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ConnectorData.DeserializeConnectorData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string connectorName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/connectors/", false); + uri.AppendPath(connectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string connectorName) + { + 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("/providers/Microsoft.Impact/connectors/", false); + uri.AppendPath(connectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Connector. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the connector. + /// 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 connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var message = CreateDeleteRequest(subscriptionId, connectorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Connector. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the connector. + /// 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 connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var message = CreateDeleteRequest(subscriptionId, connectorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/connectors", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + 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.Impact/connectors", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Connector resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + ConnectorListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ConnectorListResult.DeserializeConnectorListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Connector resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + ConnectorListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ConnectorListResult.DeserializeConnectorListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + 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; + } + + /// List Connector resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + ConnectorListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ConnectorListResult.DeserializeConnectorListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Connector resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + ConnectorListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ConnectorListResult.DeserializeConnectorListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/ImpactCategoriesRestOperations.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/ImpactCategoriesRestOperations.cs new file mode 100644 index 000000000000..02c9099c283d --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/ImpactCategoriesRestOperations.cs @@ -0,0 +1,303 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ImpactReporting.Models; + +namespace Azure.ResourceManager.ImpactReporting +{ + internal partial class ImpactCategoriesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ImpactCategoriesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public ImpactCategoriesRestOperations(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 ?? "2024-05-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string impactCategoryName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/impactCategories/", false); + uri.AppendPath(impactCategoryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string impactCategoryName) + { + 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.Impact/impactCategories/", false); + uri.AppendPath(impactCategoryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a ImpactCategory. + /// The ID of the target subscription. The value must be an UUID. + /// Name of the impact category. + /// 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 impactCategoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(impactCategoryName, nameof(impactCategoryName)); + + using var message = CreateGetRequest(subscriptionId, impactCategoryName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImpactCategoryData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImpactCategoryData.DeserializeImpactCategoryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ImpactCategoryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a ImpactCategory. + /// The ID of the target subscription. The value must be an UUID. + /// Name of the impact category. + /// 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 impactCategoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(impactCategoryName, nameof(impactCategoryName)); + + using var message = CreateGetRequest(subscriptionId, impactCategoryName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImpactCategoryData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImpactCategoryData.DeserializeImpactCategoryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ImpactCategoryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId, string resourceType, string categoryName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/impactCategories", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (categoryName != null) + { + uri.AppendQuery("categoryName", categoryName, true); + } + uri.AppendQuery("resourceType", resourceType, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, string resourceType, string categoryName) + { + 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.Impact/impactCategories", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (categoryName != null) + { + uri.AppendQuery("categoryName", categoryName, true); + } + uri.AppendQuery("resourceType", resourceType, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ImpactCategory resources by subscription. + /// The ID of the target subscription. The value must be an UUID. + /// Filter by resource type. + /// Filter by category name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, string resourceType, string categoryName = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(resourceType, nameof(resourceType)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, resourceType, categoryName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImpactCategoryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImpactCategoryListResult.DeserializeImpactCategoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ImpactCategory resources by subscription. + /// The ID of the target subscription. The value must be an UUID. + /// Filter by resource type. + /// Filter by category name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, string resourceType, string categoryName = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(resourceType, nameof(resourceType)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, resourceType, categoryName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImpactCategoryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImpactCategoryListResult.DeserializeImpactCategoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId, string resourceType, string categoryName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, string resourceType, string categoryName) + { + 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 ImpactCategory resources by subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// Filter by resource type. + /// Filter by category name. + /// 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, string resourceType, string categoryName = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(resourceType, nameof(resourceType)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, resourceType, categoryName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ImpactCategoryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ImpactCategoryListResult.DeserializeImpactCategoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ImpactCategory resources by subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// Filter by resource type. + /// Filter by category name. + /// 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, string resourceType, string categoryName = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(resourceType, nameof(resourceType)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, resourceType, categoryName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ImpactCategoryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ImpactCategoryListResult.DeserializeImpactCategoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/InsightsRestOperations.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/InsightsRestOperations.cs new file mode 100644 index 000000000000..93472b5be08c --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/InsightsRestOperations.cs @@ -0,0 +1,487 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ImpactReporting.Models; + +namespace Azure.ResourceManager.ImpactReporting +{ + internal partial class InsightsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of InsightsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public InsightsRestOperations(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 ?? "2024-05-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string workloadImpactName, string insightName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/workloadImpacts/", false); + uri.AppendPath(workloadImpactName, true); + uri.AppendPath("/insights/", false); + uri.AppendPath(insightName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string workloadImpactName, string insightName) + { + 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.Impact/workloadImpacts/", false); + uri.AppendPath(workloadImpactName, true); + uri.AppendPath("/insights/", false); + uri.AppendPath(insightName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get Insight resources by workloadImpactName and insightName. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact resource. + /// Name of the insight. + /// 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 workloadImpactName, string insightName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + Argument.AssertNotNullOrEmpty(insightName, nameof(insightName)); + + using var message = CreateGetRequest(subscriptionId, workloadImpactName, insightName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InsightData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = InsightData.DeserializeInsightData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((InsightData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get Insight resources by workloadImpactName and insightName. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact resource. + /// Name of the insight. + /// 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 workloadImpactName, string insightName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + Argument.AssertNotNullOrEmpty(insightName, nameof(insightName)); + + using var message = CreateGetRequest(subscriptionId, workloadImpactName, insightName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InsightData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = InsightData.DeserializeInsightData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((InsightData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId, string workloadImpactName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/workloadImpacts/", false); + uri.AppendPath(workloadImpactName, true); + uri.AppendPath("/insights", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, string workloadImpactName) + { + 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.Impact/workloadImpacts/", false); + uri.AppendPath(workloadImpactName, true); + uri.AppendPath("/insights", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Insight resources by workloadImpactName. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact resource. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, string workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, workloadImpactName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InsightListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = InsightListResult.DeserializeInsightListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Insight resources by workloadImpactName. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact resource. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, string workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, workloadImpactName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InsightListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = InsightListResult.DeserializeInsightListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string workloadImpactName, string insightName, InsightData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/workloadImpacts/", false); + uri.AppendPath(workloadImpactName, true); + uri.AppendPath("/insights/", false); + uri.AppendPath(insightName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string workloadImpactName, string insightName, InsightData 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("/providers/Microsoft.Impact/workloadImpacts/", false); + uri.AppendPath(workloadImpactName, true); + uri.AppendPath("/insights/", false); + uri.AppendPath(insightName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create Insight resource, This is Admin only operation. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact resource. + /// Name of the insight. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> CreateAsync(string subscriptionId, string workloadImpactName, string insightName, InsightData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + Argument.AssertNotNullOrEmpty(insightName, nameof(insightName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, workloadImpactName, insightName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + InsightData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = InsightData.DeserializeInsightData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create Insight resource, This is Admin only operation. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact resource. + /// Name of the insight. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string workloadImpactName, string insightName, InsightData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + Argument.AssertNotNullOrEmpty(insightName, nameof(insightName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, workloadImpactName, insightName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + InsightData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = InsightData.DeserializeInsightData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string workloadImpactName, string insightName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/workloadImpacts/", false); + uri.AppendPath(workloadImpactName, true); + uri.AppendPath("/insights/", false); + uri.AppendPath(insightName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string workloadImpactName, string insightName) + { + 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("/providers/Microsoft.Impact/workloadImpacts/", false); + uri.AppendPath(workloadImpactName, true); + uri.AppendPath("/insights/", false); + uri.AppendPath(insightName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete Insight resource, This is Admin only operation. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact resource. + /// Name of the insight. + /// 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 workloadImpactName, string insightName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + Argument.AssertNotNullOrEmpty(insightName, nameof(insightName)); + + using var message = CreateDeleteRequest(subscriptionId, workloadImpactName, insightName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete Insight resource, This is Admin only operation. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact resource. + /// Name of the insight. + /// 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 workloadImpactName, string insightName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + Argument.AssertNotNullOrEmpty(insightName, nameof(insightName)); + + using var message = CreateDeleteRequest(subscriptionId, workloadImpactName, insightName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId, string workloadImpactName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, string workloadImpactName) + { + 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 Insight resources by workloadImpactName. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact resource. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, workloadImpactName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InsightListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = InsightListResult.DeserializeInsightListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Insight resources by workloadImpactName. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact resource. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, workloadImpactName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InsightListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = InsightListResult.DeserializeInsightListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/WorkloadImpactsRestOperations.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/WorkloadImpactsRestOperations.cs new file mode 100644 index 000000000000..65559c0e6fc5 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/RestOperations/WorkloadImpactsRestOperations.cs @@ -0,0 +1,441 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ImpactReporting.Models; + +namespace Azure.ResourceManager.ImpactReporting +{ + internal partial class WorkloadImpactsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkloadImpactsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public WorkloadImpactsRestOperations(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 ?? "2024-05-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string workloadImpactName, WorkloadImpactData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/workloadImpacts/", false); + uri.AppendPath(workloadImpactName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string workloadImpactName, WorkloadImpactData 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("/providers/Microsoft.Impact/workloadImpacts/", false); + uri.AppendPath(workloadImpactName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a WorkloadImpact. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string workloadImpactName, WorkloadImpactData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, workloadImpactName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a WorkloadImpact. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string workloadImpactName, WorkloadImpactData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, workloadImpactName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string workloadImpactName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/workloadImpacts/", false); + uri.AppendPath(workloadImpactName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string workloadImpactName) + { + 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.Impact/workloadImpacts/", false); + uri.AppendPath(workloadImpactName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a WorkloadImpact. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact 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 workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + + using var message = CreateGetRequest(subscriptionId, workloadImpactName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkloadImpactData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WorkloadImpactData.DeserializeWorkloadImpactData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkloadImpactData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a WorkloadImpact. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact 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 workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + + using var message = CreateGetRequest(subscriptionId, workloadImpactName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkloadImpactData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WorkloadImpactData.DeserializeWorkloadImpactData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkloadImpactData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string workloadImpactName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/workloadImpacts/", false); + uri.AppendPath(workloadImpactName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string workloadImpactName) + { + 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("/providers/Microsoft.Impact/workloadImpacts/", false); + uri.AppendPath(workloadImpactName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a WorkloadImpact. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact 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 workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + + using var message = CreateDeleteRequest(subscriptionId, workloadImpactName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a WorkloadImpact. + /// The ID of the target subscription. The value must be an UUID. + /// workloadImpact 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 workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + + using var message = CreateDeleteRequest(subscriptionId, workloadImpactName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Impact/workloadImpacts", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + 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.Impact/workloadImpacts", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List WorkloadImpact resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + WorkloadImpactListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WorkloadImpactListResult.DeserializeWorkloadImpactListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List WorkloadImpact resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + WorkloadImpactListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WorkloadImpactListResult.DeserializeWorkloadImpactListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + 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; + } + + /// List WorkloadImpact resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + WorkloadImpactListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = WorkloadImpactListResult.DeserializeWorkloadImpactListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List WorkloadImpact resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + WorkloadImpactListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = WorkloadImpactListResult.DeserializeWorkloadImpactListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactCollection.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactCollection.cs new file mode 100644 index 000000000000..a3990e046fb9 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ImpactReporting +{ + /// + /// 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 GetWorkloadImpacts method from an instance of . + /// + public partial class WorkloadImpactCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workloadImpactClientDiagnostics; + private readonly WorkloadImpactsRestOperations _workloadImpactRestClient; + + /// Initializes a new instance of the class for mocking. + protected WorkloadImpactCollection() + { + } + + /// 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 WorkloadImpactCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workloadImpactClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ImpactReporting", WorkloadImpactResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkloadImpactResource.ResourceType, out string workloadImpactApiVersion); + _workloadImpactRestClient = new WorkloadImpactsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workloadImpactApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SubscriptionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); + } + + /// + /// Create a WorkloadImpact + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Create + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// workloadImpact resource. + /// Resource create parameters. + /// 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 workloadImpactName, WorkloadImpactData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _workloadImpactClientDiagnostics.CreateScope("WorkloadImpactCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _workloadImpactRestClient.CreateAsync(Id.SubscriptionId, workloadImpactName, data, cancellationToken).ConfigureAwait(false); + var operation = new ImpactReportingArmOperation(new WorkloadImpactOperationSource(Client), _workloadImpactClientDiagnostics, Pipeline, _workloadImpactRestClient.CreateCreateRequest(Id.SubscriptionId, workloadImpactName, 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 WorkloadImpact + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Create + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// workloadImpact resource. + /// Resource create parameters. + /// 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 workloadImpactName, WorkloadImpactData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _workloadImpactClientDiagnostics.CreateScope("WorkloadImpactCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _workloadImpactRestClient.Create(Id.SubscriptionId, workloadImpactName, data, cancellationToken); + var operation = new ImpactReportingArmOperation(new WorkloadImpactOperationSource(Client), _workloadImpactClientDiagnostics, Pipeline, _workloadImpactRestClient.CreateCreateRequest(Id.SubscriptionId, workloadImpactName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a WorkloadImpact + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// workloadImpact 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 workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + + using var scope = _workloadImpactClientDiagnostics.CreateScope("WorkloadImpactCollection.Get"); + scope.Start(); + try + { + var response = await _workloadImpactRestClient.GetAsync(Id.SubscriptionId, workloadImpactName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkloadImpactResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a WorkloadImpact + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// workloadImpact resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + + using var scope = _workloadImpactClientDiagnostics.CreateScope("WorkloadImpactCollection.Get"); + scope.Start(); + try + { + var response = _workloadImpactRestClient.Get(Id.SubscriptionId, workloadImpactName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkloadImpactResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List WorkloadImpact resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts + /// + /// + /// Operation Id + /// WorkloadImpact_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadImpactRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadImpactRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkloadImpactResource(Client, WorkloadImpactData.DeserializeWorkloadImpactData(e)), _workloadImpactClientDiagnostics, Pipeline, "WorkloadImpactCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List WorkloadImpact resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts + /// + /// + /// Operation Id + /// WorkloadImpact_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workloadImpactRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workloadImpactRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkloadImpactResource(Client, WorkloadImpactData.DeserializeWorkloadImpactData(e)), _workloadImpactClientDiagnostics, Pipeline, "WorkloadImpactCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// workloadImpact 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 workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + + using var scope = _workloadImpactClientDiagnostics.CreateScope("WorkloadImpactCollection.Exists"); + scope.Start(); + try + { + var response = await _workloadImpactRestClient.GetAsync(Id.SubscriptionId, workloadImpactName, 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}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// workloadImpact resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + + using var scope = _workloadImpactClientDiagnostics.CreateScope("WorkloadImpactCollection.Exists"); + scope.Start(); + try + { + var response = _workloadImpactRestClient.Get(Id.SubscriptionId, workloadImpactName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// workloadImpact resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + + using var scope = _workloadImpactClientDiagnostics.CreateScope("WorkloadImpactCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _workloadImpactRestClient.GetAsync(Id.SubscriptionId, workloadImpactName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkloadImpactResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// workloadImpact resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string workloadImpactName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workloadImpactName, nameof(workloadImpactName)); + + using var scope = _workloadImpactClientDiagnostics.CreateScope("WorkloadImpactCollection.GetIfExists"); + scope.Start(); + try + { + var response = _workloadImpactRestClient.Get(Id.SubscriptionId, workloadImpactName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkloadImpactResource(Client, response.Value), 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/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactData.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactData.Serialization.cs new file mode 100644 index 000000000000..e8cf2d134214 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ImpactReporting.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ImpactReporting +{ + public partial class WorkloadImpactData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkloadImpactData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + WorkloadImpactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkloadImpactData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkloadImpactData(document.RootElement, options); + } + + internal static WorkloadImpactData DeserializeWorkloadImpactData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WorkloadImpactProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = WorkloadImpactProperties.DeserializeWorkloadImpactProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkloadImpactData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WorkloadImpactData)} does not support writing '{options.Format}' format."); + } + } + + WorkloadImpactData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWorkloadImpactData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkloadImpactData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactData.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactData.cs new file mode 100644 index 000000000000..88aee464ed2d --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactData.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; +using Azure.ResourceManager.ImpactReporting.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ImpactReporting +{ + /// + /// A class representing the WorkloadImpact data model. + /// Workload Impact properties + /// + public partial class WorkloadImpactData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WorkloadImpactData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal WorkloadImpactData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WorkloadImpactProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public WorkloadImpactProperties Properties { get; set; } + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactResource.Serialization.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactResource.Serialization.cs new file mode 100644 index 000000000000..0fede991d873 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ImpactReporting +{ + public partial class WorkloadImpactResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkloadImpactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkloadImpactData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactResource.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactResource.cs new file mode 100644 index 000000000000..ed77e2ebe516 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Generated/WorkloadImpactResource.cs @@ -0,0 +1,419 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ImpactReporting +{ + /// + /// A Class representing a WorkloadImpact 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 GetWorkloadImpactResource method. + /// Otherwise you can get one from its parent resource using the GetWorkloadImpact method. + /// + public partial class WorkloadImpactResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The workloadImpactName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string workloadImpactName) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workloadImpactClientDiagnostics; + private readonly WorkloadImpactsRestOperations _workloadImpactRestClient; + private readonly WorkloadImpactData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Impact/workloadImpacts"; + + /// Initializes a new instance of the class for mocking. + protected WorkloadImpactResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkloadImpactResource(ArmClient client, WorkloadImpactData 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 WorkloadImpactResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workloadImpactClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ImpactReporting", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workloadImpactApiVersion); + _workloadImpactRestClient = new WorkloadImpactsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workloadImpactApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 WorkloadImpactData 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 InsightResources in the WorkloadImpact. + /// An object representing collection of InsightResources and their operations over a InsightResource. + public virtual InsightCollection GetInsights() + { + return GetCachedClient(client => new InsightCollection(client, Id)); + } + + /// + /// Get Insight resources by workloadImpactName and insightName + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the insight. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetInsightAsync(string insightName, CancellationToken cancellationToken = default) + { + return await GetInsights().GetAsync(insightName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get Insight resources by workloadImpactName and insightName + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}/insights/{insightName} + /// + /// + /// Operation Id + /// Insight_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the insight. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetInsight(string insightName, CancellationToken cancellationToken = default) + { + return GetInsights().Get(insightName, cancellationToken); + } + + /// + /// Get a WorkloadImpact + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workloadImpactClientDiagnostics.CreateScope("WorkloadImpactResource.Get"); + scope.Start(); + try + { + var response = await _workloadImpactRestClient.GetAsync(Id.SubscriptionId, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkloadImpactResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a WorkloadImpact + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workloadImpactClientDiagnostics.CreateScope("WorkloadImpactResource.Get"); + scope.Start(); + try + { + var response = _workloadImpactRestClient.Get(Id.SubscriptionId, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkloadImpactResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a WorkloadImpact + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Delete + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _workloadImpactClientDiagnostics.CreateScope("WorkloadImpactResource.Delete"); + scope.Start(); + try + { + var response = await _workloadImpactRestClient.DeleteAsync(Id.SubscriptionId, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _workloadImpactRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ImpactReportingArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a WorkloadImpact + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Delete + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _workloadImpactClientDiagnostics.CreateScope("WorkloadImpactResource.Delete"); + scope.Start(); + try + { + var response = _workloadImpactRestClient.Delete(Id.SubscriptionId, Id.Name, cancellationToken); + var uri = _workloadImpactRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ImpactReportingArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a WorkloadImpact + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Create + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, WorkloadImpactData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _workloadImpactClientDiagnostics.CreateScope("WorkloadImpactResource.Update"); + scope.Start(); + try + { + var response = await _workloadImpactRestClient.CreateAsync(Id.SubscriptionId, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new ImpactReportingArmOperation(new WorkloadImpactOperationSource(Client), _workloadImpactClientDiagnostics, Pipeline, _workloadImpactRestClient.CreateCreateRequest(Id.SubscriptionId, 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 a WorkloadImpact + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName} + /// + /// + /// Operation Id + /// WorkloadImpact_Create + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, WorkloadImpactData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _workloadImpactClientDiagnostics.CreateScope("WorkloadImpactResource.Update"); + scope.Start(); + try + { + var response = _workloadImpactRestClient.Create(Id.SubscriptionId, Id.Name, data, cancellationToken); + var operation = new ImpactReportingArmOperation(new WorkloadImpactOperationSource(Client), _workloadImpactClientDiagnostics, Pipeline, _workloadImpactRestClient.CreateCreateRequest(Id.SubscriptionId, 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/impactreporting/Azure.ResourceManager.ImpactReporting/src/Properties/AssemblyInfo.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..e5dd7e731e1b --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.ImpactReporting.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("ImpactReporting")] diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/tests/Azure.ResourceManager.ImpactReporting.Tests.csproj b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/tests/Azure.ResourceManager.ImpactReporting.Tests.csproj new file mode 100644 index 000000000000..bb52a13a69e6 --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/tests/Azure.ResourceManager.ImpactReporting.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/tests/ImpactReportingManagementTestBase.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/tests/ImpactReportingManagementTestBase.cs new file mode 100644 index 000000000000..5c2bc05c5d1a --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/tests/ImpactReportingManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.ImpactReporting.Tests +{ + public class ImpactReportingManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected ImpactReportingManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected ImpactReportingManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + 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/impactreporting/Azure.ResourceManager.ImpactReporting/tests/ImpactReportingManagementTestEnvironment.cs b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/tests/ImpactReportingManagementTestEnvironment.cs new file mode 100644 index 000000000000..ac5b6e7c9f9b --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/tests/ImpactReportingManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.ImpactReporting.Tests +{ + public class ImpactReportingManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/tsp-location.yaml b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/tsp-location.yaml new file mode 100644 index 000000000000..04be6e8fcf7a --- /dev/null +++ b/sdk/impactreporting/Azure.ResourceManager.ImpactReporting/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/impact/Impact.Management +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/impactreporting/ci.mgmt.yml b/sdk/impactreporting/ci.mgmt.yml new file mode 100644 index 000000000000..f476798de69a --- /dev/null +++ b/sdk/impactreporting/ci.mgmt.yml @@ -0,0 +1,26 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/impactreporting /ci.mgmt.yml + - sdk/impactreporting /Azure.ResourceManager.ImpactReporting / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: impactreporting + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.ImpactReporting + safeName: AzureResourceManagerImpactReporting diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/Configuration.json b/sdk/iotoperations/Azure.ResourceManager.IotOperations/Configuration.json new file mode 100644 index 000000000000..c0e9288ec7c4 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/Configuration.json @@ -0,0 +1,12 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.IotOperations", + "library-name": "Azure.ResourceManager.IotOperations", + "flavor": "azure", + "use-model-reader-writer": true, + "shared-source-folders": [ + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared", + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "azure-arm": true +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/tsp-location.yaml b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tsp-location.yaml index b4d6fcce59d8..7c548cb5970e 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/tsp-location.yaml +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/iotoperations/IoTOperations.Management -commit: a570eb7b5643099a4c210b2e7b7d2fd3038f8c74 +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/tspCodeModel.json b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tspCodeModel.json new file mode 100644 index 000000000000..b22460f90ded --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tspCodeModel.json @@ -0,0 +1,68968 @@ +{ + "$id": "1", + "Name": "Microsoft.IoTOperations", + "ApiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "Enums": [ + { + "$id": "2", + "kind": "enum", + "name": "DataflowEndpointType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.EndpointType", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "DataExplorer", + "value": "DataExplorer", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Azure Data Explorer Type", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "DataLakeStorage", + "value": "DataLakeStorage", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Azure Data Lake Type", + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "FabricOneLake", + "value": "FabricOneLake", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Microsoft Fabric Type", + "decorators": [] + }, + { + "$id": "10", + "kind": "enumvalue", + "name": "Kafka", + "value": "Kafka", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Kafka Type", + "decorators": [] + }, + { + "$id": "12", + "kind": "enumvalue", + "name": "LocalStorage", + "value": "LocalStorage", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Local Storage Type", + "decorators": [] + }, + { + "$id": "14", + "kind": "enumvalue", + "name": "Mqtt", + "value": "Mqtt", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Broker Type", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "DataflowEndpoint Type properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "16", + "kind": "enum", + "name": "DataExplorerAuthMethod", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataExplorerAuthMethod", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "18", + "kind": "enumvalue", + "name": "SystemAssignedManagedIdentity", + "value": "SystemAssignedManagedIdentity", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "16" + }, + "doc": "SystemAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "UserAssignedManagedIdentity", + "value": "UserAssignedManagedIdentity", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "16" + }, + "doc": "UserAssignedManagedIdentity type", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "DataflowEndpoint Data Explorer Authentication Method properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "22", + "kind": "enum", + "name": "DataLakeStorageAuthMethod", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataLakeStorageAuthMethod", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "24", + "kind": "enumvalue", + "name": "SystemAssignedManagedIdentity", + "value": "SystemAssignedManagedIdentity", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "SystemAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "26", + "kind": "enumvalue", + "name": "UserAssignedManagedIdentity", + "value": "UserAssignedManagedIdentity", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "UserAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "AccessToken", + "value": "AccessToken", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "AccessToken Option", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "DataflowEndpoint Data Lake Storage Authentication Method properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "30", + "kind": "enum", + "name": "FabricOneLakeAuthMethod", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.FabricOneLakeAuthMethod", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "32", + "kind": "enumvalue", + "name": "SystemAssignedManagedIdentity", + "value": "SystemAssignedManagedIdentity", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "SystemAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "34", + "kind": "enumvalue", + "name": "UserAssignedManagedIdentity", + "value": "UserAssignedManagedIdentity", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "UserAssignedManagedIdentity type", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "DataflowEndpoint Fabric One Lake Authentication Method properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "36", + "kind": "enum", + "name": "DataflowEndpointFabricPathType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricPathType", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "38", + "kind": "enumvalue", + "name": "Files", + "value": "Files", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "36" + }, + "doc": "FILES Type", + "decorators": [] + }, + { + "$id": "40", + "kind": "enumvalue", + "name": "Tables", + "value": "Tables", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "36" + }, + "doc": "TABLES Type", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "DataflowEndpoint Fabric Path Type properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "42", + "kind": "enum", + "name": "KafkaAuthMethod", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KafkaAuthMethod", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "44", + "kind": "enumvalue", + "name": "SystemAssignedManagedIdentity", + "value": "SystemAssignedManagedIdentity", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "SystemAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "UserAssignedManagedIdentity", + "value": "UserAssignedManagedIdentity", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "UserAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "48", + "kind": "enumvalue", + "name": "Sasl", + "value": "Sasl", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "Sasl Option", + "decorators": [] + }, + { + "$id": "50", + "kind": "enumvalue", + "name": "X509Certificate", + "value": "X509Certificate", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "x509Certificate Option", + "decorators": [] + }, + { + "$id": "52", + "kind": "enumvalue", + "name": "Anonymous", + "value": "Anonymous", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "Anonymous Option", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "DataflowEndpoint Kafka Authentication Method properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "54", + "kind": "enum", + "name": "DataflowEndpointAuthenticationSaslType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationSaslType", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "56", + "kind": "enumvalue", + "name": "Plain", + "value": "Plain", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "54" + }, + "doc": "PLAIN Type", + "decorators": [] + }, + { + "$id": "58", + "kind": "enumvalue", + "name": "ScramSha256", + "value": "ScramSha256", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "54" + }, + "doc": "SCRAM_SHA_256 Type", + "decorators": [] + }, + { + "$id": "60", + "kind": "enumvalue", + "name": "ScramSha512", + "value": "ScramSha512", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "54" + }, + "doc": "SCRAM_SHA_512 Type", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "DataflowEndpoint Authentication Sasl Type properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "62", + "kind": "enum", + "name": "IotOperationsOperationalMode", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.OperationalMode", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "64", + "kind": "enumvalue", + "name": "Enabled", + "value": "Enabled", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "62" + }, + "doc": "Enabled is equivalent to True", + "decorators": [] + }, + { + "$id": "66", + "kind": "enumvalue", + "name": "Disabled", + "value": "Disabled", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "62" + }, + "doc": "Disabled is equivalent to False.", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Mode properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "68", + "kind": "enum", + "name": "DataflowEndpointKafkaCompression", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaCompression", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "70", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "NONE Option", + "decorators": [] + }, + { + "$id": "72", + "kind": "enumvalue", + "name": "Gzip", + "value": "Gzip", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Gzip Option", + "decorators": [] + }, + { + "$id": "74", + "kind": "enumvalue", + "name": "Snappy", + "value": "Snappy", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "SNAPPY Option", + "decorators": [] + }, + { + "$id": "76", + "kind": "enumvalue", + "name": "Lz4", + "value": "Lz4", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "LZ4 Option", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Kafka endpoint Compression properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "78", + "kind": "enum", + "name": "DataflowEndpointKafkaAcks", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAcks", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "80", + "kind": "enumvalue", + "name": "Zero", + "value": "Zero", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "ZERO Option", + "decorators": [] + }, + { + "$id": "82", + "kind": "enumvalue", + "name": "One", + "value": "One", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "ONE Option", + "decorators": [] + }, + { + "$id": "84", + "kind": "enumvalue", + "name": "All", + "value": "All", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "ALL Option", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "DataflowEndpoint Kafka Acks properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "86", + "kind": "enum", + "name": "DataflowEndpointKafkaPartitionStrategy", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaPartitionStrategy", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "88", + "kind": "enumvalue", + "name": "Default", + "value": "Default", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "86" + }, + "doc": "Default: Assigns messages to random partitions, using a round-robin algorithm.", + "decorators": [] + }, + { + "$id": "90", + "kind": "enumvalue", + "name": "Static", + "value": "Static", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "86" + }, + "doc": "Static: Assigns messages to a fixed partition number that's derived from the instance ID of the dataflow.", + "decorators": [] + }, + { + "$id": "92", + "kind": "enumvalue", + "name": "Topic", + "value": "Topic", + "valueType": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "86" + }, + "doc": "TOPIC Option", + "decorators": [] + }, + { + "$id": "94", + "kind": "enumvalue", + "name": "Property", + "value": "Property", + "valueType": { + "$id": "95", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "86" + }, + "doc": "PROPERTY Option", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "DataflowEndpoint Kafka Partition Strategy properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "96", + "kind": "enum", + "name": "CloudEventAttributeType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CloudEventAttributeType", + "valueType": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "98", + "kind": "enumvalue", + "name": "Propagate", + "value": "Propagate", + "valueType": { + "$id": "99", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "96" + }, + "doc": "Propagate type", + "decorators": [] + }, + { + "$id": "100", + "kind": "enumvalue", + "name": "CreateOrRemap", + "value": "CreateOrRemap", + "valueType": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "96" + }, + "doc": "CreateOrRemap type", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "How to map events to the cloud.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "102", + "kind": "enum", + "name": "MqttAuthMethod", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.MqttAuthMethod", + "valueType": { + "$id": "103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "104", + "kind": "enumvalue", + "name": "SystemAssignedManagedIdentity", + "value": "SystemAssignedManagedIdentity", + "valueType": { + "$id": "105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "102" + }, + "doc": "SystemAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "106", + "kind": "enumvalue", + "name": "UserAssignedManagedIdentity", + "value": "UserAssignedManagedIdentity", + "valueType": { + "$id": "107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "102" + }, + "doc": "UserAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "108", + "kind": "enumvalue", + "name": "ServiceAccountToken", + "value": "ServiceAccountToken", + "valueType": { + "$id": "109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "102" + }, + "doc": "ServiceAccountToken Option", + "decorators": [] + }, + { + "$id": "110", + "kind": "enumvalue", + "name": "X509Certificate", + "value": "X509Certificate", + "valueType": { + "$id": "111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "102" + }, + "doc": "x509Certificate Option", + "decorators": [] + }, + { + "$id": "112", + "kind": "enumvalue", + "name": "Anonymous", + "value": "Anonymous", + "valueType": { + "$id": "113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "102" + }, + "doc": "Anonymous Option", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "DataflowEndpoint Mqtt Authentication Method properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "114", + "kind": "enum", + "name": "BrokerProtocolType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProtocolType", + "valueType": { + "$id": "115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "116", + "kind": "enumvalue", + "name": "Mqtt", + "value": "Mqtt", + "valueType": { + "$id": "117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "114" + }, + "doc": "protocol broker", + "decorators": [] + }, + { + "$id": "118", + "kind": "enumvalue", + "name": "WebSockets", + "value": "WebSockets", + "valueType": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "114" + }, + "doc": "protocol websocket", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Broker Protocol types", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "120", + "kind": "enum", + "name": "MqttRetainType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.MqttRetainType", + "valueType": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "122", + "kind": "enumvalue", + "name": "Keep", + "value": "Keep", + "valueType": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Retain the messages.", + "decorators": [] + }, + { + "$id": "124", + "kind": "enumvalue", + "name": "Never", + "value": "Never", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Never retain messages.", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Broker Retain types", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "126", + "kind": "enum", + "name": "IotOperationsProvisioningState", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ProvisioningState", + "valueType": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "128", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "126" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "130", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "126" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "132", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "126" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + }, + { + "$id": "134", + "kind": "enumvalue", + "name": "Provisioning", + "value": "Provisioning", + "valueType": { + "$id": "135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "126" + }, + "doc": "Resource is getting provisioned.", + "decorators": [] + }, + { + "$id": "136", + "kind": "enumvalue", + "name": "Updating", + "value": "Updating", + "valueType": { + "$id": "137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "126" + }, + "doc": "Resource is Updating.", + "decorators": [] + }, + { + "$id": "138", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "126" + }, + "doc": "Resource is Deleting.", + "decorators": [] + }, + { + "$id": "140", + "kind": "enumvalue", + "name": "Accepted", + "value": "Accepted", + "valueType": { + "$id": "141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "126" + }, + "doc": "Resource has been Accepted.", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "The enum defining status of resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "142", + "kind": "enum", + "name": "IotOperationsExtendedLocationType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ExtendedLocationType", + "valueType": { + "$id": "143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "144", + "kind": "enumvalue", + "name": "CustomLocation", + "value": "CustomLocation", + "valueType": { + "$id": "145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "142" + }, + "doc": "CustomLocation type", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "The enum defining type of ExtendedLocation accepted.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "146", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "148", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "146" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "150", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "146" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "152", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "146" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "154", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "146" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "156", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "158", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "156" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "160", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "156" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "162", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "156" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "164", + "kind": "enum", + "name": "DataflowOperationType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.OperationType", + "valueType": { + "$id": "165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "166", + "kind": "enumvalue", + "name": "Source", + "value": "Source", + "valueType": { + "$id": "167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "164" + }, + "doc": "Dataflow Source Operation", + "decorators": [] + }, + { + "$id": "168", + "kind": "enumvalue", + "name": "Destination", + "value": "Destination", + "valueType": { + "$id": "169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "164" + }, + "doc": "Dataflow Destination Operation", + "decorators": [] + }, + { + "$id": "170", + "kind": "enumvalue", + "name": "BuiltInTransformation", + "value": "BuiltInTransformation", + "valueType": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "164" + }, + "doc": "Dataflow BuiltIn Transformation Operation", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Dataflow Operation Type properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "172", + "kind": "enum", + "name": "DataflowSourceSerializationFormat", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SourceSerializationFormat", + "valueType": { + "$id": "173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "174", + "kind": "enumvalue", + "name": "Json", + "value": "Json", + "valueType": { + "$id": "175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "172" + }, + "doc": "JSON Format", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Serialization Format properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "176", + "kind": "enum", + "name": "TransformationSerializationFormat", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TransformationSerializationFormat", + "valueType": { + "$id": "177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "178", + "kind": "enumvalue", + "name": "Delta", + "value": "Delta", + "valueType": { + "$id": "179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "Delta Format", + "decorators": [] + }, + { + "$id": "180", + "kind": "enumvalue", + "name": "Json", + "value": "Json", + "valueType": { + "$id": "181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "JSON Format", + "decorators": [] + }, + { + "$id": "182", + "kind": "enumvalue", + "name": "Parquet", + "value": "Parquet", + "valueType": { + "$id": "183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "Parquet Format", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Transformation Format properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "184", + "kind": "enum", + "name": "DataflowFilterType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.FilterType", + "valueType": { + "$id": "185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "186", + "kind": "enumvalue", + "name": "Filter", + "value": "Filter", + "valueType": { + "$id": "187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "184" + }, + "doc": "Filter type", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Filter Type properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "188", + "kind": "enum", + "name": "DataflowMappingType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowMappingType", + "valueType": { + "$id": "189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "190", + "kind": "enumvalue", + "name": "NewProperties", + "value": "NewProperties", + "valueType": { + "$id": "191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "188" + }, + "doc": "New Properties type", + "decorators": [] + }, + { + "$id": "192", + "kind": "enumvalue", + "name": "Rename", + "value": "Rename", + "valueType": { + "$id": "193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "188" + }, + "doc": "Rename type", + "decorators": [] + }, + { + "$id": "194", + "kind": "enumvalue", + "name": "Compute", + "value": "Compute", + "valueType": { + "$id": "195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "188" + }, + "doc": "Compute type", + "decorators": [] + }, + { + "$id": "196", + "kind": "enumvalue", + "name": "PassThrough", + "value": "PassThrough", + "valueType": { + "$id": "197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "188" + }, + "doc": "Pass-through type", + "decorators": [] + }, + { + "$id": "198", + "kind": "enumvalue", + "name": "BuiltInFunction", + "value": "BuiltInFunction", + "valueType": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "188" + }, + "doc": "Built in function type", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Dataflow type mapping properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "200", + "kind": "enum", + "name": "BrokerResourceDefinitionMethods", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResourceDefinitionMethods", + "valueType": { + "$id": "201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "202", + "kind": "enumvalue", + "name": "Connect", + "value": "Connect", + "valueType": { + "$id": "203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "doc": "Allowed Connecting to Broker", + "decorators": [] + }, + { + "$id": "204", + "kind": "enumvalue", + "name": "Publish", + "value": "Publish", + "valueType": { + "$id": "205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "doc": "Allowed Publishing to Broker", + "decorators": [] + }, + { + "$id": "206", + "kind": "enumvalue", + "name": "Subscribe", + "value": "Subscribe", + "valueType": { + "$id": "207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "200" + }, + "doc": "Allowed Subscribing to Broker", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "BrokerResourceDefinitionMethods methods allowed", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "208", + "kind": "enum", + "name": "StateStoreResourceKeyTypes", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.StateStoreResourceKeyTypes", + "valueType": { + "$id": "209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "210", + "kind": "enumvalue", + "name": "Pattern", + "value": "Pattern", + "valueType": { + "$id": "211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "208" + }, + "doc": "Key type - pattern", + "decorators": [] + }, + { + "$id": "212", + "kind": "enumvalue", + "name": "String", + "value": "String", + "valueType": { + "$id": "213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "208" + }, + "doc": "Key type - string", + "decorators": [] + }, + { + "$id": "214", + "kind": "enumvalue", + "name": "Binary", + "value": "Binary", + "valueType": { + "$id": "215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "208" + }, + "doc": "Key type - binary", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "StateStoreResourceKeyTypes properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "216", + "kind": "enum", + "name": "StateStoreResourceDefinitionMethods", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.StateStoreResourceDefinitionMethods", + "valueType": { + "$id": "217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "218", + "kind": "enumvalue", + "name": "Read", + "value": "Read", + "valueType": { + "$id": "219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "216" + }, + "doc": "Get/KeyNotify from Store", + "decorators": [] + }, + { + "$id": "220", + "kind": "enumvalue", + "name": "Write", + "value": "Write", + "valueType": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "216" + }, + "doc": "Set/Delete in Store", + "decorators": [] + }, + { + "$id": "222", + "kind": "enumvalue", + "name": "ReadWrite", + "value": "ReadWrite", + "valueType": { + "$id": "223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "216" + }, + "doc": "Allowed all operations on Store - Get/KeyNotify/Set/Delete", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "StateStoreResourceDefinitionMethods methods allowed", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "224", + "kind": "enum", + "name": "BrokerAuthenticationMethod", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationMethod", + "valueType": { + "$id": "225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "226", + "kind": "enumvalue", + "name": "Custom", + "value": "Custom", + "valueType": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "224" + }, + "doc": "Custom authentication configuration.", + "decorators": [] + }, + { + "$id": "228", + "kind": "enumvalue", + "name": "ServiceAccountToken", + "value": "ServiceAccountToken", + "valueType": { + "$id": "229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "224" + }, + "doc": "ServiceAccountToken authentication configuration.", + "decorators": [] + }, + { + "$id": "230", + "kind": "enumvalue", + "name": "X509", + "value": "X509", + "valueType": { + "$id": "231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "224" + }, + "doc": "X.509 authentication configuration.", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Broker Authentication Mode", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "232", + "kind": "enum", + "name": "TlsCertMethodMode", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsCertMethodMode", + "valueType": { + "$id": "233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "234", + "kind": "enumvalue", + "name": "Automatic", + "value": "Automatic", + "valueType": { + "$id": "235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "232" + }, + "doc": "Automatic TLS server certificate configuration.", + "decorators": [] + }, + { + "$id": "236", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$id": "237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "232" + }, + "doc": "Manual TLS server certificate configuration.", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Broker Authentication Mode", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "238", + "kind": "enum", + "name": "CertManagerIssuerKind", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerIssuerKind", + "valueType": { + "$id": "239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "240", + "kind": "enumvalue", + "name": "Issuer", + "value": "Issuer", + "valueType": { + "$id": "241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "Issuer kind.", + "decorators": [] + }, + { + "$id": "242", + "kind": "enumvalue", + "name": "ClusterIssuer", + "value": "ClusterIssuer", + "valueType": { + "$id": "243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "ClusterIssuer kind.", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "CertManagerIssuerKind properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "244", + "kind": "enum", + "name": "PrivateKeyAlgorithm", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.PrivateKeyAlgorithm", + "valueType": { + "$id": "245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "246", + "kind": "enumvalue", + "name": "Ec256", + "value": "Ec256", + "valueType": { + "$id": "247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "244" + }, + "doc": "Algorithm - ec256.", + "decorators": [] + }, + { + "$id": "248", + "kind": "enumvalue", + "name": "Ec384", + "value": "Ec384", + "valueType": { + "$id": "249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "244" + }, + "doc": "Algorithm - ec384.", + "decorators": [] + }, + { + "$id": "250", + "kind": "enumvalue", + "name": "Ec521", + "value": "Ec521", + "valueType": { + "$id": "251", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "244" + }, + "doc": "Algorithm - ec521.", + "decorators": [] + }, + { + "$id": "252", + "kind": "enumvalue", + "name": "Ed25519", + "value": "Ed25519", + "valueType": { + "$id": "253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "244" + }, + "doc": "Algorithm - ed25519.", + "decorators": [] + }, + { + "$id": "254", + "kind": "enumvalue", + "name": "Rsa2048", + "value": "Rsa2048", + "valueType": { + "$id": "255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "244" + }, + "doc": "Algorithm - rsa2048.", + "decorators": [] + }, + { + "$id": "256", + "kind": "enumvalue", + "name": "Rsa4096", + "value": "Rsa4096", + "valueType": { + "$id": "257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "244" + }, + "doc": "Algorithm - rsa4096.", + "decorators": [] + }, + { + "$id": "258", + "kind": "enumvalue", + "name": "Rsa8192", + "value": "Rsa8192", + "valueType": { + "$id": "259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "244" + }, + "doc": "Algorithm - rsa8192.", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Private key algorithm types.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "260", + "kind": "enum", + "name": "PrivateKeyRotationPolicy", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.PrivateKeyRotationPolicy", + "valueType": { + "$id": "261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "262", + "kind": "enumvalue", + "name": "Always", + "value": "Always", + "valueType": { + "$id": "263", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "260" + }, + "doc": "Rotation Policy - Always.", + "decorators": [] + }, + { + "$id": "264", + "kind": "enumvalue", + "name": "Never", + "value": "Never", + "valueType": { + "$id": "265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "260" + }, + "doc": "Rotation Policy - Never.", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Private key rotation policy.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "266", + "kind": "enum", + "name": "BlockerListenerServiceType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ServiceType", + "valueType": { + "$id": "267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "268", + "kind": "enumvalue", + "name": "ClusterIp", + "value": "ClusterIp", + "valueType": { + "$id": "269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "266" + }, + "doc": "Cluster IP Service.", + "decorators": [] + }, + { + "$id": "270", + "kind": "enumvalue", + "name": "LoadBalancer", + "value": "LoadBalancer", + "valueType": { + "$id": "271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "266" + }, + "doc": "Load Balancer Service.", + "decorators": [] + }, + { + "$id": "272", + "kind": "enumvalue", + "name": "NodePort", + "value": "NodePort", + "valueType": { + "$id": "273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "266" + }, + "doc": "Node Port Service.", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Kubernetes Service Types supported by Listener", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "274", + "kind": "enum", + "name": "SubscriberMessageDropStrategy", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SubscriberMessageDropStrategy", + "valueType": { + "$id": "275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "276", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "274" + }, + "doc": "Messages are never dropped.", + "decorators": [] + }, + { + "$id": "278", + "kind": "enumvalue", + "name": "DropOldest", + "value": "DropOldest", + "valueType": { + "$id": "279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "274" + }, + "doc": "The oldest message is dropped.", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "The enum defining strategies for dropping messages from the subscriber queue.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "280", + "kind": "enum", + "name": "BrokerOperatorValues", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.OperatorValues", + "valueType": { + "$id": "281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "282", + "kind": "enumvalue", + "name": "In", + "value": "In", + "valueType": { + "$id": "283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "280" + }, + "doc": "In operator.", + "decorators": [] + }, + { + "$id": "284", + "kind": "enumvalue", + "name": "NotIn", + "value": "NotIn", + "valueType": { + "$id": "285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "280" + }, + "doc": "NotIn operator.", + "decorators": [] + }, + { + "$id": "286", + "kind": "enumvalue", + "name": "Exists", + "value": "Exists", + "valueType": { + "$id": "287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "280" + }, + "doc": "Exists operator.", + "decorators": [] + }, + { + "$id": "288", + "kind": "enumvalue", + "name": "DoesNotExist", + "value": "DoesNotExist", + "valueType": { + "$id": "289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "280" + }, + "doc": "DoesNotExist operator.", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Valid operators are In, NotIn, Exists and DoesNotExist.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "290", + "kind": "enum", + "name": "BrokerMemoryProfile", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerMemoryProfile", + "valueType": { + "$id": "291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "292", + "kind": "enumvalue", + "name": "Tiny", + "value": "Tiny", + "valueType": { + "$id": "293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "290" + }, + "doc": "Tiny memory profile.", + "decorators": [] + }, + { + "$id": "294", + "kind": "enumvalue", + "name": "Low", + "value": "Low", + "valueType": { + "$id": "295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "290" + }, + "doc": "Low memory profile.", + "decorators": [] + }, + { + "$id": "296", + "kind": "enumvalue", + "name": "Medium", + "value": "Medium", + "valueType": { + "$id": "297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "290" + }, + "doc": "Medium memory profile.", + "decorators": [] + }, + { + "$id": "298", + "kind": "enumvalue", + "name": "High", + "value": "High", + "valueType": { + "$id": "299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "290" + }, + "doc": "High memory profile.", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "The memory profile settings of the Broker", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "300", + "kind": "enum", + "name": "InstanceFeatureMode", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceFeatureMode", + "valueType": { + "$id": "301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "302", + "kind": "enumvalue", + "name": "Stable", + "value": "Stable", + "valueType": { + "$id": "303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "300" + }, + "doc": "Opt in to enable a stable feature", + "decorators": [] + }, + { + "$id": "304", + "kind": "enumvalue", + "name": "Preview", + "value": "Preview", + "valueType": { + "$id": "305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "300" + }, + "doc": "Opt in to enable a preview feature", + "decorators": [] + }, + { + "$id": "306", + "kind": "enumvalue", + "name": "Disabled", + "value": "Disabled", + "valueType": { + "$id": "307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "300" + }, + "doc": "Opt out of a feature", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "The enum defining mode of a feature.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "308", + "kind": "enum", + "name": "ManagedServiceIdentityType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "valueType": { + "$id": "309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "310", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "308" + }, + "doc": "No managed identity.", + "decorators": [] + }, + { + "$id": "312", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$id": "313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "308" + }, + "doc": "System assigned managed identity.", + "decorators": [] + }, + { + "$id": "314", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$id": "315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "308" + }, + "doc": "User assigned managed identity.", + "decorators": [] + }, + { + "$id": "316", + "kind": "enumvalue", + "name": "SystemAssigned,UserAssigned", + "value": "SystemAssigned,UserAssigned", + "valueType": { + "$id": "317", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "308" + }, + "doc": "System and user assigned managed identity.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "318", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "320", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "318" + }, + "doc": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "322", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "323", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "318" + }, + "doc": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "324", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "318" + }, + "doc": "Indicates the operation is initiated by a user or system.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "326", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "327", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "328", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "326" + }, + "doc": "Actions are for internal-only APIs.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "330", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Versions", + "valueType": { + "$id": "331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "332", + "kind": "enumvalue", + "name": "2024-11-01", + "value": "2024-11-01", + "valueType": { + "$id": "333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "330" + }, + "doc": "2024-11-01 version", + "decorators": [] + }, + { + "$id": "334", + "kind": "enumvalue", + "name": "2025-04-01", + "value": "2025-04-01", + "valueType": { + "$id": "335", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "330" + }, + "doc": "2025-04-01 version", + "decorators": [] + } + ], + "namespace": "Microsoft.IoTOperations", + "doc": "Api versions", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "Models": [ + { + "$id": "336", + "kind": "model", + "name": "IotOperationsDataflowEndpoint", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Instance dataflowEndpoint resource", + "decorators": [], + "baseModel": { + "$id": "337", + "kind": "model", + "name": "ProxyResource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ProxyResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "decorators": [], + "baseModel": { + "$id": "338", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "339", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "type": { + "$id": "340", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", + "serializationOptions": { + "$id": "342", + "json": { + "$id": "343", + "name": "id" + } + } + }, + { + "$id": "344", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name", + "serializationOptions": { + "$id": "346", + "json": { + "$id": "347", + "name": "name" + } + } + }, + { + "$id": "348", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "349", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type", + "serializationOptions": { + "$id": "351", + "json": { + "$id": "352", + "name": "type" + } + } + }, + { + "$id": "353", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "354", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "355", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "356", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy", + "serializationOptions": { + "$id": "357", + "json": { + "$id": "358", + "name": "createdBy" + } + } + }, + { + "$id": "359", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "146" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "360", + "json": { + "$id": "361", + "name": "createdByType" + } + } + }, + { + "$id": "362", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "363", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "364", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt", + "serializationOptions": { + "$id": "365", + "json": { + "$id": "366", + "name": "createdAt" + } + } + }, + { + "$id": "367", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "368", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy", + "serializationOptions": { + "$id": "369", + "json": { + "$id": "370", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "371", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "146" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "372", + "json": { + "$id": "373", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "374", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "375", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "376", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt", + "serializationOptions": { + "$id": "377", + "json": { + "$id": "378", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "379", + "json": { + "$id": "380", + "name": "systemData" + } + } + } + ] + }, + "properties": [] + }, + "properties": [ + { + "$id": "381", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "382", + "kind": "model", + "name": "IotOperationsDataflowEndpointProperties", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowEndpoint Resource properties. NOTE - Only one type of endpoint is supported for one Resource", + "decorators": [], + "properties": [ + { + "$id": "383", + "kind": "property", + "name": "endpointType", + "serializedName": "endpointType", + "doc": "Endpoint Type.", + "type": { + "$ref": "2" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.endpointType", + "serializationOptions": { + "$id": "384", + "json": { + "$id": "385", + "name": "endpointType" + } + } + }, + { + "$id": "386", + "kind": "property", + "name": "dataExplorerSettings", + "serializedName": "dataExplorerSettings", + "doc": "Azure Data Explorer endpoint.", + "type": { + "$id": "387", + "kind": "model", + "name": "DataflowEndpointDataExplorer", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorer", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Azure Data Explorer endpoint properties", + "decorators": [], + "properties": [ + { + "$id": "388", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Authentication configuration. NOTE - only authentication property is allowed per entry.", + "type": { + "$id": "389", + "kind": "model", + "name": "DataflowEndpointDataExplorerAuthentication", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorerAuthentication", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Azure Data Explorer Authentication properties. NOTE - only authentication property is allowed per entry.", + "decorators": [], + "properties": [ + { + "$id": "390", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Mode of Authentication.", + "type": { + "$ref": "16" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorerAuthentication.method", + "serializationOptions": { + "$id": "391", + "json": { + "$id": "392", + "name": "method" + } + } + }, + { + "$id": "393", + "kind": "property", + "name": "systemAssignedManagedIdentitySettings", + "serializedName": "systemAssignedManagedIdentitySettings", + "doc": "System-assigned managed identity authentication.", + "type": { + "$id": "394", + "kind": "model", + "name": "DataflowEndpointAuthenticationSystemAssignedManagedIdentity", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowEndpoint Authentication SystemAssignedManagedIdentity properties", + "decorators": [], + "properties": [ + { + "$id": "395", + "kind": "property", + "name": "audience", + "serializedName": "audience", + "doc": "Audience of the service to authenticate against. Optional; defaults to the audience for Service host configuration.", + "type": { + "$id": "396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity.audience", + "serializationOptions": { + "$id": "397", + "json": { + "$id": "398", + "name": "audience" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorerAuthentication.systemAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "399", + "json": { + "$id": "400", + "name": "systemAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "401", + "kind": "property", + "name": "userAssignedManagedIdentitySettings", + "serializedName": "userAssignedManagedIdentitySettings", + "doc": "User-assigned managed identity authentication.", + "type": { + "$id": "402", + "kind": "model", + "name": "DataflowEndpointAuthenticationUserAssignedManagedIdentity", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowEndpoint Authentication UserAssignedManagedIdentity properties", + "decorators": [], + "properties": [ + { + "$id": "403", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "Client ID for the user-assigned managed identity.", + "type": { + "$id": "404", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity.clientId", + "serializationOptions": { + "$id": "405", + "json": { + "$id": "406", + "name": "clientId" + } + } + }, + { + "$id": "407", + "kind": "property", + "name": "scope", + "serializedName": "scope", + "doc": "Resource identifier (application ID URI) of the resource, affixed with the .default suffix.", + "type": { + "$id": "408", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity.scope", + "serializationOptions": { + "$id": "409", + "json": { + "$id": "410", + "name": "scope" + } + } + }, + { + "$id": "411", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "Tenant ID.", + "type": { + "$id": "412", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity.tenantId", + "serializationOptions": { + "$id": "413", + "json": { + "$id": "414", + "name": "tenantId" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorerAuthentication.userAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "415", + "json": { + "$id": "416", + "name": "userAssignedManagedIdentitySettings" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorer.authentication", + "serializationOptions": { + "$id": "417", + "json": { + "$id": "418", + "name": "authentication" + } + } + }, + { + "$id": "419", + "kind": "property", + "name": "database", + "serializedName": "database", + "doc": "Database name.", + "type": { + "$id": "420", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorer.database", + "serializationOptions": { + "$id": "421", + "json": { + "$id": "422", + "name": "database" + } + } + }, + { + "$id": "423", + "kind": "property", + "name": "host", + "serializedName": "host", + "doc": "Host of the Azure Data Explorer in the form of ..kusto.windows.net .", + "type": { + "$id": "424", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorer.host", + "serializationOptions": { + "$id": "425", + "json": { + "$id": "426", + "name": "host" + } + } + }, + { + "$id": "427", + "kind": "property", + "name": "batching", + "serializedName": "batching", + "doc": "Azure Data Explorer endpoint batching configuration.", + "type": { + "$id": "428", + "kind": "model", + "name": "IotOperationsBatchingConfig", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BatchingConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Batching configuration", + "decorators": [], + "properties": [ + { + "$id": "429", + "kind": "property", + "name": "latencySeconds", + "serializedName": "latencySeconds", + "doc": "Batching latency in seconds.", + "type": { + "$id": "430", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BatchingConfiguration.latencySeconds", + "serializationOptions": { + "$id": "431", + "json": { + "$id": "432", + "name": "latencySeconds" + } + } + }, + { + "$id": "433", + "kind": "property", + "name": "maxMessages", + "serializedName": "maxMessages", + "doc": "Maximum number of messages in a batch.", + "type": { + "$id": "434", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BatchingConfiguration.maxMessages", + "serializationOptions": { + "$id": "435", + "json": { + "$id": "436", + "name": "maxMessages" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorer.batching", + "serializationOptions": { + "$id": "437", + "json": { + "$id": "438", + "name": "batching" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.dataExplorerSettings", + "serializationOptions": { + "$id": "439", + "json": { + "$id": "440", + "name": "dataExplorerSettings" + } + } + }, + { + "$id": "441", + "kind": "property", + "name": "dataLakeStorageSettings", + "serializedName": "dataLakeStorageSettings", + "doc": "Azure Data Lake endpoint.", + "type": { + "$id": "442", + "kind": "model", + "name": "DataflowEndpointDataLakeStorage", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorage", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Azure Data Lake endpoint properties", + "decorators": [], + "properties": [ + { + "$id": "443", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Authentication configuration. NOTE - only authentication property is allowed per entry.", + "type": { + "$id": "444", + "kind": "model", + "name": "DataflowEndpointDataLakeStorageAuthentication", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorageAuthentication", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Azure Data Lake endpoint Authentication properties. NOTE Enum - Only one method is supported for one entry", + "decorators": [], + "properties": [ + { + "$id": "445", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Mode of Authentication.", + "type": { + "$ref": "22" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorageAuthentication.method", + "serializationOptions": { + "$id": "446", + "json": { + "$id": "447", + "name": "method" + } + } + }, + { + "$id": "448", + "kind": "property", + "name": "accessTokenSettings", + "serializedName": "accessTokenSettings", + "doc": "SAS token authentication.", + "type": { + "$id": "449", + "kind": "model", + "name": "DataflowEndpointAuthenticationAccessToken", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationAccessToken", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowEndpoint Authentication Access Token properties", + "decorators": [], + "properties": [ + { + "$id": "450", + "kind": "property", + "name": "secretRef", + "serializedName": "secretRef", + "doc": "Token secret name.", + "type": { + "$id": "451", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationAccessToken.secretRef", + "serializationOptions": { + "$id": "452", + "json": { + "$id": "453", + "name": "secretRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorageAuthentication.accessTokenSettings", + "serializationOptions": { + "$id": "454", + "json": { + "$id": "455", + "name": "accessTokenSettings" + } + } + }, + { + "$id": "456", + "kind": "property", + "name": "systemAssignedManagedIdentitySettings", + "serializedName": "systemAssignedManagedIdentitySettings", + "doc": "System-assigned managed identity authentication.", + "type": { + "$ref": "394" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorageAuthentication.systemAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "457", + "json": { + "$id": "458", + "name": "systemAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "459", + "kind": "property", + "name": "userAssignedManagedIdentitySettings", + "serializedName": "userAssignedManagedIdentitySettings", + "doc": "User-assigned managed identity authentication.", + "type": { + "$ref": "402" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorageAuthentication.userAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "460", + "json": { + "$id": "461", + "name": "userAssignedManagedIdentitySettings" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorage.authentication", + "serializationOptions": { + "$id": "462", + "json": { + "$id": "463", + "name": "authentication" + } + } + }, + { + "$id": "464", + "kind": "property", + "name": "host", + "serializedName": "host", + "doc": "Host of the Azure Data Lake in the form of .blob.core.windows.net .", + "type": { + "$id": "465", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorage.host", + "serializationOptions": { + "$id": "466", + "json": { + "$id": "467", + "name": "host" + } + } + }, + { + "$id": "468", + "kind": "property", + "name": "batching", + "serializedName": "batching", + "doc": "Azure Data Lake endpoint batching configuration.", + "type": { + "$ref": "428" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorage.batching", + "serializationOptions": { + "$id": "469", + "json": { + "$id": "470", + "name": "batching" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.dataLakeStorageSettings", + "serializationOptions": { + "$id": "471", + "json": { + "$id": "472", + "name": "dataLakeStorageSettings" + } + } + }, + { + "$id": "473", + "kind": "property", + "name": "fabricOneLakeSettings", + "serializedName": "fabricOneLakeSettings", + "doc": "Microsoft Fabric endpoint.", + "type": { + "$id": "474", + "kind": "model", + "name": "DataflowEndpointFabricOneLake", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Microsoft Fabric endpoint properties", + "decorators": [], + "properties": [ + { + "$id": "475", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Authentication configuration. NOTE - only one authentication property is allowed per entry.", + "type": { + "$id": "476", + "kind": "model", + "name": "DataflowEndpointFabricOneLakeAuthentication", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeAuthentication", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Microsoft Fabric endpoint. Authentication properties. NOTE - Only one method is supported for one entry", + "decorators": [], + "properties": [ + { + "$id": "477", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Mode of Authentication.", + "type": { + "$ref": "30" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeAuthentication.method", + "serializationOptions": { + "$id": "478", + "json": { + "$id": "479", + "name": "method" + } + } + }, + { + "$id": "480", + "kind": "property", + "name": "systemAssignedManagedIdentitySettings", + "serializedName": "systemAssignedManagedIdentitySettings", + "doc": "System-assigned managed identity authentication.", + "type": { + "$ref": "394" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeAuthentication.systemAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "481", + "json": { + "$id": "482", + "name": "systemAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "483", + "kind": "property", + "name": "userAssignedManagedIdentitySettings", + "serializedName": "userAssignedManagedIdentitySettings", + "doc": "User-assigned managed identity authentication.", + "type": { + "$ref": "402" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeAuthentication.userAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "484", + "json": { + "$id": "485", + "name": "userAssignedManagedIdentitySettings" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake.authentication", + "serializationOptions": { + "$id": "486", + "json": { + "$id": "487", + "name": "authentication" + } + } + }, + { + "$id": "488", + "kind": "property", + "name": "names", + "serializedName": "names", + "doc": "Names of the workspace and lakehouse.", + "type": { + "$id": "489", + "kind": "model", + "name": "DataflowEndpointFabricOneLakeNames", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeNames", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Microsoft Fabric endpoint Names properties", + "decorators": [], + "properties": [ + { + "$id": "490", + "kind": "property", + "name": "lakehouseName", + "serializedName": "lakehouseName", + "doc": "Lakehouse name.", + "type": { + "$id": "491", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeNames.lakehouseName", + "serializationOptions": { + "$id": "492", + "json": { + "$id": "493", + "name": "lakehouseName" + } + } + }, + { + "$id": "494", + "kind": "property", + "name": "workspaceName", + "serializedName": "workspaceName", + "doc": "Workspace name.", + "type": { + "$id": "495", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeNames.workspaceName", + "serializationOptions": { + "$id": "496", + "json": { + "$id": "497", + "name": "workspaceName" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake.names", + "serializationOptions": { + "$id": "498", + "json": { + "$id": "499", + "name": "names" + } + } + }, + { + "$id": "500", + "kind": "property", + "name": "oneLakePathType", + "serializedName": "oneLakePathType", + "doc": "Type of location of the data in the workspace. Can be either tables or files.", + "type": { + "$ref": "36" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake.oneLakePathType", + "serializationOptions": { + "$id": "501", + "json": { + "$id": "502", + "name": "oneLakePathType" + } + } + }, + { + "$id": "503", + "kind": "property", + "name": "host", + "serializedName": "host", + "doc": "Host of the Microsoft Fabric in the form of https://.fabric.microsoft.com.", + "type": { + "$id": "504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake.host", + "serializationOptions": { + "$id": "505", + "json": { + "$id": "506", + "name": "host" + } + } + }, + { + "$id": "507", + "kind": "property", + "name": "batching", + "serializedName": "batching", + "doc": "Batching configuration.", + "type": { + "$ref": "428" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake.batching", + "serializationOptions": { + "$id": "508", + "json": { + "$id": "509", + "name": "batching" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.fabricOneLakeSettings", + "serializationOptions": { + "$id": "510", + "json": { + "$id": "511", + "name": "fabricOneLakeSettings" + } + } + }, + { + "$id": "512", + "kind": "property", + "name": "kafkaSettings", + "serializedName": "kafkaSettings", + "doc": "Kafka endpoint.", + "type": { + "$id": "513", + "kind": "model", + "name": "DataflowEndpointKafka", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Kafka endpoint properties", + "decorators": [], + "properties": [ + { + "$id": "514", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Authentication configuration. NOTE - only authentication property is allowed per entry.", + "type": { + "$id": "515", + "kind": "model", + "name": "DataflowEndpointKafkaAuthentication", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Kafka endpoint Authentication properties. NOTE - only authentication property is allowed per entry", + "decorators": [], + "properties": [ + { + "$id": "516", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Mode of Authentication.", + "type": { + "$ref": "42" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication.method", + "serializationOptions": { + "$id": "517", + "json": { + "$id": "518", + "name": "method" + } + } + }, + { + "$id": "519", + "kind": "property", + "name": "systemAssignedManagedIdentitySettings", + "serializedName": "systemAssignedManagedIdentitySettings", + "doc": "System-assigned managed identity authentication.", + "type": { + "$ref": "394" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication.systemAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "520", + "json": { + "$id": "521", + "name": "systemAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "522", + "kind": "property", + "name": "userAssignedManagedIdentitySettings", + "serializedName": "userAssignedManagedIdentitySettings", + "doc": "User-assigned managed identity authentication.", + "type": { + "$ref": "402" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication.userAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "523", + "json": { + "$id": "524", + "name": "userAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "525", + "kind": "property", + "name": "saslSettings", + "serializedName": "saslSettings", + "doc": "SASL authentication.", + "type": { + "$id": "526", + "kind": "model", + "name": "DataflowEndpointAuthenticationSasl", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationSasl", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowEndpoint Authentication Sasl properties", + "decorators": [], + "properties": [ + { + "$id": "527", + "kind": "property", + "name": "saslType", + "serializedName": "saslType", + "doc": "Type of SASL authentication. Can be PLAIN, SCRAM-SHA-256, or SCRAM-SHA-512.", + "type": { + "$ref": "54" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationSasl.saslType", + "serializationOptions": { + "$id": "528", + "json": { + "$id": "529", + "name": "saslType" + } + } + }, + { + "$id": "530", + "kind": "property", + "name": "secretRef", + "serializedName": "secretRef", + "doc": "Token secret name.", + "type": { + "$id": "531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationSasl.secretRef", + "serializationOptions": { + "$id": "532", + "json": { + "$id": "533", + "name": "secretRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication.saslSettings", + "serializationOptions": { + "$id": "534", + "json": { + "$id": "535", + "name": "saslSettings" + } + } + }, + { + "$id": "536", + "kind": "property", + "name": "x509CertificateSettings", + "serializedName": "x509CertificateSettings", + "doc": "X.509 certificate authentication.", + "type": { + "$id": "537", + "kind": "model", + "name": "DataflowEndpointAuthenticationX509", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationX509", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowEndpoint Authentication X509 properties", + "decorators": [], + "properties": [ + { + "$id": "538", + "kind": "property", + "name": "secretRef", + "serializedName": "secretRef", + "doc": "Secret reference of the X.509 certificate.", + "type": { + "$id": "539", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationX509.secretRef", + "serializationOptions": { + "$id": "540", + "json": { + "$id": "541", + "name": "secretRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication.x509CertificateSettings", + "serializationOptions": { + "$id": "542", + "json": { + "$id": "543", + "name": "x509CertificateSettings" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.authentication", + "serializationOptions": { + "$id": "544", + "json": { + "$id": "545", + "name": "authentication" + } + } + }, + { + "$id": "546", + "kind": "property", + "name": "consumerGroupId", + "serializedName": "consumerGroupId", + "doc": "Consumer group ID.", + "type": { + "$id": "547", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.consumerGroupId", + "serializationOptions": { + "$id": "548", + "json": { + "$id": "549", + "name": "consumerGroupId" + } + } + }, + { + "$id": "550", + "kind": "property", + "name": "host", + "serializedName": "host", + "doc": "Kafka endpoint host.", + "type": { + "$id": "551", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.host", + "serializationOptions": { + "$id": "552", + "json": { + "$id": "553", + "name": "host" + } + } + }, + { + "$id": "554", + "kind": "property", + "name": "batching", + "serializedName": "batching", + "doc": "Batching configuration.", + "type": { + "$id": "555", + "kind": "model", + "name": "DataflowEndpointKafkaBatching", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaBatching", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Kafka endpoint Batching properties", + "decorators": [], + "properties": [ + { + "$id": "556", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "Mode for batching.", + "type": { + "$ref": "62" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaBatching.mode", + "serializationOptions": { + "$id": "557", + "json": { + "$id": "558", + "name": "mode" + } + } + }, + { + "$id": "559", + "kind": "property", + "name": "latencyMs", + "serializedName": "latencyMs", + "doc": "Batching latency in milliseconds.", + "type": { + "$id": "560", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaBatching.latencyMs", + "serializationOptions": { + "$id": "561", + "json": { + "$id": "562", + "name": "latencyMs" + } + } + }, + { + "$id": "563", + "kind": "property", + "name": "maxBytes", + "serializedName": "maxBytes", + "doc": "Maximum number of bytes in a batch.", + "type": { + "$id": "564", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaBatching.maxBytes", + "serializationOptions": { + "$id": "565", + "json": { + "$id": "566", + "name": "maxBytes" + } + } + }, + { + "$id": "567", + "kind": "property", + "name": "maxMessages", + "serializedName": "maxMessages", + "doc": "Maximum number of messages in a batch.", + "type": { + "$id": "568", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaBatching.maxMessages", + "serializationOptions": { + "$id": "569", + "json": { + "$id": "570", + "name": "maxMessages" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.batching", + "serializationOptions": { + "$id": "571", + "json": { + "$id": "572", + "name": "batching" + } + } + }, + { + "$id": "573", + "kind": "property", + "name": "copyMqttProperties", + "serializedName": "copyMqttProperties", + "doc": "Copy Broker properties. No effect if the endpoint is used as a source or if the dataflow doesn't have an Broker source.", + "type": { + "$ref": "62" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.copyMqttProperties", + "serializationOptions": { + "$id": "574", + "json": { + "$id": "575", + "name": "copyMqttProperties" + } + } + }, + { + "$id": "576", + "kind": "property", + "name": "compression", + "serializedName": "compression", + "doc": "Compression. Can be none, gzip, lz4, or snappy. No effect if the endpoint is used as a source.", + "type": { + "$ref": "68" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.compression", + "serializationOptions": { + "$id": "577", + "json": { + "$id": "578", + "name": "compression" + } + } + }, + { + "$id": "579", + "kind": "property", + "name": "kafkaAcks", + "serializedName": "kafkaAcks", + "doc": "Kafka acks. Can be all, one, or zero. No effect if the endpoint is used as a source.", + "type": { + "$ref": "78" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.kafkaAcks", + "serializationOptions": { + "$id": "580", + "json": { + "$id": "581", + "name": "kafkaAcks" + } + } + }, + { + "$id": "582", + "kind": "property", + "name": "partitionStrategy", + "serializedName": "partitionStrategy", + "doc": "Partition handling strategy. Can be default or static. No effect if the endpoint is used as a source.", + "type": { + "$ref": "86" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.partitionStrategy", + "serializationOptions": { + "$id": "583", + "json": { + "$id": "584", + "name": "partitionStrategy" + } + } + }, + { + "$id": "585", + "kind": "property", + "name": "tls", + "serializedName": "tls", + "doc": "TLS configuration.", + "type": { + "$id": "586", + "kind": "model", + "name": "IotOperationsTlsProperties", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Tls properties", + "decorators": [], + "properties": [ + { + "$id": "587", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "Mode for TLS.", + "type": { + "$ref": "62" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsProperties.mode", + "serializationOptions": { + "$id": "588", + "json": { + "$id": "589", + "name": "mode" + } + } + }, + { + "$id": "590", + "kind": "property", + "name": "trustedCaCertificateConfigMapRef", + "serializedName": "trustedCaCertificateConfigMapRef", + "doc": "Trusted CA certificate config map.", + "type": { + "$id": "591", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsProperties.trustedCaCertificateConfigMapRef", + "serializationOptions": { + "$id": "592", + "json": { + "$id": "593", + "name": "trustedCaCertificateConfigMapRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.tls", + "serializationOptions": { + "$id": "594", + "json": { + "$id": "595", + "name": "tls" + } + } + }, + { + "$id": "596", + "kind": "property", + "name": "cloudEventAttributes", + "serializedName": "cloudEventAttributes", + "doc": "Cloud event mapping config.", + "type": { + "$ref": "96" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.cloudEventAttributes", + "serializationOptions": { + "$id": "597", + "json": { + "$id": "598", + "name": "cloudEventAttributes" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.kafkaSettings", + "serializationOptions": { + "$id": "599", + "json": { + "$id": "600", + "name": "kafkaSettings" + } + } + }, + { + "$id": "601", + "kind": "property", + "name": "localStorageSettings", + "serializedName": "localStorageSettings", + "doc": "Local persistent volume endpoint.", + "type": { + "$id": "602", + "kind": "model", + "name": "DataflowEndpointLocalStorage", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointLocalStorage", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Local persistent volume endpoint properties", + "decorators": [], + "properties": [ + { + "$id": "603", + "kind": "property", + "name": "persistentVolumeClaimRef", + "serializedName": "persistentVolumeClaimRef", + "doc": "Persistent volume claim name.", + "type": { + "$id": "604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointLocalStorage.persistentVolumeClaimRef", + "serializationOptions": { + "$id": "605", + "json": { + "$id": "606", + "name": "persistentVolumeClaimRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.localStorageSettings", + "serializationOptions": { + "$id": "607", + "json": { + "$id": "608", + "name": "localStorageSettings" + } + } + }, + { + "$id": "609", + "kind": "property", + "name": "mqttSettings", + "serializedName": "mqttSettings", + "doc": "Broker endpoint.", + "type": { + "$id": "610", + "kind": "model", + "name": "DataflowEndpointMqtt", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker endpoint properties", + "decorators": [], + "properties": [ + { + "$id": "611", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "authentication properties. DEFAULT: kubernetes.audience=aio-internal. NOTE - Enum field only property is allowed", + "type": { + "$id": "612", + "kind": "model", + "name": "DataflowEndpointMqttAuthentication", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Mqtt endpoint Authentication properties. NOTE - only authentication property is allowed per entry.", + "decorators": [], + "properties": [ + { + "$id": "613", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Mode of Authentication.", + "type": { + "$ref": "102" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication.method", + "serializationOptions": { + "$id": "614", + "json": { + "$id": "615", + "name": "method" + } + } + }, + { + "$id": "616", + "kind": "property", + "name": "systemAssignedManagedIdentitySettings", + "serializedName": "systemAssignedManagedIdentitySettings", + "doc": "System-assigned managed identity authentication.", + "type": { + "$ref": "394" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication.systemAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "617", + "json": { + "$id": "618", + "name": "systemAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "619", + "kind": "property", + "name": "userAssignedManagedIdentitySettings", + "serializedName": "userAssignedManagedIdentitySettings", + "doc": "User-assigned managed identity authentication.", + "type": { + "$ref": "402" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication.userAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "620", + "json": { + "$id": "621", + "name": "userAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "622", + "kind": "property", + "name": "serviceAccountTokenSettings", + "serializedName": "serviceAccountTokenSettings", + "doc": "Kubernetes service account token authentication. Default audience if not set is aio-internal", + "type": { + "$id": "623", + "kind": "model", + "name": "DataflowEndpointAuthenticationServiceAccountToken", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationServiceAccountToken", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Service Account Token for BrokerAuthentication", + "decorators": [], + "properties": [ + { + "$id": "624", + "kind": "property", + "name": "audience", + "serializedName": "audience", + "doc": "Audience of the service account. Optional, defaults to the broker internal service account audience.", + "type": { + "$id": "625", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationServiceAccountToken.audience", + "serializationOptions": { + "$id": "626", + "json": { + "$id": "627", + "name": "audience" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication.serviceAccountTokenSettings", + "serializationOptions": { + "$id": "628", + "json": { + "$id": "629", + "name": "serviceAccountTokenSettings" + } + } + }, + { + "$id": "630", + "kind": "property", + "name": "x509CertificateSettings", + "serializedName": "x509CertificateSettings", + "doc": "X.509 certificate authentication.", + "type": { + "$ref": "537" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication.x509CertificateSettings", + "serializationOptions": { + "$id": "631", + "json": { + "$id": "632", + "name": "x509CertificateSettings" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.authentication", + "serializationOptions": { + "$id": "633", + "json": { + "$id": "634", + "name": "authentication" + } + } + }, + { + "$id": "635", + "kind": "property", + "name": "clientIdPrefix", + "serializedName": "clientIdPrefix", + "doc": "Client ID prefix. Client ID generated by the dataflow is -TBD. Optional; no prefix if omitted.", + "type": { + "$id": "636", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.clientIdPrefix", + "serializationOptions": { + "$id": "637", + "json": { + "$id": "638", + "name": "clientIdPrefix" + } + } + }, + { + "$id": "639", + "kind": "property", + "name": "host", + "serializedName": "host", + "doc": "Host of the Broker in the form of :. Optional; connects to Broker if omitted.", + "type": { + "$id": "640", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.host", + "serializationOptions": { + "$id": "641", + "json": { + "$id": "642", + "name": "host" + } + } + }, + { + "$id": "643", + "kind": "property", + "name": "protocol", + "serializedName": "protocol", + "doc": "Enable or disable websockets.", + "type": { + "$ref": "114" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.protocol", + "serializationOptions": { + "$id": "644", + "json": { + "$id": "645", + "name": "protocol" + } + } + }, + { + "$id": "646", + "kind": "property", + "name": "keepAliveSeconds", + "serializedName": "keepAliveSeconds", + "doc": "Broker KeepAlive for connection in seconds.", + "type": { + "$id": "647", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.keepAliveSeconds", + "serializationOptions": { + "$id": "648", + "json": { + "$id": "649", + "name": "keepAliveSeconds" + } + } + }, + { + "$id": "650", + "kind": "property", + "name": "retain", + "serializedName": "retain", + "doc": "Whether or not to keep the retain setting.", + "type": { + "$ref": "120" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.retain", + "serializationOptions": { + "$id": "651", + "json": { + "$id": "652", + "name": "retain" + } + } + }, + { + "$id": "653", + "kind": "property", + "name": "maxInflightMessages", + "serializedName": "maxInflightMessages", + "doc": "The max number of messages to keep in flight. For subscribe, this is the receive maximum. For publish, this is the maximum number of messages to send before waiting for an ack.", + "type": { + "$id": "654", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.maxInflightMessages", + "serializationOptions": { + "$id": "655", + "json": { + "$id": "656", + "name": "maxInflightMessages" + } + } + }, + { + "$id": "657", + "kind": "property", + "name": "qos", + "serializedName": "qos", + "doc": "Qos for Broker connection.", + "type": { + "$id": "658", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.qos", + "serializationOptions": { + "$id": "659", + "json": { + "$id": "660", + "name": "qos" + } + } + }, + { + "$id": "661", + "kind": "property", + "name": "sessionExpirySeconds", + "serializedName": "sessionExpirySeconds", + "doc": "Session expiry in seconds.", + "type": { + "$id": "662", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.sessionExpirySeconds", + "serializationOptions": { + "$id": "663", + "json": { + "$id": "664", + "name": "sessionExpirySeconds" + } + } + }, + { + "$id": "665", + "kind": "property", + "name": "tls", + "serializedName": "tls", + "doc": "TLS configuration.", + "type": { + "$ref": "586" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.tls", + "serializationOptions": { + "$id": "666", + "json": { + "$id": "667", + "name": "tls" + } + } + }, + { + "$id": "668", + "kind": "property", + "name": "cloudEventAttributes", + "serializedName": "cloudEventAttributes", + "doc": "Cloud event mapping config.", + "type": { + "$ref": "96" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.cloudEventAttributes", + "serializationOptions": { + "$id": "669", + "json": { + "$id": "670", + "name": "cloudEventAttributes" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.mqttSettings", + "serializationOptions": { + "$id": "671", + "json": { + "$id": "672", + "name": "mqttSettings" + } + } + }, + { + "$id": "673", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "126" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.provisioningState", + "serializationOptions": { + "$id": "674", + "json": { + "$id": "675", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointResource.properties", + "serializationOptions": { + "$id": "676", + "json": { + "$id": "677", + "name": "properties" + } + } + }, + { + "$id": "678", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$id": "679", + "kind": "model", + "name": "IotOperationsExtendedLocation", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ExtendedLocation", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Extended location is an extension of Azure locations. They provide a way to use their Azure ARC enabled Kubernetes clusters as target locations for deploying Azure services instances.", + "decorators": [], + "properties": [ + { + "$id": "680", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the extended location.", + "type": { + "$id": "681", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ExtendedLocation.name", + "serializationOptions": { + "$id": "682", + "json": { + "$id": "683", + "name": "name" + } + } + }, + { + "$id": "684", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Type of ExtendedLocation.", + "type": { + "$ref": "142" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ExtendedLocation.type", + "serializationOptions": { + "$id": "685", + "json": { + "$id": "686", + "name": "type" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointResource.extendedLocation", + "serializationOptions": { + "$id": "687", + "json": { + "$id": "688", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "382" + }, + { + "$ref": "387" + }, + { + "$ref": "389" + }, + { + "$ref": "394" + }, + { + "$ref": "402" + }, + { + "$ref": "428" + }, + { + "$ref": "442" + }, + { + "$ref": "444" + }, + { + "$ref": "449" + }, + { + "$ref": "474" + }, + { + "$ref": "476" + }, + { + "$ref": "489" + }, + { + "$ref": "513" + }, + { + "$ref": "515" + }, + { + "$ref": "526" + }, + { + "$ref": "537" + }, + { + "$ref": "555" + }, + { + "$ref": "586" + }, + { + "$ref": "602" + }, + { + "$ref": "610" + }, + { + "$ref": "612" + }, + { + "$ref": "623" + }, + { + "$ref": "679" + }, + { + "$ref": "337" + }, + { + "$ref": "338" + }, + { + "$ref": "354" + }, + { + "$id": "689", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Error,Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "690", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "691", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "692", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "693", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", + "serializationOptions": { + "$id": "694", + "json": { + "$id": "695", + "name": "code" + } + } + }, + { + "$id": "696", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "697", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", + "serializationOptions": { + "$id": "698", + "json": { + "$id": "699", + "name": "message" + } + } + }, + { + "$id": "700", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "701", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", + "serializationOptions": { + "$id": "702", + "json": { + "$id": "703", + "name": "target" + } + } + }, + { + "$id": "704", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "705", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "691" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "706", + "json": { + "$id": "707", + "name": "details" + } + } + }, + { + "$id": "708", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "709", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "710", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "711", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "712", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", + "serializationOptions": { + "$id": "713", + "json": { + "$id": "714", + "name": "type" + } + } + }, + { + "$id": "715", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "716", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Json,Exception,LroPolling", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", + "serializationOptions": { + "$id": "717", + "json": { + "$id": "718", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "719", + "json": { + "$id": "720", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "721", + "json": { + "$id": "722", + "name": "error" + } + } + } + ] + }, + { + "$ref": "691" + }, + { + "$ref": "710" + }, + { + "$ref": "716" + }, + { + "$id": "723", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "724", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "156" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "725", + "json": { + "$id": "726", + "name": "status" + } + } + }, + { + "$id": "727", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "728", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "729", + "json": { + "$id": "730", + "name": "name" + } + } + }, + { + "$id": "731", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "732", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "733", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", + "serializationOptions": { + "$id": "734", + "json": { + "$id": "735", + "name": "startTime" + } + } + }, + { + "$id": "736", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "737", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "738", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", + "serializationOptions": { + "$id": "739", + "json": { + "$id": "740", + "name": "endTime" + } + } + }, + { + "$id": "741", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "742", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "743", + "json": { + "$id": "744", + "name": "percentComplete" + } + } + }, + { + "$id": "745", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "691" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "746", + "json": { + "$id": "747", + "name": "error" + } + } + } + ] + }, + { + "$id": "748", + "kind": "model", + "name": "DataflowEndpointResourceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a DataflowEndpointResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "749", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The DataflowEndpointResource items on this page", + "type": { + "$id": "750", + "kind": "array", + "name": "ArrayDataflowEndpointResource", + "valueType": { + "$ref": "336" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "751", + "json": { + "$id": "752", + "name": "value" + } + } + }, + { + "$id": "753", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "754", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "755", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "756", + "json": { + "$id": "757", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "758", + "kind": "model", + "name": "IotOperationsDataflow", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Instance dataflowProfile dataflow resource", + "decorators": [], + "baseModel": { + "$ref": "337" + }, + "properties": [ + { + "$id": "759", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "760", + "kind": "model", + "name": "IotOperationsDataflowProperties", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow Resource properties", + "decorators": [], + "properties": [ + { + "$id": "761", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "Mode for Dataflow. Optional; defaults to Enabled.", + "type": { + "$ref": "62" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProperties.mode", + "serializationOptions": { + "$id": "762", + "json": { + "$id": "763", + "name": "mode" + } + } + }, + { + "$id": "764", + "kind": "property", + "name": "operations", + "serializedName": "operations", + "doc": "List of operations including source and destination references as well as transformation.", + "type": { + "$id": "765", + "kind": "array", + "name": "ArrayDataflowOperation", + "valueType": { + "$id": "766", + "kind": "model", + "name": "DataflowOperationProperties", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow Operation properties. NOTE - One only method is allowed to be used for one entry.", + "decorators": [], + "properties": [ + { + "$id": "767", + "kind": "property", + "name": "operationType", + "serializedName": "operationType", + "doc": "Type of operation.", + "type": { + "$ref": "164" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation.operationType", + "serializationOptions": { + "$id": "768", + "json": { + "$id": "769", + "name": "operationType" + } + } + }, + { + "$id": "770", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Optional user provided name of the transformation.", + "type": { + "$id": "771", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation.name", + "serializationOptions": { + "$id": "772", + "json": { + "$id": "773", + "name": "name" + } + } + }, + { + "$id": "774", + "kind": "property", + "name": "sourceSettings", + "serializedName": "sourceSettings", + "doc": "Source configuration.", + "type": { + "$id": "775", + "kind": "model", + "name": "DataflowSourceOperationSettings", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowSourceOperationSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow Source Operation properties", + "decorators": [], + "properties": [ + { + "$id": "776", + "kind": "property", + "name": "endpointRef", + "serializedName": "endpointRef", + "doc": "Reference to the Dataflow Endpoint resource. Can only be of Broker and Kafka type.", + "type": { + "$id": "777", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowSourceOperationSettings.endpointRef", + "serializationOptions": { + "$id": "778", + "json": { + "$id": "779", + "name": "endpointRef" + } + } + }, + { + "$id": "780", + "kind": "property", + "name": "assetRef", + "serializedName": "assetRef", + "doc": "Reference to the resource in Azure Device Registry where the data in the endpoint originates from.", + "type": { + "$id": "781", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowSourceOperationSettings.assetRef", + "serializationOptions": { + "$id": "782", + "json": { + "$id": "783", + "name": "assetRef" + } + } + }, + { + "$id": "784", + "kind": "property", + "name": "serializationFormat", + "serializedName": "serializationFormat", + "doc": "Content is a JSON Schema. Allowed: JSON Schema/draft-7.", + "type": { + "$ref": "172" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowSourceOperationSettings.serializationFormat", + "serializationOptions": { + "$id": "785", + "json": { + "$id": "786", + "name": "serializationFormat" + } + } + }, + { + "$id": "787", + "kind": "property", + "name": "schemaRef", + "serializedName": "schemaRef", + "doc": "Schema CR reference. Data will be deserialized according to the schema, and dropped if it doesn't match.", + "type": { + "$id": "788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowSourceOperationSettings.schemaRef", + "serializationOptions": { + "$id": "789", + "json": { + "$id": "790", + "name": "schemaRef" + } + } + }, + { + "$id": "791", + "kind": "property", + "name": "dataSources", + "serializedName": "dataSources", + "doc": "List of source locations. Can be Broker or Kafka topics. Supports wildcards # and +.", + "type": { + "$id": "792", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "793", + "kind": "string", + "name": "NonEmptyString", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.NonEmptyString", + "baseType": { + "$id": "794", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowSourceOperationSettings.dataSources", + "serializationOptions": { + "$id": "795", + "json": { + "$id": "796", + "name": "dataSources" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation.sourceSettings", + "serializationOptions": { + "$id": "797", + "json": { + "$id": "798", + "name": "sourceSettings" + } + } + }, + { + "$id": "799", + "kind": "property", + "name": "builtInTransformationSettings", + "serializedName": "builtInTransformationSettings", + "doc": "Built In Transformation configuration.", + "type": { + "$id": "800", + "kind": "model", + "name": "DataflowBuiltInTransformationSettings", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow BuiltIn Transformation properties", + "decorators": [], + "properties": [ + { + "$id": "801", + "kind": "property", + "name": "serializationFormat", + "serializedName": "serializationFormat", + "doc": "Serialization format. Optional; defaults to JSON. Allowed value JSON Schema/draft-7, Parquet. Default: Json", + "type": { + "$ref": "176" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings.serializationFormat", + "serializationOptions": { + "$id": "802", + "json": { + "$id": "803", + "name": "serializationFormat" + } + } + }, + { + "$id": "804", + "kind": "property", + "name": "schemaRef", + "serializedName": "schemaRef", + "doc": "Reference to the schema that describes the output of the transformation.", + "type": { + "$id": "805", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings.schemaRef", + "serializationOptions": { + "$id": "806", + "json": { + "$id": "807", + "name": "schemaRef" + } + } + }, + { + "$id": "808", + "kind": "property", + "name": "datasets", + "serializedName": "datasets", + "doc": "Enrich data from Broker State Store. Dataset references a key in Broker State Store.", + "type": { + "$id": "809", + "kind": "array", + "name": "ArrayDataflowBuiltInTransformationDataset", + "valueType": { + "$id": "810", + "kind": "model", + "name": "DataflowBuiltInTransformationDataset", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow BuiltIn Transformation dataset properties", + "decorators": [], + "properties": [ + { + "$id": "811", + "kind": "property", + "name": "key", + "serializedName": "key", + "doc": "The key of the dataset.", + "type": { + "$id": "812", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset.key", + "serializationOptions": { + "$id": "813", + "json": { + "$id": "814", + "name": "key" + } + } + }, + { + "$id": "815", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "A user provided optional description of the dataset.", + "type": { + "$id": "816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset.description", + "serializationOptions": { + "$id": "817", + "json": { + "$id": "818", + "name": "description" + } + } + }, + { + "$id": "819", + "kind": "property", + "name": "schemaRef", + "serializedName": "schemaRef", + "doc": "The reference to the schema that describes the dataset. Allowed: JSON Schema/draft-7.", + "type": { + "$id": "820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset.schemaRef", + "serializationOptions": { + "$id": "821", + "json": { + "$id": "822", + "name": "schemaRef" + } + } + }, + { + "$id": "823", + "kind": "property", + "name": "inputs", + "serializedName": "inputs", + "doc": "List of fields for enriching from the Broker State Store.", + "type": { + "$id": "824", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "825", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset.inputs", + "serializationOptions": { + "$id": "826", + "json": { + "$id": "827", + "name": "inputs" + } + } + }, + { + "$id": "828", + "kind": "property", + "name": "expression", + "serializedName": "expression", + "doc": "Condition to enrich data from Broker State Store. Example: $1 < 0 || $1 > $2 (Assuming inputs section $1 and $2 are provided)", + "type": { + "$id": "829", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset.expression", + "serializationOptions": { + "$id": "830", + "json": { + "$id": "831", + "name": "expression" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings.datasets", + "serializationOptions": { + "$id": "832", + "json": { + "$id": "833", + "name": "datasets" + } + } + }, + { + "$id": "834", + "kind": "property", + "name": "filter", + "serializedName": "filter", + "doc": "Filters input record or datapoints based on condition.", + "type": { + "$id": "835", + "kind": "array", + "name": "ArrayDataflowBuiltInTransformationFilter", + "valueType": { + "$id": "836", + "kind": "model", + "name": "DataflowBuiltInTransformationFilter", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationFilter", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow BuiltIn Transformation filter properties", + "decorators": [], + "properties": [ + { + "$id": "837", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of dataflow operation.", + "type": { + "$ref": "184" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationFilter.type", + "serializationOptions": { + "$id": "838", + "json": { + "$id": "839", + "name": "type" + } + } + }, + { + "$id": "840", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "A user provided optional description of the filter.", + "type": { + "$id": "841", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationFilter.description", + "serializationOptions": { + "$id": "842", + "json": { + "$id": "843", + "name": "description" + } + } + }, + { + "$id": "844", + "kind": "property", + "name": "inputs", + "serializedName": "inputs", + "doc": "List of fields for filtering in JSON path expression.", + "type": { + "$id": "845", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "846", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationFilter.inputs", + "serializationOptions": { + "$id": "847", + "json": { + "$id": "848", + "name": "inputs" + } + } + }, + { + "$id": "849", + "kind": "property", + "name": "expression", + "serializedName": "expression", + "doc": "Condition to filter data. Can reference input fields with {n} where n is the index of the input field starting from 1. Example: $1 < 0 || $1 > $2 (Assuming inputs section $1 and $2 are provided)", + "type": { + "$id": "850", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationFilter.expression", + "serializationOptions": { + "$id": "851", + "json": { + "$id": "852", + "name": "expression" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings.filter", + "serializationOptions": { + "$id": "853", + "json": { + "$id": "854", + "name": "filter" + } + } + }, + { + "$id": "855", + "kind": "property", + "name": "map", + "serializedName": "map", + "doc": "Maps input to output message.", + "type": { + "$id": "856", + "kind": "array", + "name": "ArrayDataflowBuiltInTransformationMap", + "valueType": { + "$id": "857", + "kind": "model", + "name": "DataflowBuiltInTransformationMap", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationMap", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow BuiltIn Transformation map properties", + "decorators": [], + "properties": [ + { + "$id": "858", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Type of transformation.", + "type": { + "$ref": "188" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationMap.type", + "serializationOptions": { + "$id": "859", + "json": { + "$id": "860", + "name": "type" + } + } + }, + { + "$id": "861", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "A user provided optional description of the mapping function.", + "type": { + "$id": "862", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationMap.description", + "serializationOptions": { + "$id": "863", + "json": { + "$id": "864", + "name": "description" + } + } + }, + { + "$id": "865", + "kind": "property", + "name": "inputs", + "serializedName": "inputs", + "doc": "List of fields for mapping in JSON path expression.", + "type": { + "$id": "866", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "867", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationMap.inputs", + "serializationOptions": { + "$id": "868", + "json": { + "$id": "869", + "name": "inputs" + } + } + }, + { + "$id": "870", + "kind": "property", + "name": "expression", + "serializedName": "expression", + "doc": "Modify the inputs field(s) to the final output field. Example: $1 * 2.2 (Assuming inputs section $1 is provided)", + "type": { + "$id": "871", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationMap.expression", + "serializationOptions": { + "$id": "872", + "json": { + "$id": "873", + "name": "expression" + } + } + }, + { + "$id": "874", + "kind": "property", + "name": "output", + "serializedName": "output", + "doc": "Where and how the input fields to be organized in the output record.", + "type": { + "$id": "875", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationMap.output", + "serializationOptions": { + "$id": "876", + "json": { + "$id": "877", + "name": "output" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings.map", + "serializationOptions": { + "$id": "878", + "json": { + "$id": "879", + "name": "map" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation.builtInTransformationSettings", + "serializationOptions": { + "$id": "880", + "json": { + "$id": "881", + "name": "builtInTransformationSettings" + } + } + }, + { + "$id": "882", + "kind": "property", + "name": "destinationSettings", + "serializedName": "destinationSettings", + "doc": "Destination configuration.", + "type": { + "$id": "883", + "kind": "model", + "name": "DataflowDestinationOperationSettings", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowDestinationOperationSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow Destination Operation properties", + "decorators": [], + "properties": [ + { + "$id": "884", + "kind": "property", + "name": "endpointRef", + "serializedName": "endpointRef", + "doc": "Reference to the Endpoint CR. Can be of Broker, Kafka, Fabric, ADLS, ADX type.", + "type": { + "$id": "885", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowDestinationOperationSettings.endpointRef", + "serializationOptions": { + "$id": "886", + "json": { + "$id": "887", + "name": "endpointRef" + } + } + }, + { + "$id": "888", + "kind": "property", + "name": "dataDestination", + "serializedName": "dataDestination", + "doc": "Destination location, can be a topic or table name. Supports dynamic values with $topic, $systemProperties, $userProperties, $payload, $context, and $subscription.", + "type": { + "$id": "889", + "kind": "string", + "name": "NonEmptyString", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.NonEmptyString", + "baseType": { + "$id": "890", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowDestinationOperationSettings.dataDestination", + "serializationOptions": { + "$id": "891", + "json": { + "$id": "892", + "name": "dataDestination" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation.destinationSettings", + "serializationOptions": { + "$id": "893", + "json": { + "$id": "894", + "name": "destinationSettings" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProperties.operations", + "serializationOptions": { + "$id": "895", + "json": { + "$id": "896", + "name": "operations" + } + } + }, + { + "$id": "897", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "126" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProperties.provisioningState", + "serializationOptions": { + "$id": "898", + "json": { + "$id": "899", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowResource.properties", + "serializationOptions": { + "$id": "900", + "json": { + "$id": "901", + "name": "properties" + } + } + }, + { + "$id": "902", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "679" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowResource.extendedLocation", + "serializationOptions": { + "$id": "903", + "json": { + "$id": "904", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "760" + }, + { + "$ref": "766" + }, + { + "$ref": "775" + }, + { + "$ref": "800" + }, + { + "$ref": "810" + }, + { + "$ref": "836" + }, + { + "$ref": "857" + }, + { + "$ref": "883" + }, + { + "$id": "905", + "kind": "model", + "name": "DataflowResourceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a DataflowResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "906", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The DataflowResource items on this page", + "type": { + "$id": "907", + "kind": "array", + "name": "ArrayDataflowResource", + "valueType": { + "$ref": "758" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "908", + "json": { + "$id": "909", + "name": "value" + } + } + }, + { + "$id": "910", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "911", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "912", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "913", + "json": { + "$id": "914", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "915", + "kind": "model", + "name": "IotOperationsDataflowProfile", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Instance dataflowProfile resource", + "decorators": [], + "baseModel": { + "$ref": "337" + }, + "properties": [ + { + "$id": "916", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "917", + "kind": "model", + "name": "IotOperationsDataflowProfileProperties", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowProfile Resource properties", + "decorators": [], + "properties": [ + { + "$id": "918", + "kind": "property", + "name": "diagnostics", + "serializedName": "diagnostics", + "doc": "Spec defines the desired identities of NBC diagnostics settings.", + "type": { + "$id": "919", + "kind": "model", + "name": "DataflowProfileDiagnostics", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ProfileDiagnostics", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowProfile Diagnostics properties", + "decorators": [], + "properties": [ + { + "$id": "920", + "kind": "property", + "name": "logs", + "serializedName": "logs", + "doc": "Diagnostic log settings for the resource.", + "type": { + "$id": "921", + "kind": "model", + "name": "DiagnosticsLogs", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiagnosticsLogs", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Diagnostic Log properties", + "decorators": [], + "properties": [ + { + "$id": "922", + "kind": "property", + "name": "level", + "serializedName": "level", + "doc": "The log level. Examples - 'debug', 'info', 'warn', 'error', 'trace'.", + "type": { + "$id": "923", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiagnosticsLogs.level", + "serializationOptions": { + "$id": "924", + "json": { + "$id": "925", + "name": "level" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ProfileDiagnostics.logs", + "serializationOptions": { + "$id": "926", + "json": { + "$id": "927", + "name": "logs" + } + } + }, + { + "$id": "928", + "kind": "property", + "name": "metrics", + "serializedName": "metrics", + "doc": "The metrics settings for the resource.", + "type": { + "$id": "929", + "kind": "model", + "name": "IotOperationsMetrics", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Metrics", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Diagnostic Metrics properties", + "decorators": [], + "properties": [ + { + "$id": "930", + "kind": "property", + "name": "prometheusPort", + "serializedName": "prometheusPort", + "doc": "The prometheus port to expose the metrics.", + "type": { + "$id": "931", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Metrics.prometheusPort", + "serializationOptions": { + "$id": "932", + "json": { + "$id": "933", + "name": "prometheusPort" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ProfileDiagnostics.metrics", + "serializationOptions": { + "$id": "934", + "json": { + "$id": "935", + "name": "metrics" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileProperties.diagnostics", + "serializationOptions": { + "$id": "936", + "json": { + "$id": "937", + "name": "diagnostics" + } + } + }, + { + "$id": "938", + "kind": "property", + "name": "instanceCount", + "serializedName": "instanceCount", + "doc": "To manually scale the dataflow profile, specify the maximum number of instances you want to run.", + "type": { + "$id": "939", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileProperties.instanceCount", + "serializationOptions": { + "$id": "940", + "json": { + "$id": "941", + "name": "instanceCount" + } + } + }, + { + "$id": "942", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "126" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileProperties.provisioningState", + "serializationOptions": { + "$id": "943", + "json": { + "$id": "944", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileResource.properties", + "serializationOptions": { + "$id": "945", + "json": { + "$id": "946", + "name": "properties" + } + } + }, + { + "$id": "947", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "679" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileResource.extendedLocation", + "serializationOptions": { + "$id": "948", + "json": { + "$id": "949", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "917" + }, + { + "$ref": "919" + }, + { + "$ref": "921" + }, + { + "$ref": "929" + }, + { + "$id": "950", + "kind": "model", + "name": "DataflowProfileResourceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a DataflowProfileResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "951", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The DataflowProfileResource items on this page", + "type": { + "$id": "952", + "kind": "array", + "name": "ArrayDataflowProfileResource", + "valueType": { + "$ref": "915" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "953", + "json": { + "$id": "954", + "name": "value" + } + } + }, + { + "$id": "955", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "956", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "957", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "958", + "json": { + "$id": "959", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "960", + "kind": "model", + "name": "IotOperationsBrokerAuthorization", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Instance broker authorizations resource", + "decorators": [], + "baseModel": { + "$ref": "337" + }, + "properties": [ + { + "$id": "961", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "962", + "kind": "model", + "name": "IotOperationsBrokerAuthorizationProperties", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "BrokerAuthorization Resource properties", + "decorators": [], + "properties": [ + { + "$id": "963", + "kind": "property", + "name": "authorizationPolicies", + "serializedName": "authorizationPolicies", + "doc": "The list of authorization policies supported by the Authorization Resource.", + "type": { + "$id": "964", + "kind": "model", + "name": "BrokerAuthorizationConfig", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationConfig", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker AuthorizationConfig properties", + "decorators": [], + "properties": [ + { + "$id": "965", + "kind": "property", + "name": "cache", + "serializedName": "cache", + "doc": "Enable caching of the authorization rules.", + "type": { + "$ref": "62" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationConfig.cache", + "serializationOptions": { + "$id": "966", + "json": { + "$id": "967", + "name": "cache" + } + } + }, + { + "$id": "968", + "kind": "property", + "name": "rules", + "serializedName": "rules", + "doc": "The authorization rules to follow. If no rule is set, but Authorization Resource is used that would mean DenyAll.", + "type": { + "$id": "969", + "kind": "array", + "name": "ArrayAuthorizationRule", + "valueType": { + "$id": "970", + "kind": "model", + "name": "BrokerAuthorizationRule", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationRule", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "AuthorizationConfig Rule Properties", + "decorators": [], + "properties": [ + { + "$id": "971", + "kind": "property", + "name": "brokerResources", + "serializedName": "brokerResources", + "doc": "Give access to Broker methods and topics.", + "type": { + "$id": "972", + "kind": "array", + "name": "ArrayBrokerResourceRule", + "valueType": { + "$id": "973", + "kind": "model", + "name": "BrokerResourceRule", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResourceRule", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker Resource Rule properties. This defines the objects that represent the actions or topics, such as - method.Connect, method.Publish, etc.", + "decorators": [], + "properties": [ + { + "$id": "974", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Give access for a Broker method (i.e., Connect, Subscribe, or Publish).", + "type": { + "$ref": "200" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResourceRule.method", + "serializationOptions": { + "$id": "975", + "json": { + "$id": "976", + "name": "method" + } + } + }, + { + "$id": "977", + "kind": "property", + "name": "clientIds", + "serializedName": "clientIds", + "doc": "A list of client IDs that match the clients. The client IDs are case-sensitive and must match the client IDs provided by the clients during connection. This subfield may be set if the method is Connect.", + "type": { + "$id": "978", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResourceRule.clientIds", + "serializationOptions": { + "$id": "980", + "json": { + "$id": "981", + "name": "clientIds" + } + } + }, + { + "$id": "982", + "kind": "property", + "name": "topics", + "serializedName": "topics", + "doc": "A list of topics or topic patterns that match the topics that the clients can publish or subscribe to. This subfield is required if the method is Publish or Subscribe.", + "type": { + "$id": "983", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "984", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResourceRule.topics", + "serializationOptions": { + "$id": "985", + "json": { + "$id": "986", + "name": "topics" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationRule.brokerResources", + "serializationOptions": { + "$id": "987", + "json": { + "$id": "988", + "name": "brokerResources" + } + } + }, + { + "$id": "989", + "kind": "property", + "name": "principals", + "serializedName": "principals", + "doc": "Give access to clients based on the following properties.", + "type": { + "$id": "990", + "kind": "model", + "name": "PrincipalConfig", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.PrincipalDefinition", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "PrincipalDefinition properties of Rule", + "decorators": [], + "properties": [ + { + "$id": "991", + "kind": "property", + "name": "attributes", + "serializedName": "attributes", + "doc": "A list of key-value pairs that match the attributes of the clients. The attributes are case-sensitive and must match the attributes provided by the clients during authentication.", + "type": { + "$id": "992", + "kind": "array", + "name": "ArrayRecord", + "valueType": { + "$id": "993", + "kind": "dict", + "keyType": { + "$id": "994", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "995", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.PrincipalDefinition.attributes", + "serializationOptions": { + "$id": "996", + "json": { + "$id": "997", + "name": "attributes" + } + } + }, + { + "$id": "998", + "kind": "property", + "name": "clientIds", + "serializedName": "clientIds", + "doc": "A list of client IDs that match the clients. The client IDs are case-sensitive and must match the client IDs provided by the clients during connection.", + "type": { + "$id": "999", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1000", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.PrincipalDefinition.clientIds", + "serializationOptions": { + "$id": "1001", + "json": { + "$id": "1002", + "name": "clientIds" + } + } + }, + { + "$id": "1003", + "kind": "property", + "name": "usernames", + "serializedName": "usernames", + "doc": "A list of usernames that match the clients. The usernames are case-sensitive and must match the usernames provided by the clients during authentication.", + "type": { + "$id": "1004", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1005", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.PrincipalDefinition.usernames", + "serializationOptions": { + "$id": "1006", + "json": { + "$id": "1007", + "name": "usernames" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationRule.principals", + "serializationOptions": { + "$id": "1008", + "json": { + "$id": "1009", + "name": "principals" + } + } + }, + { + "$id": "1010", + "kind": "property", + "name": "stateStoreResources", + "serializedName": "stateStoreResources", + "doc": "Give access to state store resources.", + "type": { + "$id": "1011", + "kind": "array", + "name": "ArrayStateStoreResourceRule", + "valueType": { + "$id": "1012", + "kind": "model", + "name": "StateStoreResourceRule", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.StateStoreResourceRule", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "State Store Resource Rule properties.", + "decorators": [], + "properties": [ + { + "$id": "1013", + "kind": "property", + "name": "keyType", + "serializedName": "keyType", + "doc": "Allowed keyTypes pattern, string, binary. The key type used for matching, for example pattern tries to match the key to a glob-style pattern and string checks key is equal to value provided in keys.", + "type": { + "$ref": "208" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.StateStoreResourceRule.keyType", + "serializationOptions": { + "$id": "1014", + "json": { + "$id": "1015", + "name": "keyType" + } + } + }, + { + "$id": "1016", + "kind": "property", + "name": "keys", + "serializedName": "keys", + "doc": "Give access to state store keys for the corresponding principals defined. When key type is pattern set glob-style pattern (e.g., '*', 'clients/*').", + "type": { + "$id": "1017", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1018", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.StateStoreResourceRule.keys", + "serializationOptions": { + "$id": "1019", + "json": { + "$id": "1020", + "name": "keys" + } + } + }, + { + "$id": "1021", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Give access for `Read`, `Write` and `ReadWrite` access level.", + "type": { + "$ref": "216" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.StateStoreResourceRule.method", + "serializationOptions": { + "$id": "1022", + "json": { + "$id": "1023", + "name": "method" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationRule.stateStoreResources", + "serializationOptions": { + "$id": "1024", + "json": { + "$id": "1025", + "name": "stateStoreResources" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationConfig.rules", + "serializationOptions": { + "$id": "1026", + "json": { + "$id": "1027", + "name": "rules" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationProperties.authorizationPolicies", + "serializationOptions": { + "$id": "1028", + "json": { + "$id": "1029", + "name": "authorizationPolicies" + } + } + }, + { + "$id": "1030", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "126" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationProperties.provisioningState", + "serializationOptions": { + "$id": "1031", + "json": { + "$id": "1032", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationResource.properties", + "serializationOptions": { + "$id": "1033", + "json": { + "$id": "1034", + "name": "properties" + } + } + }, + { + "$id": "1035", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "679" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationResource.extendedLocation", + "serializationOptions": { + "$id": "1036", + "json": { + "$id": "1037", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "962" + }, + { + "$ref": "964" + }, + { + "$ref": "970" + }, + { + "$ref": "973" + }, + { + "$ref": "990" + }, + { + "$ref": "1012" + }, + { + "$id": "1038", + "kind": "model", + "name": "BrokerAuthorizationResourceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a BrokerAuthorizationResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "1039", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The BrokerAuthorizationResource items on this page", + "type": { + "$id": "1040", + "kind": "array", + "name": "ArrayBrokerAuthorizationResource", + "valueType": { + "$ref": "960" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1041", + "json": { + "$id": "1042", + "name": "value" + } + } + }, + { + "$id": "1043", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1044", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1045", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "1046", + "json": { + "$id": "1047", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1048", + "kind": "model", + "name": "IotOperationsBrokerAuthentication", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Instance broker authentication resource", + "decorators": [], + "baseModel": { + "$ref": "337" + }, + "properties": [ + { + "$id": "1049", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "1050", + "kind": "model", + "name": "IotOperationsBrokerAuthenticationProperties", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "BrokerAuthentication Resource properties", + "decorators": [], + "properties": [ + { + "$id": "1051", + "kind": "property", + "name": "authenticationMethods", + "serializedName": "authenticationMethods", + "doc": "Defines a set of Broker authentication methods to be used on `BrokerListeners`. For each array element one authenticator type supported.", + "type": { + "$id": "1052", + "kind": "array", + "name": "ArrayBrokerAuthenticatorMethods", + "valueType": { + "$id": "1053", + "kind": "model", + "name": "BrokerAuthenticatorMethods", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethods", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Set of broker authentication policies. Only one method is supported for each entry.", + "decorators": [], + "properties": [ + { + "$id": "1054", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Custom authentication configuration.", + "type": { + "$ref": "224" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethods.method", + "serializationOptions": { + "$id": "1055", + "json": { + "$id": "1056", + "name": "method" + } + } + }, + { + "$id": "1057", + "kind": "property", + "name": "customSettings", + "serializedName": "customSettings", + "doc": "Custom authentication configuration.", + "type": { + "$id": "1058", + "kind": "model", + "name": "BrokerAuthenticatorMethodCustom", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodCustom", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Custom method for BrokerAuthentication", + "decorators": [], + "properties": [ + { + "$id": "1059", + "kind": "property", + "name": "auth", + "serializedName": "auth", + "doc": "Optional authentication needed for authenticating with the custom authentication server.", + "type": { + "$id": "1060", + "kind": "model", + "name": "BrokerAuthenticatorCustomAuth", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorCustomAuth", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Custom Authentication properties", + "decorators": [], + "properties": [ + { + "$id": "1061", + "kind": "property", + "name": "x509", + "serializedName": "x509", + "doc": "X509 Custom Auth type details.", + "type": { + "$id": "1062", + "kind": "model", + "name": "X509ManualCertificate", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.X509ManualCertificate", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "X509 Certificate Authentication properties.", + "decorators": [], + "properties": [ + { + "$id": "1063", + "kind": "property", + "name": "secretRef", + "serializedName": "secretRef", + "doc": "Kubernetes secret containing an X.509 client certificate. This is a reference to the secret through an identifying name, not the secret itself.", + "type": { + "$id": "1064", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.X509ManualCertificate.secretRef", + "serializationOptions": { + "$id": "1065", + "json": { + "$id": "1066", + "name": "secretRef" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorCustomAuth.x509", + "serializationOptions": { + "$id": "1067", + "json": { + "$id": "1068", + "name": "x509" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodCustom.auth", + "serializationOptions": { + "$id": "1069", + "json": { + "$id": "1070", + "name": "auth" + } + } + }, + { + "$id": "1071", + "kind": "property", + "name": "caCertConfigMap", + "serializedName": "caCertConfigMap", + "doc": "Optional CA certificate for validating the custom authentication server's certificate.", + "type": { + "$id": "1072", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodCustom.caCertConfigMap", + "serializationOptions": { + "$id": "1073", + "json": { + "$id": "1074", + "name": "caCertConfigMap" + } + } + }, + { + "$id": "1075", + "kind": "property", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Endpoint of the custom authentication server. Must be an HTTPS endpoint.", + "type": { + "$id": "1076", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodCustom.endpoint", + "serializationOptions": { + "$id": "1077", + "json": { + "$id": "1078", + "name": "endpoint" + } + } + }, + { + "$id": "1079", + "kind": "property", + "name": "headers", + "serializedName": "headers", + "doc": "Additional HTTP headers to pass to the custom authentication server.", + "type": { + "$id": "1080", + "kind": "dict", + "keyType": { + "$id": "1081", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodCustom.headers", + "serializationOptions": { + "$id": "1083", + "json": { + "$id": "1084", + "name": "headers" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethods.customSettings", + "serializationOptions": { + "$id": "1085", + "json": { + "$id": "1086", + "name": "customSettings" + } + } + }, + { + "$id": "1087", + "kind": "property", + "name": "serviceAccountTokenSettings", + "serializedName": "serviceAccountTokenSettings", + "doc": "ServiceAccountToken authentication configuration.", + "type": { + "$id": "1088", + "kind": "model", + "name": "BrokerAuthenticatorMethodSat", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodSat", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Service Account Token for BrokerAuthentication", + "decorators": [], + "properties": [ + { + "$id": "1089", + "kind": "property", + "name": "audiences", + "serializedName": "audiences", + "doc": "List of allowed audience.", + "type": { + "$id": "1090", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1091", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodSat.audiences", + "serializationOptions": { + "$id": "1092", + "json": { + "$id": "1093", + "name": "audiences" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethods.serviceAccountTokenSettings", + "serializationOptions": { + "$id": "1094", + "json": { + "$id": "1095", + "name": "serviceAccountTokenSettings" + } + } + }, + { + "$id": "1096", + "kind": "property", + "name": "x509Settings", + "serializedName": "x509Settings", + "doc": "X.509 authentication configuration.", + "type": { + "$id": "1097", + "kind": "model", + "name": "BrokerAuthenticatorMethodX509", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "X509 for BrokerAuthentication.", + "decorators": [], + "properties": [ + { + "$id": "1098", + "kind": "property", + "name": "authorizationAttributes", + "serializedName": "authorizationAttributes", + "doc": "X509 authorization attributes properties.", + "type": { + "$id": "1099", + "kind": "dict", + "keyType": { + "$id": "1100", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1101", + "kind": "model", + "name": "BrokerAuthenticatorMethodX509Attributes", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509Attributes", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "BrokerAuthenticatorMethodX509Attributes properties.", + "decorators": [], + "properties": [ + { + "$id": "1102", + "kind": "property", + "name": "attributes", + "serializedName": "attributes", + "doc": "Attributes object.", + "type": { + "$id": "1103", + "kind": "dict", + "keyType": { + "$id": "1104", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509Attributes.attributes", + "serializationOptions": { + "$id": "1106", + "json": { + "$id": "1107", + "name": "attributes" + } + } + }, + { + "$id": "1108", + "kind": "property", + "name": "subject", + "serializedName": "subject", + "doc": "Subject of the X509 attribute.", + "type": { + "$id": "1109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509Attributes.subject", + "serializationOptions": { + "$id": "1110", + "json": { + "$id": "1111", + "name": "subject" + } + } + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509.authorizationAttributes", + "serializationOptions": { + "$id": "1112", + "json": { + "$id": "1113", + "name": "authorizationAttributes" + } + } + }, + { + "$id": "1114", + "kind": "property", + "name": "trustedClientCaCert", + "serializedName": "trustedClientCaCert", + "doc": "Name of the trusted client ca cert resource.", + "type": { + "$id": "1115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509.trustedClientCaCert", + "serializationOptions": { + "$id": "1116", + "json": { + "$id": "1117", + "name": "trustedClientCaCert" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethods.x509Settings", + "serializationOptions": { + "$id": "1118", + "json": { + "$id": "1119", + "name": "x509Settings" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationProperties.authenticationMethods", + "serializationOptions": { + "$id": "1120", + "json": { + "$id": "1121", + "name": "authenticationMethods" + } + } + }, + { + "$id": "1122", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "126" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationProperties.provisioningState", + "serializationOptions": { + "$id": "1123", + "json": { + "$id": "1124", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationResource.properties", + "serializationOptions": { + "$id": "1125", + "json": { + "$id": "1126", + "name": "properties" + } + } + }, + { + "$id": "1127", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "679" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationResource.extendedLocation", + "serializationOptions": { + "$id": "1128", + "json": { + "$id": "1129", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "1050" + }, + { + "$ref": "1053" + }, + { + "$ref": "1058" + }, + { + "$ref": "1060" + }, + { + "$ref": "1062" + }, + { + "$ref": "1088" + }, + { + "$ref": "1097" + }, + { + "$ref": "1101" + }, + { + "$id": "1130", + "kind": "model", + "name": "BrokerAuthenticationResourceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a BrokerAuthenticationResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "1131", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The BrokerAuthenticationResource items on this page", + "type": { + "$id": "1132", + "kind": "array", + "name": "ArrayBrokerAuthenticationResource", + "valueType": { + "$ref": "1048" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1133", + "json": { + "$id": "1134", + "name": "value" + } + } + }, + { + "$id": "1135", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1136", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1137", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "1138", + "json": { + "$id": "1139", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1140", + "kind": "model", + "name": "IotOperationsBrokerListener", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Instance broker resource", + "decorators": [], + "baseModel": { + "$ref": "337" + }, + "properties": [ + { + "$id": "1141", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "1142", + "kind": "model", + "name": "IotOperationsBrokerListenerProperties", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines a Broker listener. A listener is a collection of ports on which the broker accepts connections from clients.", + "decorators": [], + "properties": [ + { + "$id": "1143", + "kind": "property", + "name": "serviceName", + "serializedName": "serviceName", + "doc": "Kubernetes Service name of this listener.", + "type": { + "$id": "1144", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerProperties.serviceName", + "serializationOptions": { + "$id": "1145", + "json": { + "$id": "1146", + "name": "serviceName" + } + } + }, + { + "$id": "1147", + "kind": "property", + "name": "ports", + "serializedName": "ports", + "doc": "Ports on which this listener accepts client connections.", + "type": { + "$id": "1148", + "kind": "array", + "name": "ArrayListenerPort", + "valueType": { + "$id": "1149", + "kind": "model", + "name": "BrokerListenerPort", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines a TCP port on which a `BrokerListener` listens.", + "decorators": [], + "properties": [ + { + "$id": "1150", + "kind": "property", + "name": "authenticationRef", + "serializedName": "authenticationRef", + "doc": "Reference to client authentication settings. Omit to disable authentication.", + "type": { + "$id": "1151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.authenticationRef", + "serializationOptions": { + "$id": "1152", + "json": { + "$id": "1153", + "name": "authenticationRef" + } + } + }, + { + "$id": "1154", + "kind": "property", + "name": "authorizationRef", + "serializedName": "authorizationRef", + "doc": "Reference to client authorization settings. Omit to disable authorization.", + "type": { + "$id": "1155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.authorizationRef", + "serializationOptions": { + "$id": "1156", + "json": { + "$id": "1157", + "name": "authorizationRef" + } + } + }, + { + "$id": "1158", + "kind": "property", + "name": "nodePort", + "serializedName": "nodePort", + "doc": "Kubernetes node port. Only relevant when this port is associated with a `NodePort` listener.", + "type": { + "$id": "1159", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.nodePort", + "serializationOptions": { + "$id": "1160", + "json": { + "$id": "1161", + "name": "nodePort" + } + } + }, + { + "$id": "1162", + "kind": "property", + "name": "port", + "serializedName": "port", + "doc": "TCP port for accepting client connections.", + "type": { + "$id": "1163", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.port", + "serializationOptions": { + "$id": "1164", + "json": { + "$id": "1165", + "name": "port" + } + } + }, + { + "$id": "1166", + "kind": "property", + "name": "protocol", + "serializedName": "protocol", + "doc": "Protocol to use for client connections.", + "type": { + "$ref": "114" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.protocol", + "serializationOptions": { + "$id": "1167", + "json": { + "$id": "1168", + "name": "protocol" + } + } + }, + { + "$id": "1169", + "kind": "property", + "name": "tls", + "serializedName": "tls", + "doc": "TLS server certificate settings for this port. Omit to disable TLS.", + "type": { + "$id": "1170", + "kind": "model", + "name": "ListenerPortTlsCertMethod", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsCertMethod", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Collection of different TLS types, NOTE- Enum at a time only one of them needs to be supported", + "decorators": [], + "properties": [ + { + "$id": "1171", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "Mode of TLS server certificate management.", + "type": { + "$ref": "232" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsCertMethod.mode", + "serializationOptions": { + "$id": "1172", + "json": { + "$id": "1173", + "name": "mode" + } + } + }, + { + "$id": "1174", + "kind": "property", + "name": "certManagerCertificateSpec", + "serializedName": "certManagerCertificateSpec", + "doc": "Option 1 - Automatic TLS server certificate management with cert-manager.", + "type": { + "$id": "1175", + "kind": "model", + "name": "CertManagerCertificateSpec", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Automatic TLS server certificate management with cert-manager", + "decorators": [], + "properties": [ + { + "$id": "1176", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "doc": "Lifetime of certificate. Must be specified using a Go time.Duration format (h|m|s). E.g. 240h for 240 hours and 45m for 45 minutes.", + "type": { + "$id": "1177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.duration", + "serializationOptions": { + "$id": "1178", + "json": { + "$id": "1179", + "name": "duration" + } + } + }, + { + "$id": "1180", + "kind": "property", + "name": "secretName", + "serializedName": "secretName", + "doc": "Secret for storing server certificate. Any existing data will be overwritten. This is a reference to the secret through an identifying name, not the secret itself.", + "type": { + "$id": "1181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.secretName", + "serializationOptions": { + "$id": "1182", + "json": { + "$id": "1183", + "name": "secretName" + } + } + }, + { + "$id": "1184", + "kind": "property", + "name": "renewBefore", + "serializedName": "renewBefore", + "doc": "When to begin renewing certificate. Must be specified using a Go time.Duration format (h|m|s). E.g. 240h for 240 hours and 45m for 45 minutes.", + "type": { + "$id": "1185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.renewBefore", + "serializationOptions": { + "$id": "1186", + "json": { + "$id": "1187", + "name": "renewBefore" + } + } + }, + { + "$id": "1188", + "kind": "property", + "name": "issuerRef", + "serializedName": "issuerRef", + "doc": "cert-manager issuerRef.", + "type": { + "$id": "1189", + "kind": "model", + "name": "CertManagerIssuerRef", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerIssuerRef", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Cert-Manager issuerRef properties", + "decorators": [], + "properties": [ + { + "$id": "1190", + "kind": "property", + "name": "group", + "serializedName": "group", + "doc": "group of issuer.", + "type": { + "$id": "1191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerIssuerRef.group", + "serializationOptions": { + "$id": "1192", + "json": { + "$id": "1193", + "name": "group" + } + } + }, + { + "$id": "1194", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "kind of issuer (Issuer or ClusterIssuer).", + "type": { + "$ref": "238" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerIssuerRef.kind", + "serializationOptions": { + "$id": "1195", + "json": { + "$id": "1196", + "name": "kind" + } + } + }, + { + "$id": "1197", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "name of issuer.", + "type": { + "$id": "1198", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerIssuerRef.name", + "serializationOptions": { + "$id": "1199", + "json": { + "$id": "1200", + "name": "name" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.issuerRef", + "serializationOptions": { + "$id": "1201", + "json": { + "$id": "1202", + "name": "issuerRef" + } + } + }, + { + "$id": "1203", + "kind": "property", + "name": "privateKey", + "serializedName": "privateKey", + "doc": "Type of certificate private key.", + "type": { + "$id": "1204", + "kind": "model", + "name": "CertManagerPrivateKey", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerPrivateKey", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Cert Manager private key properties", + "decorators": [], + "properties": [ + { + "$id": "1205", + "kind": "property", + "name": "algorithm", + "serializedName": "algorithm", + "doc": "algorithm for private key.", + "type": { + "$ref": "244" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerPrivateKey.algorithm", + "serializationOptions": { + "$id": "1206", + "json": { + "$id": "1207", + "name": "algorithm" + } + } + }, + { + "$id": "1208", + "kind": "property", + "name": "rotationPolicy", + "serializedName": "rotationPolicy", + "doc": "cert-manager private key rotationPolicy.", + "type": { + "$ref": "260" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerPrivateKey.rotationPolicy", + "serializationOptions": { + "$id": "1209", + "json": { + "$id": "1210", + "name": "rotationPolicy" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.privateKey", + "serializationOptions": { + "$id": "1211", + "json": { + "$id": "1212", + "name": "privateKey" + } + } + }, + { + "$id": "1213", + "kind": "property", + "name": "san", + "serializedName": "san", + "doc": "Additional Subject Alternative Names (SANs) to include in the certificate.", + "type": { + "$id": "1214", + "kind": "model", + "name": "SanForCert", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SanForCert", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Subject Alternative Names (SANs) for certificate.", + "decorators": [], + "properties": [ + { + "$id": "1215", + "kind": "property", + "name": "dns", + "serializedName": "dns", + "doc": "DNS SANs.", + "type": { + "$id": "1216", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SanForCert.dns", + "serializationOptions": { + "$id": "1218", + "json": { + "$id": "1219", + "name": "dns" + } + } + }, + { + "$id": "1220", + "kind": "property", + "name": "ip", + "serializedName": "ip", + "doc": "IP address SANs.", + "type": { + "$id": "1221", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1222", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SanForCert.ip", + "serializationOptions": { + "$id": "1223", + "json": { + "$id": "1224", + "name": "ip" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.san", + "serializationOptions": { + "$id": "1225", + "json": { + "$id": "1226", + "name": "san" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsCertMethod.certManagerCertificateSpec", + "serializationOptions": { + "$id": "1227", + "json": { + "$id": "1228", + "name": "certManagerCertificateSpec" + } + } + }, + { + "$id": "1229", + "kind": "property", + "name": "manual", + "serializedName": "manual", + "doc": "Option 2 - Manual TLS server certificate management through a defined secret.", + "type": { + "$ref": "1062" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsCertMethod.manual", + "serializationOptions": { + "$id": "1230", + "json": { + "$id": "1231", + "name": "manual" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.tls", + "serializationOptions": { + "$id": "1232", + "json": { + "$id": "1233", + "name": "tls" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerProperties.ports", + "serializationOptions": { + "$id": "1234", + "json": { + "$id": "1235", + "name": "ports" + } + } + }, + { + "$id": "1236", + "kind": "property", + "name": "serviceType", + "serializedName": "serviceType", + "doc": "Kubernetes Service type of this listener.", + "type": { + "$ref": "266" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerProperties.serviceType", + "serializationOptions": { + "$id": "1237", + "json": { + "$id": "1238", + "name": "serviceType" + } + } + }, + { + "$id": "1239", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "126" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerProperties.provisioningState", + "serializationOptions": { + "$id": "1240", + "json": { + "$id": "1241", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerResource.properties", + "serializationOptions": { + "$id": "1242", + "json": { + "$id": "1243", + "name": "properties" + } + } + }, + { + "$id": "1244", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "679" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerResource.extendedLocation", + "serializationOptions": { + "$id": "1245", + "json": { + "$id": "1246", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "1142" + }, + { + "$ref": "1149" + }, + { + "$ref": "1170" + }, + { + "$ref": "1175" + }, + { + "$ref": "1189" + }, + { + "$ref": "1204" + }, + { + "$ref": "1214" + }, + { + "$id": "1247", + "kind": "model", + "name": "BrokerListenerResourceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a BrokerListenerResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "1248", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The BrokerListenerResource items on this page", + "type": { + "$id": "1249", + "kind": "array", + "name": "ArrayBrokerListenerResource", + "valueType": { + "$ref": "1140" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1250", + "json": { + "$id": "1251", + "name": "value" + } + } + }, + { + "$id": "1252", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1253", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1254", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "1255", + "json": { + "$id": "1256", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1257", + "kind": "model", + "name": "IotOperationsBroker", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Instance broker resource", + "decorators": [], + "baseModel": { + "$ref": "337" + }, + "properties": [ + { + "$id": "1258", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "1259", + "kind": "model", + "name": "IotOperationsBrokerProperties", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker Resource properties", + "decorators": [], + "properties": [ + { + "$id": "1260", + "kind": "property", + "name": "advanced", + "serializedName": "advanced", + "doc": "Advanced settings of Broker.", + "type": { + "$id": "1261", + "kind": "model", + "name": "BrokerAdvancedSettings", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AdvancedSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker Advanced Settings", + "decorators": [], + "properties": [ + { + "$id": "1262", + "kind": "property", + "name": "clients", + "serializedName": "clients", + "doc": "Configurations related to All Clients.", + "type": { + "$id": "1263", + "kind": "model", + "name": "BrokerClientConfig", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The settings of Client Config.", + "decorators": [], + "properties": [ + { + "$id": "1264", + "kind": "property", + "name": "maxSessionExpirySeconds", + "serializedName": "maxSessionExpirySeconds", + "doc": "Upper bound of Session Expiry Interval, in seconds.", + "type": { + "$id": "1265", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.maxSessionExpirySeconds", + "serializationOptions": { + "$id": "1266", + "json": { + "$id": "1267", + "name": "maxSessionExpirySeconds" + } + } + }, + { + "$id": "1268", + "kind": "property", + "name": "maxMessageExpirySeconds", + "serializedName": "maxMessageExpirySeconds", + "doc": "Upper bound of Message Expiry Interval, in seconds.", + "type": { + "$id": "1269", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.maxMessageExpirySeconds", + "serializationOptions": { + "$id": "1270", + "json": { + "$id": "1271", + "name": "maxMessageExpirySeconds" + } + } + }, + { + "$id": "1272", + "kind": "property", + "name": "maxPacketSizeBytes", + "serializedName": "maxPacketSizeBytes", + "doc": "Max message size for a packet in Bytes.", + "type": { + "$id": "1273", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.maxPacketSizeBytes", + "serializationOptions": { + "$id": "1274", + "json": { + "$id": "1275", + "name": "maxPacketSizeBytes" + } + } + }, + { + "$id": "1276", + "kind": "property", + "name": "subscriberQueueLimit", + "serializedName": "subscriberQueueLimit", + "doc": "The limit on the number of queued messages for a subscriber.", + "type": { + "$id": "1277", + "kind": "model", + "name": "SubscriberQueueLimit", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SubscriberQueueLimit", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The settings of Subscriber Queue Limit.", + "decorators": [], + "properties": [ + { + "$id": "1278", + "kind": "property", + "name": "length", + "serializedName": "length", + "doc": "The maximum length of the queue before messages start getting dropped.", + "type": { + "$id": "1279", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SubscriberQueueLimit.length", + "serializationOptions": { + "$id": "1280", + "json": { + "$id": "1281", + "name": "length" + } + } + }, + { + "$id": "1282", + "kind": "property", + "name": "strategy", + "serializedName": "strategy", + "doc": "The strategy to use for dropping messages from the queue.", + "type": { + "$ref": "274" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SubscriberQueueLimit.strategy", + "serializationOptions": { + "$id": "1283", + "json": { + "$id": "1284", + "name": "strategy" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.subscriberQueueLimit", + "serializationOptions": { + "$id": "1285", + "json": { + "$id": "1286", + "name": "subscriberQueueLimit" + } + } + }, + { + "$id": "1287", + "kind": "property", + "name": "maxReceiveMaximum", + "serializedName": "maxReceiveMaximum", + "doc": "Upper bound of Receive Maximum that a client can request in the CONNECT packet.", + "type": { + "$id": "1288", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.maxReceiveMaximum", + "serializationOptions": { + "$id": "1289", + "json": { + "$id": "1290", + "name": "maxReceiveMaximum" + } + } + }, + { + "$id": "1291", + "kind": "property", + "name": "maxKeepAliveSeconds", + "serializedName": "maxKeepAliveSeconds", + "doc": "Upper bound of a client's Keep Alive, in seconds.", + "type": { + "$id": "1292", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.maxKeepAliveSeconds", + "serializationOptions": { + "$id": "1293", + "json": { + "$id": "1294", + "name": "maxKeepAliveSeconds" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AdvancedSettings.clients", + "serializationOptions": { + "$id": "1295", + "json": { + "$id": "1296", + "name": "clients" + } + } + }, + { + "$id": "1297", + "kind": "property", + "name": "encryptInternalTraffic", + "serializedName": "encryptInternalTraffic", + "doc": "The setting to enable or disable encryption of internal Traffic.", + "type": { + "$ref": "62" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AdvancedSettings.encryptInternalTraffic", + "serializationOptions": { + "$id": "1298", + "json": { + "$id": "1299", + "name": "encryptInternalTraffic" + } + } + }, + { + "$id": "1300", + "kind": "property", + "name": "internalCerts", + "serializedName": "internalCerts", + "doc": "Certificate rotation and private key configuration.", + "type": { + "$id": "1301", + "kind": "model", + "name": "CertManagerCertConfig", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertOptions", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Cert Manager Cert properties", + "decorators": [], + "properties": [ + { + "$id": "1302", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "doc": "Lifetime of certificate. Must be specified using a Go time.Duration format (h|m|s). E.g. 240h for 240 hours and 45m for 45 minutes.", + "type": { + "$id": "1303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertOptions.duration", + "serializationOptions": { + "$id": "1304", + "json": { + "$id": "1305", + "name": "duration" + } + } + }, + { + "$id": "1306", + "kind": "property", + "name": "renewBefore", + "serializedName": "renewBefore", + "doc": "When to begin renewing certificate. Must be specified using a Go time.Duration format (h|m|s). E.g. 240h for 240 hours and 45m for 45 minutes.", + "type": { + "$id": "1307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertOptions.renewBefore", + "serializationOptions": { + "$id": "1308", + "json": { + "$id": "1309", + "name": "renewBefore" + } + } + }, + { + "$id": "1310", + "kind": "property", + "name": "privateKey", + "serializedName": "privateKey", + "doc": "Configuration of certificate private key.", + "type": { + "$ref": "1204" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertOptions.privateKey", + "serializationOptions": { + "$id": "1311", + "json": { + "$id": "1312", + "name": "privateKey" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AdvancedSettings.internalCerts", + "serializationOptions": { + "$id": "1313", + "json": { + "$id": "1314", + "name": "internalCerts" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.advanced", + "serializationOptions": { + "$id": "1315", + "json": { + "$id": "1316", + "name": "advanced" + } + } + }, + { + "$id": "1317", + "kind": "property", + "name": "cardinality", + "serializedName": "cardinality", + "doc": "The cardinality details of the broker.", + "type": { + "$id": "1318", + "kind": "model", + "name": "BrokerCardinality", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Cardinality", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Cardinality properties", + "decorators": [], + "properties": [ + { + "$id": "1319", + "kind": "property", + "name": "backendChain", + "serializedName": "backendChain", + "doc": "The backend broker desired properties", + "type": { + "$id": "1320", + "kind": "model", + "name": "BrokerBackendChain", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BackendChain", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Desired properties of the backend instances of the broker", + "decorators": [], + "properties": [ + { + "$id": "1321", + "kind": "property", + "name": "partitions", + "serializedName": "partitions", + "doc": "The desired number of physical backend partitions.", + "type": { + "$id": "1322", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BackendChain.partitions", + "serializationOptions": { + "$id": "1323", + "json": { + "$id": "1324", + "name": "partitions" + } + } + }, + { + "$id": "1325", + "kind": "property", + "name": "redundancyFactor", + "serializedName": "redundancyFactor", + "doc": "The desired numbers of backend replicas (pods) in a physical partition.", + "type": { + "$id": "1326", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BackendChain.redundancyFactor", + "serializationOptions": { + "$id": "1327", + "json": { + "$id": "1328", + "name": "redundancyFactor" + } + } + }, + { + "$id": "1329", + "kind": "property", + "name": "workers", + "serializedName": "workers", + "doc": "Number of logical backend workers per replica (pod).", + "type": { + "$id": "1330", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BackendChain.workers", + "serializationOptions": { + "$id": "1331", + "json": { + "$id": "1332", + "name": "workers" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Cardinality.backendChain", + "serializationOptions": { + "$id": "1333", + "json": { + "$id": "1334", + "name": "backendChain" + } + } + }, + { + "$id": "1335", + "kind": "property", + "name": "frontend", + "serializedName": "frontend", + "doc": "The frontend desired properties", + "type": { + "$id": "1336", + "kind": "model", + "name": "BrokerFrontend", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Frontend", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The desired properties of the frontend instances of the Broker", + "decorators": [], + "properties": [ + { + "$id": "1337", + "kind": "property", + "name": "replicas", + "serializedName": "replicas", + "doc": "The desired number of frontend instances (pods).", + "type": { + "$id": "1338", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Frontend.replicas", + "serializationOptions": { + "$id": "1339", + "json": { + "$id": "1340", + "name": "replicas" + } + } + }, + { + "$id": "1341", + "kind": "property", + "name": "workers", + "serializedName": "workers", + "doc": "Number of logical frontend workers per instance (pod).", + "type": { + "$id": "1342", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Frontend.workers", + "serializationOptions": { + "$id": "1343", + "json": { + "$id": "1344", + "name": "workers" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Cardinality.frontend", + "serializationOptions": { + "$id": "1345", + "json": { + "$id": "1346", + "name": "frontend" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.cardinality", + "serializationOptions": { + "$id": "1347", + "json": { + "$id": "1348", + "name": "cardinality" + } + } + }, + { + "$id": "1349", + "kind": "property", + "name": "diagnostics", + "serializedName": "diagnostics", + "doc": "Spec defines the desired identities of Broker diagnostics settings.", + "type": { + "$id": "1350", + "kind": "model", + "name": "BrokerDiagnostics", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerDiagnostics", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker Diagnostic Setting properties", + "decorators": [], + "properties": [ + { + "$id": "1351", + "kind": "property", + "name": "logs", + "serializedName": "logs", + "doc": "Diagnostic log settings for the resource.", + "type": { + "$ref": "921" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerDiagnostics.logs", + "serializationOptions": { + "$id": "1352", + "json": { + "$id": "1353", + "name": "logs" + } + } + }, + { + "$id": "1354", + "kind": "property", + "name": "metrics", + "serializedName": "metrics", + "doc": "The metrics settings for the resource.", + "type": { + "$ref": "929" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerDiagnostics.metrics", + "serializationOptions": { + "$id": "1355", + "json": { + "$id": "1356", + "name": "metrics" + } + } + }, + { + "$id": "1357", + "kind": "property", + "name": "selfCheck", + "serializedName": "selfCheck", + "doc": "The self check properties.", + "type": { + "$id": "1358", + "kind": "model", + "name": "BrokerDiagnosticSelfCheck", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfCheck", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker Diagnostic Self check properties", + "decorators": [], + "properties": [ + { + "$id": "1359", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "The toggle to enable/disable self check.", + "type": { + "$ref": "62" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfCheck.mode", + "serializationOptions": { + "$id": "1360", + "json": { + "$id": "1361", + "name": "mode" + } + } + }, + { + "$id": "1362", + "kind": "property", + "name": "intervalSeconds", + "serializedName": "intervalSeconds", + "doc": "The self check interval.", + "type": { + "$id": "1363", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfCheck.intervalSeconds", + "serializationOptions": { + "$id": "1364", + "json": { + "$id": "1365", + "name": "intervalSeconds" + } + } + }, + { + "$id": "1366", + "kind": "property", + "name": "timeoutSeconds", + "serializedName": "timeoutSeconds", + "doc": "The timeout for self check.", + "type": { + "$id": "1367", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfCheck.timeoutSeconds", + "serializationOptions": { + "$id": "1368", + "json": { + "$id": "1369", + "name": "timeoutSeconds" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerDiagnostics.selfCheck", + "serializationOptions": { + "$id": "1370", + "json": { + "$id": "1371", + "name": "selfCheck" + } + } + }, + { + "$id": "1372", + "kind": "property", + "name": "traces", + "serializedName": "traces", + "doc": "The trace properties.", + "type": { + "$id": "1373", + "kind": "model", + "name": "BrokerDiagnosticTraces", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Traces", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker Diagnostic Trace properties", + "decorators": [], + "properties": [ + { + "$id": "1374", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "The toggle to enable/disable traces.", + "type": { + "$ref": "62" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Traces.mode", + "serializationOptions": { + "$id": "1375", + "json": { + "$id": "1376", + "name": "mode" + } + } + }, + { + "$id": "1377", + "kind": "property", + "name": "cacheSizeMegabytes", + "serializedName": "cacheSizeMegabytes", + "doc": "The cache size in megabytes.", + "type": { + "$id": "1378", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Traces.cacheSizeMegabytes", + "serializationOptions": { + "$id": "1379", + "json": { + "$id": "1380", + "name": "cacheSizeMegabytes" + } + } + }, + { + "$id": "1381", + "kind": "property", + "name": "selfTracing", + "serializedName": "selfTracing", + "doc": "The self tracing properties.", + "type": { + "$id": "1382", + "kind": "model", + "name": "DiagnosticSelfTracing", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfTracing", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Diagnostic Self tracing properties", + "decorators": [], + "properties": [ + { + "$id": "1383", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "The toggle to enable/disable self tracing.", + "type": { + "$ref": "62" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfTracing.mode", + "serializationOptions": { + "$id": "1384", + "json": { + "$id": "1385", + "name": "mode" + } + } + }, + { + "$id": "1386", + "kind": "property", + "name": "intervalSeconds", + "serializedName": "intervalSeconds", + "doc": "The self tracing interval.", + "type": { + "$id": "1387", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfTracing.intervalSeconds", + "serializationOptions": { + "$id": "1388", + "json": { + "$id": "1389", + "name": "intervalSeconds" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Traces.selfTracing", + "serializationOptions": { + "$id": "1390", + "json": { + "$id": "1391", + "name": "selfTracing" + } + } + }, + { + "$id": "1392", + "kind": "property", + "name": "spanChannelCapacity", + "serializedName": "spanChannelCapacity", + "doc": "The span channel capacity.", + "type": { + "$id": "1393", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Traces.spanChannelCapacity", + "serializationOptions": { + "$id": "1394", + "json": { + "$id": "1395", + "name": "spanChannelCapacity" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerDiagnostics.traces", + "serializationOptions": { + "$id": "1396", + "json": { + "$id": "1397", + "name": "traces" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.diagnostics", + "serializationOptions": { + "$id": "1398", + "json": { + "$id": "1399", + "name": "diagnostics" + } + } + }, + { + "$id": "1400", + "kind": "property", + "name": "diskBackedMessageBuffer", + "serializedName": "diskBackedMessageBuffer", + "doc": "Settings of Disk Backed Message Buffer.", + "type": { + "$id": "1401", + "kind": "model", + "name": "DiskBackedMessageBuffer", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiskBackedMessageBuffer", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DiskBackedMessageBuffer properties", + "decorators": [], + "properties": [ + { + "$id": "1402", + "kind": "property", + "name": "maxSize", + "serializedName": "maxSize", + "doc": "The max size of the message buffer on disk. If a PVC template is specified using one of ephemeralVolumeClaimSpec or persistentVolumeClaimSpec, then this size is used as the request and limit sizes of that template. If neither ephemeralVolumeClaimSpec nor persistentVolumeClaimSpec are specified, then an emptyDir volume is mounted with this size as its limit. See for details.", + "type": { + "$id": "1403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiskBackedMessageBuffer.maxSize", + "serializationOptions": { + "$id": "1404", + "json": { + "$id": "1405", + "name": "maxSize" + } + } + }, + { + "$id": "1406", + "kind": "property", + "name": "ephemeralVolumeClaimSpec", + "serializedName": "ephemeralVolumeClaimSpec", + "doc": "Use the specified persistent volume claim template to mount a \"generic ephemeral volume\" for the message buffer. See for details.", + "type": { + "$id": "1407", + "kind": "model", + "name": "VolumeClaimSpec", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "VolumeClaimSpec properties", + "decorators": [], + "properties": [ + { + "$id": "1408", + "kind": "property", + "name": "volumeName", + "serializedName": "volumeName", + "doc": "VolumeName is the binding reference to the PersistentVolume backing this claim.", + "type": { + "$id": "1409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.volumeName", + "serializationOptions": { + "$id": "1410", + "json": { + "$id": "1411", + "name": "volumeName" + } + } + }, + { + "$id": "1412", + "kind": "property", + "name": "volumeMode", + "serializedName": "volumeMode", + "doc": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is a beta feature.", + "type": { + "$id": "1413", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.volumeMode", + "serializationOptions": { + "$id": "1414", + "json": { + "$id": "1415", + "name": "volumeMode" + } + } + }, + { + "$id": "1416", + "kind": "property", + "name": "storageClassName", + "serializedName": "storageClassName", + "doc": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", + "type": { + "$id": "1417", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.storageClassName", + "serializationOptions": { + "$id": "1418", + "json": { + "$id": "1419", + "name": "storageClassName" + } + } + }, + { + "$id": "1420", + "kind": "property", + "name": "accessModes", + "serializedName": "accessModes", + "doc": "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + "type": { + "$id": "1421", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1422", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.accessModes", + "serializationOptions": { + "$id": "1423", + "json": { + "$id": "1424", + "name": "accessModes" + } + } + }, + { + "$id": "1425", + "kind": "property", + "name": "dataSource", + "serializedName": "dataSource", + "doc": "This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.", + "type": { + "$id": "1426", + "kind": "model", + "name": "LocalKubernetesReference", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.LocalKubernetesReference", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Kubernetes reference", + "decorators": [], + "properties": [ + { + "$id": "1427", + "kind": "property", + "name": "apiGroup", + "serializedName": "apiGroup", + "doc": "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + "type": { + "$id": "1428", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.LocalKubernetesReference.apiGroup", + "serializationOptions": { + "$id": "1429", + "json": { + "$id": "1430", + "name": "apiGroup" + } + } + }, + { + "$id": "1431", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Kind is the type of resource being referenced", + "type": { + "$id": "1432", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.LocalKubernetesReference.kind", + "serializationOptions": { + "$id": "1433", + "json": { + "$id": "1434", + "name": "kind" + } + } + }, + { + "$id": "1435", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name is the name of resource being referenced", + "type": { + "$id": "1436", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.LocalKubernetesReference.name", + "serializationOptions": { + "$id": "1437", + "json": { + "$id": "1438", + "name": "name" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.dataSource", + "serializationOptions": { + "$id": "1439", + "json": { + "$id": "1440", + "name": "dataSource" + } + } + }, + { + "$id": "1441", + "kind": "property", + "name": "dataSourceRef", + "serializedName": "dataSourceRef", + "doc": "Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.", + "type": { + "$id": "1442", + "kind": "model", + "name": "KubernetesReference", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KubernetesReference", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Kubernetes reference", + "decorators": [], + "properties": [ + { + "$id": "1443", + "kind": "property", + "name": "apiGroup", + "serializedName": "apiGroup", + "doc": "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + "type": { + "$id": "1444", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KubernetesReference.apiGroup", + "serializationOptions": { + "$id": "1445", + "json": { + "$id": "1446", + "name": "apiGroup" + } + } + }, + { + "$id": "1447", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Kind is the type of resource being referenced", + "type": { + "$id": "1448", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KubernetesReference.kind", + "serializationOptions": { + "$id": "1449", + "json": { + "$id": "1450", + "name": "kind" + } + } + }, + { + "$id": "1451", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name is the name of resource being referenced", + "type": { + "$id": "1452", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KubernetesReference.name", + "serializationOptions": { + "$id": "1453", + "json": { + "$id": "1454", + "name": "name" + } + } + }, + { + "$id": "1455", + "kind": "property", + "name": "namespace", + "serializedName": "namespace", + "doc": "Namespace is the namespace of the resource being referenced. This field is required when the resource has a namespace.", + "type": { + "$id": "1456", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KubernetesReference.namespace", + "serializationOptions": { + "$id": "1457", + "json": { + "$id": "1458", + "name": "namespace" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.dataSourceRef", + "serializationOptions": { + "$id": "1459", + "json": { + "$id": "1460", + "name": "dataSourceRef" + } + } + }, + { + "$id": "1461", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + "type": { + "$id": "1462", + "kind": "model", + "name": "VolumeClaimResourceRequirements", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimResourceRequirements", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "VolumeClaimResourceRequirements properties", + "decorators": [], + "properties": [ + { + "$id": "1463", + "kind": "property", + "name": "limits", + "serializedName": "limits", + "doc": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "type": { + "$id": "1464", + "kind": "dict", + "keyType": { + "$id": "1465", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1466", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimResourceRequirements.limits", + "serializationOptions": { + "$id": "1467", + "json": { + "$id": "1468", + "name": "limits" + } + } + }, + { + "$id": "1469", + "kind": "property", + "name": "requests", + "serializedName": "requests", + "doc": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "type": { + "$id": "1470", + "kind": "dict", + "keyType": { + "$id": "1471", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1472", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimResourceRequirements.requests", + "serializationOptions": { + "$id": "1473", + "json": { + "$id": "1474", + "name": "requests" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.resources", + "serializationOptions": { + "$id": "1475", + "json": { + "$id": "1476", + "name": "resources" + } + } + }, + { + "$id": "1477", + "kind": "property", + "name": "selector", + "serializedName": "selector", + "doc": "A label query over volumes to consider for binding.", + "type": { + "$id": "1478", + "kind": "model", + "name": "VolumeClaimSpecSelector", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelector", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "VolumeClaimSpecSelector properties", + "decorators": [], + "properties": [ + { + "$id": "1479", + "kind": "property", + "name": "matchExpressions", + "serializedName": "matchExpressions", + "doc": "MatchExpressions is a list of label selector requirements. The requirements are ANDed.", + "type": { + "$id": "1480", + "kind": "array", + "name": "ArrayVolumeClaimSpecSelectorMatchExpressions", + "valueType": { + "$id": "1481", + "kind": "model", + "name": "VolumeClaimSpecSelectorMatchExpressions", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelectorMatchExpressions", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "VolumeClaimSpecSelectorMatchExpressions properties", + "decorators": [], + "properties": [ + { + "$id": "1482", + "kind": "property", + "name": "key", + "serializedName": "key", + "doc": "key is the label key that the selector applies to.", + "type": { + "$id": "1483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelectorMatchExpressions.key", + "serializationOptions": { + "$id": "1484", + "json": { + "$id": "1485", + "name": "key" + } + } + }, + { + "$id": "1486", + "kind": "property", + "name": "operator", + "serializedName": "operator", + "doc": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", + "type": { + "$ref": "280" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelectorMatchExpressions.operator", + "serializationOptions": { + "$id": "1487", + "json": { + "$id": "1488", + "name": "operator" + } + } + }, + { + "$id": "1489", + "kind": "property", + "name": "values", + "serializedName": "values", + "doc": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", + "type": { + "$id": "1490", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1491", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelectorMatchExpressions.values", + "serializationOptions": { + "$id": "1492", + "json": { + "$id": "1493", + "name": "values" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelector.matchExpressions", + "serializationOptions": { + "$id": "1494", + "json": { + "$id": "1495", + "name": "matchExpressions" + } + } + }, + { + "$id": "1496", + "kind": "property", + "name": "matchLabels", + "serializedName": "matchLabels", + "doc": "MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", + "type": { + "$id": "1497", + "kind": "dict", + "keyType": { + "$id": "1498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1499", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelector.matchLabels", + "serializationOptions": { + "$id": "1500", + "json": { + "$id": "1501", + "name": "matchLabels" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.selector", + "serializationOptions": { + "$id": "1502", + "json": { + "$id": "1503", + "name": "selector" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiskBackedMessageBuffer.ephemeralVolumeClaimSpec", + "serializationOptions": { + "$id": "1504", + "json": { + "$id": "1505", + "name": "ephemeralVolumeClaimSpec" + } + } + }, + { + "$id": "1506", + "kind": "property", + "name": "persistentVolumeClaimSpec", + "serializedName": "persistentVolumeClaimSpec", + "doc": "Use the specified persistent volume claim template to mount a persistent volume for the message buffer.", + "type": { + "$ref": "1407" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiskBackedMessageBuffer.persistentVolumeClaimSpec", + "serializationOptions": { + "$id": "1507", + "json": { + "$id": "1508", + "name": "persistentVolumeClaimSpec" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.diskBackedMessageBuffer", + "serializationOptions": { + "$id": "1509", + "json": { + "$id": "1510", + "name": "diskBackedMessageBuffer" + } + } + }, + { + "$id": "1511", + "kind": "property", + "name": "generateResourceLimits", + "serializedName": "generateResourceLimits", + "doc": "This setting controls whether Kubernetes CPU resource limits are requested. Increasing the number of replicas or workers proportionally increases the amount of CPU resources requested. If this setting is enabled and there are insufficient CPU resources, an error will be emitted.", + "type": { + "$id": "1512", + "kind": "model", + "name": "GenerateResourceLimits", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.GenerateResourceLimits", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "GenerateResourceLimits properties", + "decorators": [], + "properties": [ + { + "$id": "1513", + "kind": "property", + "name": "cpu", + "serializedName": "cpu", + "doc": "The toggle to enable/disable cpu resource limits.", + "type": { + "$ref": "62" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.GenerateResourceLimits.cpu", + "serializationOptions": { + "$id": "1514", + "json": { + "$id": "1515", + "name": "cpu" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.generateResourceLimits", + "serializationOptions": { + "$id": "1516", + "json": { + "$id": "1517", + "name": "generateResourceLimits" + } + } + }, + { + "$id": "1518", + "kind": "property", + "name": "memoryProfile", + "serializedName": "memoryProfile", + "doc": "Memory profile of Broker.", + "type": { + "$ref": "290" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.memoryProfile", + "serializationOptions": { + "$id": "1519", + "json": { + "$id": "1520", + "name": "memoryProfile" + } + } + }, + { + "$id": "1521", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "126" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.provisioningState", + "serializationOptions": { + "$id": "1522", + "json": { + "$id": "1523", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResource.properties", + "serializationOptions": { + "$id": "1524", + "json": { + "$id": "1525", + "name": "properties" + } + } + }, + { + "$id": "1526", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "679" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResource.extendedLocation", + "serializationOptions": { + "$id": "1527", + "json": { + "$id": "1528", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "1259" + }, + { + "$ref": "1261" + }, + { + "$ref": "1263" + }, + { + "$ref": "1277" + }, + { + "$ref": "1301" + }, + { + "$ref": "1318" + }, + { + "$ref": "1320" + }, + { + "$ref": "1336" + }, + { + "$ref": "1350" + }, + { + "$ref": "1358" + }, + { + "$ref": "1373" + }, + { + "$ref": "1382" + }, + { + "$ref": "1401" + }, + { + "$ref": "1407" + }, + { + "$ref": "1426" + }, + { + "$ref": "1442" + }, + { + "$ref": "1462" + }, + { + "$ref": "1478" + }, + { + "$ref": "1481" + }, + { + "$ref": "1512" + }, + { + "$id": "1529", + "kind": "model", + "name": "BrokerResourceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a BrokerResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "1530", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The BrokerResource items on this page", + "type": { + "$id": "1531", + "kind": "array", + "name": "ArrayBrokerResource", + "valueType": { + "$ref": "1257" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1532", + "json": { + "$id": "1533", + "name": "value" + } + } + }, + { + "$id": "1534", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1535", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1536", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "1537", + "json": { + "$id": "1538", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1539", + "kind": "model", + "name": "IotOperationsInstance", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "A Instance resource is a logical container for a set of child resources.", + "decorators": [], + "baseModel": { + "$id": "1540", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$ref": "338" + }, + "properties": [ + { + "$id": "1541", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "1542", + "kind": "dict", + "keyType": { + "$id": "1543", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1544", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags", + "serializationOptions": { + "$id": "1545", + "json": { + "$id": "1546", + "name": "tags" + } + } + }, + { + "$id": "1547", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "1548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location", + "serializationOptions": { + "$id": "1549", + "json": { + "$id": "1550", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "1551", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "1552", + "kind": "model", + "name": "IotOperationsInstanceProperties", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The properties of the Instance resource.", + "decorators": [], + "properties": [ + { + "$id": "1553", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Detailed description of the Instance.", + "type": { + "$id": "1554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceProperties.description", + "serializationOptions": { + "$id": "1555", + "json": { + "$id": "1556", + "name": "description" + } + } + }, + { + "$id": "1557", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "126" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceProperties.provisioningState", + "serializationOptions": { + "$id": "1558", + "json": { + "$id": "1559", + "name": "provisioningState" + } + } + }, + { + "$id": "1560", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "The Azure IoT Operations version.", + "type": { + "$id": "1561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceProperties.version", + "serializationOptions": { + "$id": "1562", + "json": { + "$id": "1563", + "name": "version" + } + } + }, + { + "$id": "1564", + "kind": "property", + "name": "schemaRegistryRef", + "serializedName": "schemaRegistryRef", + "doc": "The reference to the Schema Registry for this AIO Instance.", + "type": { + "$id": "1565", + "kind": "model", + "name": "SchemaRegistryRef", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SchemaRegistryRef", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The reference to the Schema Registry for this AIO Instance.", + "decorators": [], + "properties": [ + { + "$id": "1566", + "kind": "property", + "name": "resourceId", + "serializedName": "resourceId", + "doc": "The resource ID of the Schema Registry.", + "type": { + "$id": "1567", + "kind": "string", + "name": "SchemaRegistryID", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SchemaRegistryID", + "baseType": { + "$id": "1568", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1569", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SchemaRegistryRef.resourceId", + "serializationOptions": { + "$id": "1570", + "json": { + "$id": "1571", + "name": "resourceId" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceProperties.schemaRegistryRef", + "serializationOptions": { + "$id": "1572", + "json": { + "$id": "1573", + "name": "schemaRegistryRef" + } + } + }, + { + "$id": "1574", + "kind": "property", + "name": "features", + "serializedName": "features", + "doc": "The features of the AIO Instance.", + "type": { + "$id": "1575", + "kind": "dict", + "keyType": { + "$id": "1576", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1577", + "kind": "model", + "name": "InstanceFeature", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceFeature", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The features of the AIO Instance.", + "decorators": [], + "properties": [ + { + "$id": "1578", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "The state of the feature.", + "type": { + "$ref": "300" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceFeature.mode", + "serializationOptions": { + "$id": "1579", + "json": { + "$id": "1580", + "name": "mode" + } + } + }, + { + "$id": "1581", + "kind": "property", + "name": "settings", + "serializedName": "settings", + "doc": "The settings of the feature.", + "type": { + "$id": "1582", + "kind": "dict", + "keyType": { + "$id": "1583", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "62" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceFeature.settings", + "serializationOptions": { + "$id": "1584", + "json": { + "$id": "1585", + "name": "settings" + } + } + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceProperties.features", + "serializationOptions": { + "$id": "1586", + "json": { + "$id": "1587", + "name": "features" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceResource.properties", + "serializationOptions": { + "$id": "1588", + "json": { + "$id": "1589", + "name": "properties" + } + } + }, + { + "$id": "1590", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "679" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceResource.extendedLocation", + "serializationOptions": { + "$id": "1591", + "json": { + "$id": "1592", + "name": "extendedLocation" + } + } + }, + { + "$id": "1593", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$id": "1594", + "kind": "model", + "name": "ManagedServiceIdentity", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Managed service identity (system assigned and/or user assigned identities)", + "decorators": [], + "properties": [ + { + "$id": "1595", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "1596", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.principalId", + "serializationOptions": { + "$id": "1598", + "json": { + "$id": "1599", + "name": "principalId" + } + } + }, + { + "$id": "1600", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "1601", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1602", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.tenantId", + "serializationOptions": { + "$id": "1603", + "json": { + "$id": "1604", + "name": "tenantId" + } + } + }, + { + "$id": "1605", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "308" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.type", + "serializationOptions": { + "$id": "1606", + "json": { + "$id": "1607", + "name": "type" + } + } + }, + { + "$id": "1608", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "1609", + "kind": "dict", + "keyType": { + "$id": "1610", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1611", + "kind": "nullable", + "type": { + "$id": "1612", + "kind": "model", + "name": "UserAssignedIdentity", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "User assigned identity properties", + "decorators": [], + "properties": [ + { + "$id": "1613", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client ID of the assigned identity.", + "type": { + "$id": "1614", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1615", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.clientId", + "serializationOptions": { + "$id": "1616", + "json": { + "$id": "1617", + "name": "clientId" + } + } + }, + { + "$id": "1618", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal ID of the assigned identity.", + "type": { + "$id": "1619", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1620", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.principalId", + "serializationOptions": { + "$id": "1621", + "json": { + "$id": "1622", + "name": "principalId" + } + } + } + ] + }, + "namespace": "" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "1623", + "json": { + "$id": "1624", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceResource.identity", + "serializationOptions": { + "$id": "1625", + "json": { + "$id": "1626", + "name": "identity" + } + } + } + ] + }, + { + "$ref": "1552" + }, + { + "$ref": "1565" + }, + { + "$ref": "1577" + }, + { + "$ref": "1594" + }, + { + "$ref": "1612" + }, + { + "$ref": "1540" + }, + { + "$id": "1627", + "kind": "model", + "name": "InstancePatchModel", + "namespace": "Microsoft.IoTOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstancePatchModel", + "usage": "Input,Json", + "doc": "The Instance update model.", + "decorators": [], + "properties": [ + { + "$id": "1628", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "1629", + "kind": "dict", + "keyType": { + "$id": "1630", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1631", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstancePatchModel.tags", + "serializationOptions": { + "$id": "1632", + "json": { + "$id": "1633", + "name": "tags" + } + } + }, + { + "$id": "1634", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$ref": "1594" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstancePatchModel.identity", + "serializationOptions": { + "$id": "1635", + "json": { + "$id": "1636", + "name": "identity" + } + } + } + ] + }, + { + "$id": "1637", + "kind": "model", + "name": "InstanceResourceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a InstanceResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "1638", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The InstanceResource items on this page", + "type": { + "$id": "1639", + "kind": "array", + "name": "ArrayInstanceResource", + "valueType": { + "$ref": "1539" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1640", + "json": { + "$id": "1641", + "name": "value" + } + } + }, + { + "$id": "1642", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1643", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1644", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "1645", + "json": { + "$id": "1646", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1647", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult", + "usage": "Output,Json", + "doc": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "decorators": [], + "properties": [ + { + "$id": "1648", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "1649", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "1650", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation", + "usage": "Output,Json", + "doc": "Details of a REST API operation, returned from the Resource Provider Operations API", + "decorators": [], + "properties": [ + { + "$id": "1651", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": { + "$id": "1652", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name", + "serializationOptions": { + "$id": "1653", + "json": { + "$id": "1654", + "name": "name" + } + } + }, + { + "$id": "1655", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.", + "type": { + "$id": "1656", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction", + "serializationOptions": { + "$id": "1657", + "json": { + "$id": "1658", + "name": "isDataAction" + } + } + }, + { + "$id": "1659", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "1660", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "1661", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": { + "$id": "1662", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider", + "serializationOptions": { + "$id": "1663", + "json": { + "$id": "1664", + "name": "provider" + } + } + }, + { + "$id": "1665", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": { + "$id": "1666", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource", + "serializationOptions": { + "$id": "1667", + "json": { + "$id": "1668", + "name": "resource" + } + } + }, + { + "$id": "1669", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": { + "$id": "1670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation", + "serializationOptions": { + "$id": "1671", + "json": { + "$id": "1672", + "name": "operation" + } + } + }, + { + "$id": "1673", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "1674", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description", + "serializationOptions": { + "$id": "1675", + "json": { + "$id": "1676", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "1677", + "json": { + "$id": "1678", + "name": "display" + } + } + }, + { + "$id": "1679", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": { + "$ref": "318" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin", + "serializationOptions": { + "$id": "1680", + "json": { + "$id": "1681", + "name": "origin" + } + } + }, + { + "$id": "1682", + "kind": "property", + "name": "actionType", + "serializedName": "actionType", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": { + "$ref": "326" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType", + "serializationOptions": { + "$id": "1683", + "json": { + "$id": "1684", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "1685", + "json": { + "$id": "1686", + "name": "value" + } + } + }, + { + "$id": "1687", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1688", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1689", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.nextLink", + "serializationOptions": { + "$id": "1690", + "json": { + "$id": "1691", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "1650" + }, + { + "$ref": "1660" + } + ], + "Clients": [ + { + "$id": "1692", + "Name": "IoTOperationsClient", + "Namespace": "Microsoft.IoTOperations", + "Doc": "Microsoft.IoTOperations Resource Provider management API.", + "Operations": [], + "Protocol": { + "$id": "1693" + }, + "Parameters": [ + { + "$id": "1694", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "1695", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "1696", + "Type": { + "$id": "1697", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.IoTOperations" + }, + { + "$id": "1698", + "Name": "Operations", + "Namespace": "Microsoft.IoTOperations", + "Operations": [ + { + "$id": "1699", + "Name": "list", + "ResourceName": "Operations", + "Doc": "List the operations for the provider", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1700", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1701", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1702", + "Type": { + "$id": "1703", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1704", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1705", + "kind": "constant", + "valueType": { + "$id": "1706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1707", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1647" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/providers/Microsoft.IoTOperations/operations", + "BufferResponse": true, + "Paging": { + "$id": "1708", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "1709", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "Decorators": [], + "Examples": [ + { + "$id": "1710", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2025-04-01/Operations_List_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1711", + "parameter": { + "$ref": "1700" + }, + "value": { + "$id": "1712", + "kind": "string", + "type": { + "$ref": "1701" + }, + "value": "2025-04-01" + } + } + ], + "responses": [ + { + "$id": "1713", + "response": { + "$ref": "1707" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1714", + "kind": "model", + "type": { + "$ref": "1647" + }, + "value": { + "$id": "1715", + "value": { + "$id": "1716", + "kind": "array", + "type": { + "$ref": "1649" + }, + "value": [ + { + "$id": "1717", + "kind": "model", + "type": { + "$ref": "1650" + }, + "value": { + "$id": "1718", + "name": { + "$id": "1719", + "kind": "string", + "type": { + "$ref": "1652" + }, + "value": "xzxqfusky" + }, + "isDataAction": { + "$id": "1720", + "kind": "boolean", + "type": { + "$ref": "1656" + }, + "value": true + }, + "display": { + "$id": "1721", + "kind": "model", + "type": { + "$ref": "1660" + }, + "value": { + "$id": "1722", + "provider": { + "$id": "1723", + "kind": "string", + "type": { + "$ref": "1662" + }, + "value": "lrveskajtuwf" + }, + "resource": { + "$id": "1724", + "kind": "string", + "type": { + "$ref": "1666" + }, + "value": "d" + }, + "operation": { + "$id": "1725", + "kind": "string", + "type": { + "$ref": "1670" + }, + "value": "icuckgobartrrgmirax" + }, + "description": { + "$id": "1726", + "kind": "string", + "type": { + "$ref": "1674" + }, + "value": "dsbfnxzvnoqdm" + } + } + }, + "origin": { + "$id": "1727", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "user" + }, + "actionType": { + "$id": "1728", + "kind": "string", + "type": { + "$ref": "326" + }, + "value": "Internal" + } + } + } + ] + }, + "nextLink": { + "$id": "1729", + "kind": "string", + "type": { + "$ref": "1688" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "1730" + }, + "Parent": "IoTOperationsClient", + "Parameters": [ + { + "$id": "1731", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "1732", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "1733", + "Type": { + "$id": "1734", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Operations" + }, + { + "$id": "1735", + "Name": "Instance", + "Namespace": "Microsoft.IoTOperations", + "Operations": [ + { + "$id": "1736", + "Name": "get", + "ResourceName": "InstanceResource", + "Doc": "Get a InstanceResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1737", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1738", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1739", + "Type": { + "$id": "1740", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1741", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1742", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1743", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1744", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1746", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "1747", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1748", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1749", + "kind": "constant", + "valueType": { + "$id": "1750", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1751", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1539" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.get", + "Decorators": [], + "Examples": [ + { + "$id": "1752", + "kind": "http", + "name": "Instance_Get", + "description": "Instance_Get", + "filePath": "2025-04-01/Instance_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1753", + "parameter": { + "$ref": "1737" + }, + "value": { + "$id": "1754", + "kind": "string", + "type": { + "$ref": "1738" + }, + "value": "2025-04-01" + } + }, + { + "$id": "1755", + "parameter": { + "$ref": "1741" + }, + "value": { + "$id": "1756", + "kind": "string", + "type": { + "$ref": "1742" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "1757", + "parameter": { + "$ref": "1744" + }, + "value": { + "$id": "1758", + "kind": "string", + "type": { + "$ref": "1745" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "1759", + "parameter": { + "$ref": "1746" + }, + "value": { + "$id": "1760", + "kind": "string", + "type": { + "$ref": "1747" + }, + "value": "aio-instance" + } + } + ], + "responses": [ + { + "$id": "1761", + "response": { + "$ref": "1751" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1762", + "kind": "model", + "type": { + "$ref": "1539" + }, + "value": { + "$id": "1763", + "properties": { + "$id": "1764", + "kind": "model", + "type": { + "$ref": "1552" + }, + "value": { + "$id": "1765", + "schemaRegistryRef": { + "$id": "1766", + "kind": "model", + "type": { + "$ref": "1565" + }, + "value": { + "$id": "1767", + "resourceId": { + "$id": "1768", + "kind": "string", + "type": { + "$ref": "1567" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "1769", + "kind": "string", + "type": { + "$ref": "1554" + }, + "value": "rlfvvnnhcypp" + }, + "provisioningState": { + "$id": "1770", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + }, + "version": { + "$id": "1771", + "kind": "string", + "type": { + "$ref": "1561" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + }, + "features": { + "$id": "1772", + "kind": "dict", + "type": { + "$ref": "1575" + }, + "value": { + "$id": "1773", + "dataFlows": { + "$id": "1774", + "kind": "model", + "type": { + "$ref": "1577" + }, + "value": { + "$id": "1775", + "mode": { + "$id": "1776", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Disabled" + } + } + }, + "akri": { + "$id": "1777", + "kind": "model", + "type": { + "$ref": "1577" + }, + "value": { + "$id": "1778", + "mode": { + "$id": "1779", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "Preview" + } + } + }, + "mqttBroker": { + "$id": "1780", + "kind": "model", + "type": { + "$ref": "1577" + }, + "value": { + "$id": "1781", + "settings": { + "$id": "1782", + "kind": "dict", + "type": { + "$ref": "1582" + }, + "value": { + "$id": "1783", + "preview": { + "$id": "1784", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "1785", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "1786", + "name": { + "$id": "1787", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "1788", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "1789", + "kind": "model", + "type": { + "$ref": "1594" + }, + "value": { + "$id": "1790", + "type": { + "$id": "1791", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1792", + "kind": "dict", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "1793" + } + }, + "principalId": { + "$id": "1794", + "kind": "string", + "type": { + "$ref": "1596" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "1795", + "kind": "string", + "type": { + "$ref": "1601" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "tags": { + "$id": "1796", + "kind": "dict", + "type": { + "$ref": "1542" + }, + "value": { + "$id": "1797" + } + }, + "location": { + "$id": "1798", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "1799", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "1800", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "1801", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "1802", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "1803", + "createdBy": { + "$id": "1804", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "1805", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "1806", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "1807", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "1808", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1809", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1810", + "Name": "createOrUpdate", + "ResourceName": "InstanceResource", + "Doc": "Create a InstanceResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1811", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1812", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1813", + "Type": { + "$id": "1814", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1815", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1816", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1817", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1818", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1819", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1820", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "1821", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1822", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "1823", + "kind": "constant", + "valueType": { + "$id": "1824", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1825", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1826", + "kind": "constant", + "valueType": { + "$id": "1827", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1828", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "1539" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1829", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1539" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "1830", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "1539" + }, + "Headers": [ + { + "$id": "1831", + "Name": "azureAsyncOperation", + "NameInResponse": "Azure-AsyncOperation", + "Doc": "A link to the status monitor", + "Type": { + "$id": "1832", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1833", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "1834", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "1835", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "1836", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1539" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.createOrUpdate", + "Decorators": [], + "Examples": [ + { + "$id": "1837", + "kind": "http", + "name": "Instance_CreateOrUpdate", + "description": "Instance_CreateOrUpdate", + "filePath": "2025-04-01/Instance_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1838", + "parameter": { + "$ref": "1811" + }, + "value": { + "$id": "1839", + "kind": "string", + "type": { + "$ref": "1812" + }, + "value": "2025-04-01" + } + }, + { + "$id": "1840", + "parameter": { + "$ref": "1815" + }, + "value": { + "$id": "1841", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "1842", + "parameter": { + "$ref": "1818" + }, + "value": { + "$id": "1843", + "kind": "string", + "type": { + "$ref": "1819" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "1844", + "parameter": { + "$ref": "1820" + }, + "value": { + "$id": "1845", + "kind": "string", + "type": { + "$ref": "1821" + }, + "value": "aio-instance" + } + }, + { + "$id": "1846", + "parameter": { + "$ref": "1828" + }, + "value": { + "$id": "1847", + "kind": "model", + "type": { + "$ref": "1539" + }, + "value": { + "$id": "1848", + "properties": { + "$id": "1849", + "kind": "model", + "type": { + "$ref": "1552" + }, + "value": { + "$id": "1850", + "schemaRegistryRef": { + "$id": "1851", + "kind": "model", + "type": { + "$ref": "1565" + }, + "value": { + "$id": "1852", + "resourceId": { + "$id": "1853", + "kind": "string", + "type": { + "$ref": "1567" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "1854", + "kind": "string", + "type": { + "$ref": "1554" + }, + "value": "kpqtgocs" + } + } + }, + "extendedLocation": { + "$id": "1855", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "1856", + "name": { + "$id": "1857", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "1858", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "1859", + "kind": "model", + "type": { + "$ref": "1594" + }, + "value": { + "$id": "1860", + "type": { + "$id": "1861", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1862", + "kind": "dict", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "1863" + } + } + } + }, + "tags": { + "$id": "1864", + "kind": "dict", + "type": { + "$ref": "1542" + }, + "value": { + "$id": "1865" + } + }, + "location": { + "$id": "1866", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "xvewadyhycrjpu" + } + } + } + } + ], + "responses": [ + { + "$id": "1867", + "response": { + "$ref": "1829" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1868", + "kind": "model", + "type": { + "$ref": "1539" + }, + "value": { + "$id": "1869", + "properties": { + "$id": "1870", + "kind": "model", + "type": { + "$ref": "1552" + }, + "value": { + "$id": "1871", + "schemaRegistryRef": { + "$id": "1872", + "kind": "model", + "type": { + "$ref": "1565" + }, + "value": { + "$id": "1873", + "resourceId": { + "$id": "1874", + "kind": "string", + "type": { + "$ref": "1567" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "1875", + "kind": "string", + "type": { + "$ref": "1554" + }, + "value": "kpqtgocs" + }, + "provisioningState": { + "$id": "1876", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + }, + "version": { + "$id": "1877", + "kind": "string", + "type": { + "$ref": "1561" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + } + } + }, + "extendedLocation": { + "$id": "1878", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "1879", + "name": { + "$id": "1880", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "1881", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "1882", + "kind": "model", + "type": { + "$ref": "1594" + }, + "value": { + "$id": "1883", + "type": { + "$id": "1884", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1885", + "kind": "dict", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "1886" + } + }, + "principalId": { + "$id": "1887", + "kind": "string", + "type": { + "$ref": "1596" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "1888", + "kind": "string", + "type": { + "$ref": "1601" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "tags": { + "$id": "1889", + "kind": "dict", + "type": { + "$ref": "1542" + }, + "value": { + "$id": "1890" + } + }, + "location": { + "$id": "1891", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "1892", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "1893", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "1894", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "1895", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "1896", + "createdBy": { + "$id": "1897", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "1898", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "1899", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "1900", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "1901", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1902", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "1903", + "response": { + "$ref": "1830" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1904", + "kind": "model", + "type": { + "$ref": "1539" + }, + "value": { + "$id": "1905", + "properties": { + "$id": "1906", + "kind": "model", + "type": { + "$ref": "1552" + }, + "value": { + "$id": "1907", + "schemaRegistryRef": { + "$id": "1908", + "kind": "model", + "type": { + "$ref": "1565" + }, + "value": { + "$id": "1909", + "resourceId": { + "$id": "1910", + "kind": "string", + "type": { + "$ref": "1567" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "1911", + "kind": "string", + "type": { + "$ref": "1554" + }, + "value": "kpqtgocs" + }, + "provisioningState": { + "$id": "1912", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + }, + "version": { + "$id": "1913", + "kind": "string", + "type": { + "$ref": "1561" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + } + } + }, + "extendedLocation": { + "$id": "1914", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "1915", + "name": { + "$id": "1916", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "1917", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "1918", + "kind": "model", + "type": { + "$ref": "1594" + }, + "value": { + "$id": "1919", + "type": { + "$id": "1920", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1921", + "kind": "dict", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "1922" + } + }, + "principalId": { + "$id": "1923", + "kind": "string", + "type": { + "$ref": "1596" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "1924", + "kind": "string", + "type": { + "$ref": "1601" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "tags": { + "$id": "1925", + "kind": "dict", + "type": { + "$ref": "1542" + }, + "value": { + "$id": "1926" + } + }, + "location": { + "$id": "1927", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "1928", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "1929", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "1930", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "1931", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "1932", + "createdBy": { + "$id": "1933", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "1934", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "1935", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "1936", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "1937", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1938", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1939", + "Name": "update", + "ResourceName": "InstanceResource", + "Doc": "Update a InstanceResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1940", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1941", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1942", + "Type": { + "$id": "1943", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1944", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1945", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1946", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1947", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1948", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1949", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "1950", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1951", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "1952", + "kind": "constant", + "valueType": { + "$id": "1953", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1954", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1955", + "kind": "constant", + "valueType": { + "$id": "1956", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1957", + "Name": "properties", + "NameInRequest": "properties", + "Doc": "The resource properties to be updated.", + "Type": { + "$ref": "1627" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1958", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1539" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.update", + "Decorators": [], + "Examples": [ + { + "$id": "1959", + "kind": "http", + "name": "Instance_Update", + "description": "Instance_Update", + "filePath": "2025-04-01/Instance_Update_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1960", + "parameter": { + "$ref": "1940" + }, + "value": { + "$id": "1961", + "kind": "string", + "type": { + "$ref": "1941" + }, + "value": "2025-04-01" + } + }, + { + "$id": "1962", + "parameter": { + "$ref": "1944" + }, + "value": { + "$id": "1963", + "kind": "string", + "type": { + "$ref": "1945" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "1964", + "parameter": { + "$ref": "1947" + }, + "value": { + "$id": "1965", + "kind": "string", + "type": { + "$ref": "1948" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "1966", + "parameter": { + "$ref": "1949" + }, + "value": { + "$id": "1967", + "kind": "string", + "type": { + "$ref": "1950" + }, + "value": "aio-instance" + } + }, + { + "$id": "1968", + "parameter": { + "$ref": "1957" + }, + "value": { + "$id": "1969", + "kind": "model", + "type": { + "$ref": "1627" + }, + "value": { + "$id": "1970", + "tags": { + "$id": "1971", + "kind": "dict", + "type": { + "$ref": "1629" + }, + "value": { + "$id": "1972" + } + }, + "identity": { + "$id": "1973", + "kind": "model", + "type": { + "$ref": "1594" + }, + "value": { + "$id": "1974", + "type": { + "$id": "1975", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1976", + "kind": "dict", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "1977" + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1978", + "response": { + "$ref": "1958" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1979", + "kind": "model", + "type": { + "$ref": "1539" + }, + "value": { + "$id": "1980", + "properties": { + "$id": "1981", + "kind": "model", + "type": { + "$ref": "1552" + }, + "value": { + "$id": "1982", + "schemaRegistryRef": { + "$id": "1983", + "kind": "model", + "type": { + "$ref": "1565" + }, + "value": { + "$id": "1984", + "resourceId": { + "$id": "1985", + "kind": "string", + "type": { + "$ref": "1567" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "1986", + "kind": "string", + "type": { + "$ref": "1554" + }, + "value": "wwihkapmgjbyrtyaj" + }, + "provisioningState": { + "$id": "1987", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + }, + "version": { + "$id": "1988", + "kind": "string", + "type": { + "$ref": "1561" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + } + } + }, + "extendedLocation": { + "$id": "1989", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "1990", + "name": { + "$id": "1991", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "1992", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "1993", + "kind": "model", + "type": { + "$ref": "1594" + }, + "value": { + "$id": "1994", + "type": { + "$id": "1995", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1996", + "kind": "dict", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "1997" + } + }, + "principalId": { + "$id": "1998", + "kind": "string", + "type": { + "$ref": "1596" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "1999", + "kind": "string", + "type": { + "$ref": "1601" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "tags": { + "$id": "2000", + "kind": "dict", + "type": { + "$ref": "1542" + }, + "value": { + "$id": "2001" + } + }, + "location": { + "$id": "2002", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "2003", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "2004", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "2005", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "2006", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "2007", + "createdBy": { + "$id": "2008", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2009", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "2010", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2011", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2012", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2013", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2014", + "Name": "delete", + "ResourceName": "InstanceResource", + "Doc": "Delete a InstanceResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2015", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2016", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2017", + "Type": { + "$id": "2018", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2019", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2020", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2021", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2022", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2023", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2024", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "2025", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2026", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2027", + "kind": "constant", + "valueType": { + "$id": "2028", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2029", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "2030", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "2031", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2032", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "2033", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "2034", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}", + "BufferResponse": true, + "LongRunning": { + "$id": "2035", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "2036", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.delete", + "Decorators": [], + "Examples": [ + { + "$id": "2037", + "kind": "http", + "name": "Instance_Delete", + "description": "Instance_Delete", + "filePath": "2025-04-01/Instance_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2038", + "parameter": { + "$ref": "2015" + }, + "value": { + "$id": "2039", + "kind": "string", + "type": { + "$ref": "2016" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2040", + "parameter": { + "$ref": "2019" + }, + "value": { + "$id": "2041", + "kind": "string", + "type": { + "$ref": "2020" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2042", + "parameter": { + "$ref": "2022" + }, + "value": { + "$id": "2043", + "kind": "string", + "type": { + "$ref": "2023" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "2044", + "parameter": { + "$ref": "2024" + }, + "value": { + "$id": "2045", + "kind": "string", + "type": { + "$ref": "2025" + }, + "value": "aio-instance" + } + } + ], + "responses": [ + { + "$id": "2046", + "response": { + "$ref": "2029" + }, + "statusCode": 202 + }, + { + "$id": "2047", + "response": { + "$ref": "2034" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "2048", + "Name": "listByResourceGroup", + "ResourceName": "InstanceResource", + "Doc": "List InstanceResource resources by resource group", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2049", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2050", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2051", + "Type": { + "$id": "2052", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2053", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2054", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2055", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2056", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2057", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2058", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2059", + "kind": "constant", + "valueType": { + "$id": "2060", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2061", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1637" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances", + "BufferResponse": true, + "Paging": { + "$id": "2062", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "2063", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "2064", + "kind": "http", + "name": "Instance_ListByResourceGroup", + "description": "Instance_ListByResourceGroup", + "filePath": "2025-04-01/Instance_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2065", + "parameter": { + "$ref": "2049" + }, + "value": { + "$id": "2066", + "kind": "string", + "type": { + "$ref": "2050" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2067", + "parameter": { + "$ref": "2053" + }, + "value": { + "$id": "2068", + "kind": "string", + "type": { + "$ref": "2054" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2069", + "parameter": { + "$ref": "2056" + }, + "value": { + "$id": "2070", + "kind": "string", + "type": { + "$ref": "2057" + }, + "value": "rgiotoperations" + } + } + ], + "responses": [ + { + "$id": "2071", + "response": { + "$ref": "2061" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2072", + "kind": "model", + "type": { + "$ref": "1637" + }, + "value": { + "$id": "2073", + "value": { + "$id": "2074", + "kind": "array", + "type": { + "$ref": "1639" + }, + "value": [ + { + "$id": "2075", + "kind": "model", + "type": { + "$ref": "1539" + }, + "value": { + "$id": "2076", + "properties": { + "$id": "2077", + "kind": "model", + "type": { + "$ref": "1552" + }, + "value": { + "$id": "2078", + "provisioningState": { + "$id": "2079", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + }, + "version": { + "$id": "2080", + "kind": "string", + "type": { + "$ref": "1561" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + }, + "schemaRegistryRef": { + "$id": "2081", + "kind": "model", + "type": { + "$ref": "1565" + }, + "value": { + "$id": "2082", + "resourceId": { + "$id": "2083", + "kind": "string", + "type": { + "$ref": "1567" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "2084", + "kind": "string", + "type": { + "$ref": "1554" + }, + "value": "vmujggxdvxk" + } + } + }, + "extendedLocation": { + "$id": "2085", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "2086", + "name": { + "$id": "2087", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2088", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "2089", + "kind": "model", + "type": { + "$ref": "1594" + }, + "value": { + "$id": "2090", + "principalId": { + "$id": "2091", + "kind": "string", + "type": { + "$ref": "1596" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "2092", + "kind": "string", + "type": { + "$ref": "1601" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + }, + "type": { + "$id": "2093", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "2094", + "kind": "dict", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "2095" + } + } + } + }, + "tags": { + "$id": "2096", + "kind": "dict", + "type": { + "$ref": "1542" + }, + "value": { + "$id": "2097" + } + }, + "location": { + "$id": "2098", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "2099", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "2100", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "2101", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "2102", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "2103", + "createdBy": { + "$id": "2104", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2105", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "2106", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2107", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2108", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2109", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "2110", + "kind": "string", + "type": { + "$ref": "1643" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "2111", + "Name": "listBySubscription", + "ResourceName": "InstanceResource", + "Doc": "List InstanceResource resources by subscription ID", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2112", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2114", + "Type": { + "$id": "2115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2116", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2117", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2118", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2119", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2120", + "kind": "constant", + "valueType": { + "$id": "2121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2122", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1637" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.IoTOperations/instances", + "BufferResponse": true, + "Paging": { + "$id": "2123", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "2124", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.listBySubscription", + "Decorators": [], + "Examples": [ + { + "$id": "2125", + "kind": "http", + "name": "Instance_ListBySubscription", + "description": "Instance_ListBySubscription", + "filePath": "2025-04-01/Instance_ListBySubscription_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2126", + "parameter": { + "$ref": "2112" + }, + "value": { + "$id": "2127", + "kind": "string", + "type": { + "$ref": "2113" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2128", + "parameter": { + "$ref": "2116" + }, + "value": { + "$id": "2129", + "kind": "string", + "type": { + "$ref": "2117" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + } + ], + "responses": [ + { + "$id": "2130", + "response": { + "$ref": "2122" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2131", + "kind": "model", + "type": { + "$ref": "1637" + }, + "value": { + "$id": "2132", + "value": { + "$id": "2133", + "kind": "array", + "type": { + "$ref": "1639" + }, + "value": [ + { + "$id": "2134", + "kind": "model", + "type": { + "$ref": "1539" + }, + "value": { + "$id": "2135", + "properties": { + "$id": "2136", + "kind": "model", + "type": { + "$ref": "1552" + }, + "value": { + "$id": "2137", + "provisioningState": { + "$id": "2138", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + }, + "version": { + "$id": "2139", + "kind": "string", + "type": { + "$ref": "1561" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + }, + "schemaRegistryRef": { + "$id": "2140", + "kind": "model", + "type": { + "$ref": "1565" + }, + "value": { + "$id": "2141", + "resourceId": { + "$id": "2142", + "kind": "string", + "type": { + "$ref": "1567" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "2143", + "kind": "string", + "type": { + "$ref": "1554" + }, + "value": "empgqmbhvklcqlyahmdsjemlep" + } + } + }, + "extendedLocation": { + "$id": "2144", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "2145", + "name": { + "$id": "2146", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2147", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "2148", + "kind": "model", + "type": { + "$ref": "1594" + }, + "value": { + "$id": "2149", + "principalId": { + "$id": "2150", + "kind": "string", + "type": { + "$ref": "1596" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "2151", + "kind": "string", + "type": { + "$ref": "1601" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + }, + "type": { + "$id": "2152", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "2153", + "kind": "dict", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "2154" + } + } + } + }, + "tags": { + "$id": "2155", + "kind": "dict", + "type": { + "$ref": "1542" + }, + "value": { + "$id": "2156" + } + }, + "location": { + "$id": "2157", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "2158", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "2159", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "2160", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "2161", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "2162", + "createdBy": { + "$id": "2163", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2164", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "2165", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2166", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2167", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2168", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "2169", + "kind": "string", + "type": { + "$ref": "1643" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "2170" + }, + "Parent": "IoTOperationsClient", + "Parameters": [ + { + "$id": "2171", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "2172", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "2173", + "Type": { + "$id": "2174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Instance" + }, + { + "$id": "2175", + "Name": "Broker", + "Namespace": "Microsoft.IoTOperations", + "Operations": [ + { + "$id": "2176", + "Name": "get", + "ResourceName": "BrokerResource", + "Doc": "Get a BrokerResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2177", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2178", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2179", + "Type": { + "$id": "2180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2181", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2182", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2184", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2186", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "2187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2188", + "Name": "brokerName", + "NameInRequest": "brokerName", + "Doc": "Name of broker.", + "Type": { + "$id": "2189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2190", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2191", + "kind": "constant", + "valueType": { + "$id": "2192", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2193", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1257" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Broker.get", + "Decorators": [], + "Examples": [ + { + "$id": "2194", + "kind": "http", + "name": "Broker_Get", + "description": "Broker_Get", + "filePath": "2025-04-01/Broker_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2195", + "parameter": { + "$ref": "2177" + }, + "value": { + "$id": "2196", + "kind": "string", + "type": { + "$ref": "2178" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2197", + "parameter": { + "$ref": "2181" + }, + "value": { + "$id": "2198", + "kind": "string", + "type": { + "$ref": "2182" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2199", + "parameter": { + "$ref": "2184" + }, + "value": { + "$id": "2200", + "kind": "string", + "type": { + "$ref": "2185" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "2201", + "parameter": { + "$ref": "2186" + }, + "value": { + "$id": "2202", + "kind": "string", + "type": { + "$ref": "2187" + }, + "value": "resource-name123" + } + }, + { + "$id": "2203", + "parameter": { + "$ref": "2188" + }, + "value": { + "$id": "2204", + "kind": "string", + "type": { + "$ref": "2189" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "2205", + "response": { + "$ref": "2193" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2206", + "kind": "model", + "type": { + "$ref": "1257" + }, + "value": { + "$id": "2207", + "properties": { + "$id": "2208", + "kind": "model", + "type": { + "$ref": "1259" + }, + "value": { + "$id": "2209", + "advanced": { + "$id": "2210", + "kind": "model", + "type": { + "$ref": "1261" + }, + "value": { + "$id": "2211", + "clients": { + "$id": "2212", + "kind": "model", + "type": { + "$ref": "1263" + }, + "value": { + "$id": "2213", + "maxSessionExpirySeconds": { + "$id": "2214", + "kind": "number", + "type": { + "$ref": "1265" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "2215", + "kind": "number", + "type": { + "$ref": "1269" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "2216", + "kind": "number", + "type": { + "$ref": "1273" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "2217", + "kind": "model", + "type": { + "$ref": "1277" + }, + "value": { + "$id": "2218", + "length": { + "$id": "2219", + "kind": "number", + "type": { + "$ref": "1279" + }, + "value": 6 + }, + "strategy": { + "$id": "2220", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "2221", + "kind": "number", + "type": { + "$ref": "1288" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "2222", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "2223", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "2224", + "kind": "model", + "type": { + "$ref": "1301" + }, + "value": { + "$id": "2225", + "duration": { + "$id": "2226", + "kind": "string", + "type": { + "$ref": "1303" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "2227", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "2228", + "kind": "model", + "type": { + "$ref": "1204" + }, + "value": { + "$id": "2229", + "algorithm": { + "$id": "2230", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "2231", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "2232", + "kind": "model", + "type": { + "$ref": "1318" + }, + "value": { + "$id": "2233", + "backendChain": { + "$id": "2234", + "kind": "model", + "type": { + "$ref": "1320" + }, + "value": { + "$id": "2235", + "partitions": { + "$id": "2236", + "kind": "number", + "type": { + "$ref": "1322" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "2237", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 5 + }, + "workers": { + "$id": "2238", + "kind": "number", + "type": { + "$ref": "1330" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "2239", + "kind": "model", + "type": { + "$ref": "1336" + }, + "value": { + "$id": "2240", + "replicas": { + "$id": "2241", + "kind": "number", + "type": { + "$ref": "1338" + }, + "value": 2 + }, + "workers": { + "$id": "2242", + "kind": "number", + "type": { + "$ref": "1342" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "2243", + "kind": "model", + "type": { + "$ref": "1350" + }, + "value": { + "$id": "2244", + "logs": { + "$id": "2245", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2246", + "level": { + "$id": "2247", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "2248", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "2249", + "prometheusPort": { + "$id": "2250", + "kind": "number", + "type": { + "$ref": "931" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "2251", + "kind": "model", + "type": { + "$ref": "1358" + }, + "value": { + "$id": "2252", + "mode": { + "$id": "2253", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2254", + "kind": "number", + "type": { + "$ref": "1363" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "2255", + "kind": "number", + "type": { + "$ref": "1367" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "2256", + "kind": "model", + "type": { + "$ref": "1373" + }, + "value": { + "$id": "2257", + "mode": { + "$id": "2258", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "2259", + "kind": "number", + "type": { + "$ref": "1378" + }, + "value": 28 + }, + "selfTracing": { + "$id": "2260", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "2261", + "mode": { + "$id": "2262", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2263", + "kind": "number", + "type": { + "$ref": "1387" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "2264", + "kind": "number", + "type": { + "$ref": "1393" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2265", + "kind": "model", + "type": { + "$ref": "1401" + }, + "value": { + "$id": "2266", + "maxSize": { + "$id": "2267", + "kind": "string", + "type": { + "$ref": "1403" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "2268", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "2269", + "volumeName": { + "$id": "2270", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2271", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2272", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2273", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "2274", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2275", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "2276", + "apiGroup": { + "$id": "2277", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2278", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2279", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2280", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "2281", + "apiGroup": { + "$id": "2282", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2283", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2284", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2285", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2286", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "2287", + "limits": { + "$id": "2288", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "2289", + "key2719": { + "$id": "2290", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2291", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "2292", + "key2909": { + "$id": "2293", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2294", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "2295", + "matchExpressions": { + "$id": "2296", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "2297", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "2298", + "key": { + "$id": "2299", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "2300", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "2301", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "2302", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2303", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "2304", + "key6673": { + "$id": "2305", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "2306", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "2307", + "volumeName": { + "$id": "2308", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2309", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2310", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2311", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "2312", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2313", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "2314", + "apiGroup": { + "$id": "2315", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2316", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2317", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2318", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "2319", + "apiGroup": { + "$id": "2320", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2321", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2322", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2323", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2324", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "2325", + "limits": { + "$id": "2326", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "2327", + "key2719": { + "$id": "2328", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2329", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "2330", + "key2909": { + "$id": "2331", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2332", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "2333", + "matchExpressions": { + "$id": "2334", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "2335", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "2336", + "key": { + "$id": "2337", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "2338", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "2339", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "2340", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2341", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "2342", + "key6673": { + "$id": "2343", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "2344", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "2345", + "cpu": { + "$id": "2346", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2347", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "2348", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "2349", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "2350", + "name": { + "$id": "2351", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2352", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "2353", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "2354", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "dowrkel" + }, + "type": { + "$id": "2355", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "2356", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "2357", + "createdBy": { + "$id": "2358", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2359", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "2360", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2361", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2362", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2363", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2364", + "Name": "createOrUpdate", + "ResourceName": "BrokerResource", + "Doc": "Create a BrokerResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2365", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2366", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2367", + "Type": { + "$id": "2368", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2369", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2370", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2371", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2372", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2373", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2374", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "2375", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2376", + "Name": "brokerName", + "NameInRequest": "brokerName", + "Doc": "Name of broker.", + "Type": { + "$id": "2377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2378", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "2379", + "kind": "constant", + "valueType": { + "$id": "2380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2381", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2382", + "kind": "constant", + "valueType": { + "$id": "2383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2384", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "1257" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2385", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1257" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "2386", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "1257" + }, + "Headers": [ + { + "$id": "2387", + "Name": "azureAsyncOperation", + "NameInResponse": "Azure-AsyncOperation", + "Doc": "A link to the status monitor", + "Type": { + "$id": "2388", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2389", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "2390", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "2391", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "2392", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1257" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Broker.createOrUpdate", + "Decorators": [], + "Examples": [ + { + "$id": "2393", + "kind": "http", + "name": "Broker_CreateOrUpdate_Complex", + "description": "Broker_CreateOrUpdate_Complex", + "filePath": "2025-04-01/Broker_CreateOrUpdate_Complex.json", + "parameters": [ + { + "$id": "2394", + "parameter": { + "$ref": "2365" + }, + "value": { + "$id": "2395", + "kind": "string", + "type": { + "$ref": "2366" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2396", + "parameter": { + "$ref": "2369" + }, + "value": { + "$id": "2397", + "kind": "string", + "type": { + "$ref": "2370" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2398", + "parameter": { + "$ref": "2372" + }, + "value": { + "$id": "2399", + "kind": "string", + "type": { + "$ref": "2373" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "2400", + "parameter": { + "$ref": "2374" + }, + "value": { + "$id": "2401", + "kind": "string", + "type": { + "$ref": "2375" + }, + "value": "resource-name123" + } + }, + { + "$id": "2402", + "parameter": { + "$ref": "2376" + }, + "value": { + "$id": "2403", + "kind": "string", + "type": { + "$ref": "2377" + }, + "value": "resource-name123" + } + }, + { + "$id": "2404", + "parameter": { + "$ref": "2384" + }, + "value": { + "$id": "2405", + "kind": "model", + "type": { + "$ref": "1257" + }, + "value": { + "$id": "2406", + "properties": { + "$id": "2407", + "kind": "model", + "type": { + "$ref": "1259" + }, + "value": { + "$id": "2408", + "cardinality": { + "$id": "2409", + "kind": "model", + "type": { + "$ref": "1318" + }, + "value": { + "$id": "2410", + "backendChain": { + "$id": "2411", + "kind": "model", + "type": { + "$ref": "1320" + }, + "value": { + "$id": "2412", + "partitions": { + "$id": "2413", + "kind": "number", + "type": { + "$ref": "1322" + }, + "value": 2 + }, + "redundancyFactor": { + "$id": "2414", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 2 + }, + "workers": { + "$id": "2415", + "kind": "number", + "type": { + "$ref": "1330" + }, + "value": 2 + } + } + }, + "frontend": { + "$id": "2416", + "kind": "model", + "type": { + "$ref": "1336" + }, + "value": { + "$id": "2417", + "replicas": { + "$id": "2418", + "kind": "number", + "type": { + "$ref": "1338" + }, + "value": 2 + }, + "workers": { + "$id": "2419", + "kind": "number", + "type": { + "$ref": "1342" + }, + "value": 2 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2420", + "kind": "model", + "type": { + "$ref": "1401" + }, + "value": { + "$id": "2421", + "maxSize": { + "$id": "2422", + "kind": "string", + "type": { + "$ref": "1403" + }, + "value": "50M" + } + } + }, + "generateResourceLimits": { + "$id": "2423", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "2424", + "cpu": { + "$id": "2425", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2426", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Medium" + } + } + }, + "extendedLocation": { + "$id": "2427", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "2428", + "name": { + "$id": "2429", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2430", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2431", + "response": { + "$ref": "2385" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2432", + "kind": "model", + "type": { + "$ref": "1257" + }, + "value": { + "$id": "2433", + "properties": { + "$id": "2434", + "kind": "model", + "type": { + "$ref": "1259" + }, + "value": { + "$id": "2435", + "cardinality": { + "$id": "2436", + "kind": "model", + "type": { + "$ref": "1318" + }, + "value": { + "$id": "2437", + "backendChain": { + "$id": "2438", + "kind": "model", + "type": { + "$ref": "1320" + }, + "value": { + "$id": "2439", + "partitions": { + "$id": "2440", + "kind": "number", + "type": { + "$ref": "1322" + }, + "value": 2 + }, + "redundancyFactor": { + "$id": "2441", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 2 + }, + "workers": { + "$id": "2442", + "kind": "number", + "type": { + "$ref": "1330" + }, + "value": 2 + } + } + }, + "frontend": { + "$id": "2443", + "kind": "model", + "type": { + "$ref": "1336" + }, + "value": { + "$id": "2444", + "replicas": { + "$id": "2445", + "kind": "number", + "type": { + "$ref": "1338" + }, + "value": 2 + }, + "workers": { + "$id": "2446", + "kind": "number", + "type": { + "$ref": "1342" + }, + "value": 2 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2447", + "kind": "model", + "type": { + "$ref": "1401" + }, + "value": { + "$id": "2448", + "maxSize": { + "$id": "2449", + "kind": "string", + "type": { + "$ref": "1403" + }, + "value": "50M" + } + } + }, + "generateResourceLimits": { + "$id": "2450", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "2451", + "cpu": { + "$id": "2452", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2453", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Medium" + }, + "provisioningState": { + "$id": "2454", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "2455", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "2456", + "name": { + "$id": "2457", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2458", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "2459", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "2460", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "2461", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "2462", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "2463", + "createdBy": { + "$id": "2464", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2465", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "2466", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2467", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2468", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2469", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "2470", + "response": { + "$ref": "2386" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2471", + "kind": "model", + "type": { + "$ref": "1257" + }, + "value": { + "$id": "2472", + "properties": { + "$id": "2473", + "kind": "model", + "type": { + "$ref": "1259" + }, + "value": { + "$id": "2474", + "cardinality": { + "$id": "2475", + "kind": "model", + "type": { + "$ref": "1318" + }, + "value": { + "$id": "2476", + "backendChain": { + "$id": "2477", + "kind": "model", + "type": { + "$ref": "1320" + }, + "value": { + "$id": "2478", + "partitions": { + "$id": "2479", + "kind": "number", + "type": { + "$ref": "1322" + }, + "value": 2 + }, + "redundancyFactor": { + "$id": "2480", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 2 + }, + "workers": { + "$id": "2481", + "kind": "number", + "type": { + "$ref": "1330" + }, + "value": 2 + } + } + }, + "frontend": { + "$id": "2482", + "kind": "model", + "type": { + "$ref": "1336" + }, + "value": { + "$id": "2483", + "replicas": { + "$id": "2484", + "kind": "number", + "type": { + "$ref": "1338" + }, + "value": 2 + }, + "workers": { + "$id": "2485", + "kind": "number", + "type": { + "$ref": "1342" + }, + "value": 2 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2486", + "kind": "model", + "type": { + "$ref": "1401" + }, + "value": { + "$id": "2487", + "maxSize": { + "$id": "2488", + "kind": "string", + "type": { + "$ref": "1403" + }, + "value": "50M" + } + } + }, + "generateResourceLimits": { + "$id": "2489", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "2490", + "cpu": { + "$id": "2491", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2492", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Medium" + }, + "provisioningState": { + "$id": "2493", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Accepted" + } + } + }, + "extendedLocation": { + "$id": "2494", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "2495", + "name": { + "$id": "2496", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2497", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "2498", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "2499", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "2500", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "2501", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "2502", + "createdBy": { + "$id": "2503", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2504", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "2505", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2506", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2507", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2508", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "2509", + "kind": "http", + "name": "Broker_CreateOrUpdate", + "description": "Broker_CreateOrUpdate", + "filePath": "2025-04-01/Broker_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2510", + "parameter": { + "$ref": "2365" + }, + "value": { + "$id": "2511", + "kind": "string", + "type": { + "$ref": "2366" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2512", + "parameter": { + "$ref": "2369" + }, + "value": { + "$id": "2513", + "kind": "string", + "type": { + "$ref": "2370" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2514", + "parameter": { + "$ref": "2372" + }, + "value": { + "$id": "2515", + "kind": "string", + "type": { + "$ref": "2373" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "2516", + "parameter": { + "$ref": "2374" + }, + "value": { + "$id": "2517", + "kind": "string", + "type": { + "$ref": "2375" + }, + "value": "resource-name123" + } + }, + { + "$id": "2518", + "parameter": { + "$ref": "2376" + }, + "value": { + "$id": "2519", + "kind": "string", + "type": { + "$ref": "2377" + }, + "value": "resource-name123" + } + }, + { + "$id": "2520", + "parameter": { + "$ref": "2384" + }, + "value": { + "$id": "2521", + "kind": "model", + "type": { + "$ref": "1257" + }, + "value": { + "$id": "2522", + "properties": { + "$id": "2523", + "kind": "model", + "type": { + "$ref": "1259" + }, + "value": { + "$id": "2524", + "advanced": { + "$id": "2525", + "kind": "model", + "type": { + "$ref": "1261" + }, + "value": { + "$id": "2526", + "clients": { + "$id": "2527", + "kind": "model", + "type": { + "$ref": "1263" + }, + "value": { + "$id": "2528", + "maxSessionExpirySeconds": { + "$id": "2529", + "kind": "number", + "type": { + "$ref": "1265" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "2530", + "kind": "number", + "type": { + "$ref": "1269" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "2531", + "kind": "number", + "type": { + "$ref": "1273" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "2532", + "kind": "model", + "type": { + "$ref": "1277" + }, + "value": { + "$id": "2533", + "length": { + "$id": "2534", + "kind": "number", + "type": { + "$ref": "1279" + }, + "value": 6 + }, + "strategy": { + "$id": "2535", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "2536", + "kind": "number", + "type": { + "$ref": "1288" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "2537", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "2538", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "2539", + "kind": "model", + "type": { + "$ref": "1301" + }, + "value": { + "$id": "2540", + "duration": { + "$id": "2541", + "kind": "string", + "type": { + "$ref": "1303" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "2542", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "2543", + "kind": "model", + "type": { + "$ref": "1204" + }, + "value": { + "$id": "2544", + "algorithm": { + "$id": "2545", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "2546", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "2547", + "kind": "model", + "type": { + "$ref": "1318" + }, + "value": { + "$id": "2548", + "backendChain": { + "$id": "2549", + "kind": "model", + "type": { + "$ref": "1320" + }, + "value": { + "$id": "2550", + "partitions": { + "$id": "2551", + "kind": "number", + "type": { + "$ref": "1322" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "2552", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 5 + }, + "workers": { + "$id": "2553", + "kind": "number", + "type": { + "$ref": "1330" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "2554", + "kind": "model", + "type": { + "$ref": "1336" + }, + "value": { + "$id": "2555", + "replicas": { + "$id": "2556", + "kind": "number", + "type": { + "$ref": "1338" + }, + "value": 2 + }, + "workers": { + "$id": "2557", + "kind": "number", + "type": { + "$ref": "1342" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "2558", + "kind": "model", + "type": { + "$ref": "1350" + }, + "value": { + "$id": "2559", + "logs": { + "$id": "2560", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2561", + "level": { + "$id": "2562", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "2563", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "2564", + "prometheusPort": { + "$id": "2565", + "kind": "number", + "type": { + "$ref": "931" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "2566", + "kind": "model", + "type": { + "$ref": "1358" + }, + "value": { + "$id": "2567", + "mode": { + "$id": "2568", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2569", + "kind": "number", + "type": { + "$ref": "1363" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "2570", + "kind": "number", + "type": { + "$ref": "1367" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "2571", + "kind": "model", + "type": { + "$ref": "1373" + }, + "value": { + "$id": "2572", + "mode": { + "$id": "2573", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "2574", + "kind": "number", + "type": { + "$ref": "1378" + }, + "value": 28 + }, + "selfTracing": { + "$id": "2575", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "2576", + "mode": { + "$id": "2577", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2578", + "kind": "number", + "type": { + "$ref": "1387" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "2579", + "kind": "number", + "type": { + "$ref": "1393" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2580", + "kind": "model", + "type": { + "$ref": "1401" + }, + "value": { + "$id": "2581", + "maxSize": { + "$id": "2582", + "kind": "string", + "type": { + "$ref": "1403" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "2583", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "2584", + "volumeName": { + "$id": "2585", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2586", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2587", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2588", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "2589", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2590", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "2591", + "apiGroup": { + "$id": "2592", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2593", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2594", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2595", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "2596", + "apiGroup": { + "$id": "2597", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2598", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2599", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2600", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2601", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "2602", + "limits": { + "$id": "2603", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "2604", + "key2719": { + "$id": "2605", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2606", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "2607", + "key2909": { + "$id": "2608", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2609", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "2610", + "matchExpressions": { + "$id": "2611", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "2612", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "2613", + "key": { + "$id": "2614", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "2615", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "2616", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "2617", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2618", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "2619", + "key6673": { + "$id": "2620", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "2621", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "2622", + "volumeName": { + "$id": "2623", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2624", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2625", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2626", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "2627", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2628", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "2629", + "apiGroup": { + "$id": "2630", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2631", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2632", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2633", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "2634", + "apiGroup": { + "$id": "2635", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2636", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2637", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2638", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2639", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "2640", + "limits": { + "$id": "2641", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "2642", + "key2719": { + "$id": "2643", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2644", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "2645", + "key2909": { + "$id": "2646", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2647", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "2648", + "matchExpressions": { + "$id": "2649", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "2650", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "2651", + "key": { + "$id": "2652", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "2653", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "2654", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "2655", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2656", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "2657", + "key6673": { + "$id": "2658", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "2659", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "2660", + "cpu": { + "$id": "2661", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2662", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Tiny" + } + } + }, + "extendedLocation": { + "$id": "2663", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "2664", + "name": { + "$id": "2665", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2666", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2667", + "response": { + "$ref": "2385" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2668", + "kind": "model", + "type": { + "$ref": "1257" + }, + "value": { + "$id": "2669", + "properties": { + "$id": "2670", + "kind": "model", + "type": { + "$ref": "1259" + }, + "value": { + "$id": "2671", + "advanced": { + "$id": "2672", + "kind": "model", + "type": { + "$ref": "1261" + }, + "value": { + "$id": "2673", + "clients": { + "$id": "2674", + "kind": "model", + "type": { + "$ref": "1263" + }, + "value": { + "$id": "2675", + "maxSessionExpirySeconds": { + "$id": "2676", + "kind": "number", + "type": { + "$ref": "1265" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "2677", + "kind": "number", + "type": { + "$ref": "1269" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "2678", + "kind": "number", + "type": { + "$ref": "1273" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "2679", + "kind": "model", + "type": { + "$ref": "1277" + }, + "value": { + "$id": "2680", + "length": { + "$id": "2681", + "kind": "number", + "type": { + "$ref": "1279" + }, + "value": 6 + }, + "strategy": { + "$id": "2682", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "2683", + "kind": "number", + "type": { + "$ref": "1288" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "2684", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "2685", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "2686", + "kind": "model", + "type": { + "$ref": "1301" + }, + "value": { + "$id": "2687", + "duration": { + "$id": "2688", + "kind": "string", + "type": { + "$ref": "1303" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "2689", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "2690", + "kind": "model", + "type": { + "$ref": "1204" + }, + "value": { + "$id": "2691", + "algorithm": { + "$id": "2692", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "2693", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "2694", + "kind": "model", + "type": { + "$ref": "1318" + }, + "value": { + "$id": "2695", + "backendChain": { + "$id": "2696", + "kind": "model", + "type": { + "$ref": "1320" + }, + "value": { + "$id": "2697", + "partitions": { + "$id": "2698", + "kind": "number", + "type": { + "$ref": "1322" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "2699", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 5 + }, + "workers": { + "$id": "2700", + "kind": "number", + "type": { + "$ref": "1330" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "2701", + "kind": "model", + "type": { + "$ref": "1336" + }, + "value": { + "$id": "2702", + "replicas": { + "$id": "2703", + "kind": "number", + "type": { + "$ref": "1338" + }, + "value": 2 + }, + "workers": { + "$id": "2704", + "kind": "number", + "type": { + "$ref": "1342" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "2705", + "kind": "model", + "type": { + "$ref": "1350" + }, + "value": { + "$id": "2706", + "logs": { + "$id": "2707", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2708", + "level": { + "$id": "2709", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "2710", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "2711", + "prometheusPort": { + "$id": "2712", + "kind": "number", + "type": { + "$ref": "931" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "2713", + "kind": "model", + "type": { + "$ref": "1358" + }, + "value": { + "$id": "2714", + "mode": { + "$id": "2715", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2716", + "kind": "number", + "type": { + "$ref": "1363" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "2717", + "kind": "number", + "type": { + "$ref": "1367" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "2718", + "kind": "model", + "type": { + "$ref": "1373" + }, + "value": { + "$id": "2719", + "mode": { + "$id": "2720", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "2721", + "kind": "number", + "type": { + "$ref": "1378" + }, + "value": 28 + }, + "selfTracing": { + "$id": "2722", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "2723", + "mode": { + "$id": "2724", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2725", + "kind": "number", + "type": { + "$ref": "1387" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "2726", + "kind": "number", + "type": { + "$ref": "1393" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2727", + "kind": "model", + "type": { + "$ref": "1401" + }, + "value": { + "$id": "2728", + "maxSize": { + "$id": "2729", + "kind": "string", + "type": { + "$ref": "1403" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "2730", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "2731", + "volumeName": { + "$id": "2732", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2733", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2734", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2735", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "2736", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2737", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "2738", + "apiGroup": { + "$id": "2739", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2740", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2741", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2742", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "2743", + "apiGroup": { + "$id": "2744", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2745", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2746", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2747", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2748", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "2749", + "limits": { + "$id": "2750", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "2751", + "key2719": { + "$id": "2752", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2753", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "2754", + "key2909": { + "$id": "2755", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2756", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "2757", + "matchExpressions": { + "$id": "2758", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "2759", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "2760", + "key": { + "$id": "2761", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "2762", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "2763", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "2764", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2765", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "2766", + "key6673": { + "$id": "2767", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "2768", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "2769", + "volumeName": { + "$id": "2770", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2771", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2772", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2773", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "2774", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2775", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "2776", + "apiGroup": { + "$id": "2777", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2778", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2779", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2780", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "2781", + "apiGroup": { + "$id": "2782", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2783", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2784", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2785", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2786", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "2787", + "limits": { + "$id": "2788", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "2789", + "key2719": { + "$id": "2790", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2791", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "2792", + "key2909": { + "$id": "2793", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2794", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "2795", + "matchExpressions": { + "$id": "2796", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "2797", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "2798", + "key": { + "$id": "2799", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "2800", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "2801", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "2802", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2803", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "2804", + "key6673": { + "$id": "2805", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "2806", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "2807", + "cpu": { + "$id": "2808", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2809", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "2810", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "2811", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "2812", + "name": { + "$id": "2813", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2814", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "2815", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "2816", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "dowrkel" + }, + "type": { + "$id": "2817", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "2818", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "2819", + "createdBy": { + "$id": "2820", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2821", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "2822", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2823", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2824", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2825", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "2826", + "response": { + "$ref": "2386" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2827", + "kind": "model", + "type": { + "$ref": "1257" + }, + "value": { + "$id": "2828", + "properties": { + "$id": "2829", + "kind": "model", + "type": { + "$ref": "1259" + }, + "value": { + "$id": "2830", + "advanced": { + "$id": "2831", + "kind": "model", + "type": { + "$ref": "1261" + }, + "value": { + "$id": "2832", + "clients": { + "$id": "2833", + "kind": "model", + "type": { + "$ref": "1263" + }, + "value": { + "$id": "2834", + "maxSessionExpirySeconds": { + "$id": "2835", + "kind": "number", + "type": { + "$ref": "1265" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "2836", + "kind": "number", + "type": { + "$ref": "1269" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "2837", + "kind": "number", + "type": { + "$ref": "1273" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "2838", + "kind": "model", + "type": { + "$ref": "1277" + }, + "value": { + "$id": "2839", + "length": { + "$id": "2840", + "kind": "number", + "type": { + "$ref": "1279" + }, + "value": 6 + }, + "strategy": { + "$id": "2841", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "2842", + "kind": "number", + "type": { + "$ref": "1288" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "2843", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "2844", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "2845", + "kind": "model", + "type": { + "$ref": "1301" + }, + "value": { + "$id": "2846", + "duration": { + "$id": "2847", + "kind": "string", + "type": { + "$ref": "1303" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "2848", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "2849", + "kind": "model", + "type": { + "$ref": "1204" + }, + "value": { + "$id": "2850", + "algorithm": { + "$id": "2851", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "2852", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "2853", + "kind": "model", + "type": { + "$ref": "1318" + }, + "value": { + "$id": "2854", + "backendChain": { + "$id": "2855", + "kind": "model", + "type": { + "$ref": "1320" + }, + "value": { + "$id": "2856", + "partitions": { + "$id": "2857", + "kind": "number", + "type": { + "$ref": "1322" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "2858", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 5 + }, + "workers": { + "$id": "2859", + "kind": "number", + "type": { + "$ref": "1330" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "2860", + "kind": "model", + "type": { + "$ref": "1336" + }, + "value": { + "$id": "2861", + "replicas": { + "$id": "2862", + "kind": "number", + "type": { + "$ref": "1338" + }, + "value": 2 + }, + "workers": { + "$id": "2863", + "kind": "number", + "type": { + "$ref": "1342" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "2864", + "kind": "model", + "type": { + "$ref": "1350" + }, + "value": { + "$id": "2865", + "logs": { + "$id": "2866", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2867", + "level": { + "$id": "2868", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "2869", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "2870", + "prometheusPort": { + "$id": "2871", + "kind": "number", + "type": { + "$ref": "931" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "2872", + "kind": "model", + "type": { + "$ref": "1358" + }, + "value": { + "$id": "2873", + "mode": { + "$id": "2874", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2875", + "kind": "number", + "type": { + "$ref": "1363" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "2876", + "kind": "number", + "type": { + "$ref": "1367" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "2877", + "kind": "model", + "type": { + "$ref": "1373" + }, + "value": { + "$id": "2878", + "mode": { + "$id": "2879", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "2880", + "kind": "number", + "type": { + "$ref": "1378" + }, + "value": 28 + }, + "selfTracing": { + "$id": "2881", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "2882", + "mode": { + "$id": "2883", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2884", + "kind": "number", + "type": { + "$ref": "1387" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "2885", + "kind": "number", + "type": { + "$ref": "1393" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2886", + "kind": "model", + "type": { + "$ref": "1401" + }, + "value": { + "$id": "2887", + "maxSize": { + "$id": "2888", + "kind": "string", + "type": { + "$ref": "1403" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "2889", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "2890", + "volumeName": { + "$id": "2891", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2892", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2893", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2894", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "2895", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2896", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "2897", + "apiGroup": { + "$id": "2898", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2899", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2900", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2901", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "2902", + "apiGroup": { + "$id": "2903", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2904", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2905", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2906", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2907", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "2908", + "limits": { + "$id": "2909", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "2910", + "key2719": { + "$id": "2911", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2912", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "2913", + "key2909": { + "$id": "2914", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2915", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "2916", + "matchExpressions": { + "$id": "2917", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "2918", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "2919", + "key": { + "$id": "2920", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "2921", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "2922", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "2923", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2924", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "2925", + "key6673": { + "$id": "2926", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "2927", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "2928", + "volumeName": { + "$id": "2929", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2930", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2931", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2932", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "2933", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2934", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "2935", + "apiGroup": { + "$id": "2936", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2937", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2938", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2939", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "2940", + "apiGroup": { + "$id": "2941", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2942", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2943", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2944", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2945", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "2946", + "limits": { + "$id": "2947", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "2948", + "key2719": { + "$id": "2949", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2950", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "2951", + "key2909": { + "$id": "2952", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2953", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "2954", + "matchExpressions": { + "$id": "2955", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "2956", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "2957", + "key": { + "$id": "2958", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "2959", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "2960", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "2961", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2962", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "2963", + "key6673": { + "$id": "2964", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "2965", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "2966", + "cpu": { + "$id": "2967", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2968", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "2969", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "2970", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "2971", + "name": { + "$id": "2972", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2973", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "2974", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "2975", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "dowrkel" + }, + "type": { + "$id": "2976", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "2977", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "2978", + "createdBy": { + "$id": "2979", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2980", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "2981", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2982", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2983", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2984", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "2985", + "kind": "http", + "name": "Broker_CreateOrUpdate_Minimal", + "description": "Broker_CreateOrUpdate_Minimal", + "filePath": "2025-04-01/Broker_CreateOrUpdate_Minimal.json", + "parameters": [ + { + "$id": "2986", + "parameter": { + "$ref": "2365" + }, + "value": { + "$id": "2987", + "kind": "string", + "type": { + "$ref": "2366" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2988", + "parameter": { + "$ref": "2369" + }, + "value": { + "$id": "2989", + "kind": "string", + "type": { + "$ref": "2370" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2990", + "parameter": { + "$ref": "2372" + }, + "value": { + "$id": "2991", + "kind": "string", + "type": { + "$ref": "2373" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "2992", + "parameter": { + "$ref": "2374" + }, + "value": { + "$id": "2993", + "kind": "string", + "type": { + "$ref": "2375" + }, + "value": "resource-name123" + } + }, + { + "$id": "2994", + "parameter": { + "$ref": "2376" + }, + "value": { + "$id": "2995", + "kind": "string", + "type": { + "$ref": "2377" + }, + "value": "resource-name123" + } + }, + { + "$id": "2996", + "parameter": { + "$ref": "2384" + }, + "value": { + "$id": "2997", + "kind": "model", + "type": { + "$ref": "1257" + }, + "value": { + "$id": "2998", + "properties": { + "$id": "2999", + "kind": "model", + "type": { + "$ref": "1259" + }, + "value": { + "$id": "3000", + "memoryProfile": { + "$id": "3001", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Tiny" + } + } + }, + "extendedLocation": { + "$id": "3002", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "3003", + "name": { + "$id": "3004", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3005", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "3006", + "response": { + "$ref": "2385" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3007", + "kind": "model", + "type": { + "$ref": "1257" + }, + "value": { + "$id": "3008", + "properties": { + "$id": "3009", + "kind": "model", + "type": { + "$ref": "1259" + }, + "value": { + "$id": "3010", + "advanced": { + "$id": "3011", + "kind": "model", + "type": { + "$ref": "1261" + }, + "value": { + "$id": "3012", + "clients": { + "$id": "3013", + "kind": "model", + "type": { + "$ref": "1263" + }, + "value": { + "$id": "3014", + "maxSessionExpirySeconds": { + "$id": "3015", + "kind": "number", + "type": { + "$ref": "1265" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "3016", + "kind": "number", + "type": { + "$ref": "1269" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "3017", + "kind": "number", + "type": { + "$ref": "1273" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "3018", + "kind": "model", + "type": { + "$ref": "1277" + }, + "value": { + "$id": "3019", + "length": { + "$id": "3020", + "kind": "number", + "type": { + "$ref": "1279" + }, + "value": 6 + }, + "strategy": { + "$id": "3021", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "3022", + "kind": "number", + "type": { + "$ref": "1288" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "3023", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "3024", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "3025", + "kind": "model", + "type": { + "$ref": "1301" + }, + "value": { + "$id": "3026", + "duration": { + "$id": "3027", + "kind": "string", + "type": { + "$ref": "1303" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "3028", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "3029", + "kind": "model", + "type": { + "$ref": "1204" + }, + "value": { + "$id": "3030", + "algorithm": { + "$id": "3031", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3032", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "3033", + "kind": "model", + "type": { + "$ref": "1318" + }, + "value": { + "$id": "3034", + "backendChain": { + "$id": "3035", + "kind": "model", + "type": { + "$ref": "1320" + }, + "value": { + "$id": "3036", + "partitions": { + "$id": "3037", + "kind": "number", + "type": { + "$ref": "1322" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "3038", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 5 + }, + "workers": { + "$id": "3039", + "kind": "number", + "type": { + "$ref": "1330" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "3040", + "kind": "model", + "type": { + "$ref": "1336" + }, + "value": { + "$id": "3041", + "replicas": { + "$id": "3042", + "kind": "number", + "type": { + "$ref": "1338" + }, + "value": 2 + }, + "workers": { + "$id": "3043", + "kind": "number", + "type": { + "$ref": "1342" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "3044", + "kind": "model", + "type": { + "$ref": "1350" + }, + "value": { + "$id": "3045", + "logs": { + "$id": "3046", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3047", + "level": { + "$id": "3048", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "3049", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "3050", + "prometheusPort": { + "$id": "3051", + "kind": "number", + "type": { + "$ref": "931" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "3052", + "kind": "model", + "type": { + "$ref": "1358" + }, + "value": { + "$id": "3053", + "mode": { + "$id": "3054", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3055", + "kind": "number", + "type": { + "$ref": "1363" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "3056", + "kind": "number", + "type": { + "$ref": "1367" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "3057", + "kind": "model", + "type": { + "$ref": "1373" + }, + "value": { + "$id": "3058", + "mode": { + "$id": "3059", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "3060", + "kind": "number", + "type": { + "$ref": "1378" + }, + "value": 28 + }, + "selfTracing": { + "$id": "3061", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "3062", + "mode": { + "$id": "3063", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3064", + "kind": "number", + "type": { + "$ref": "1387" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "3065", + "kind": "number", + "type": { + "$ref": "1393" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "3066", + "kind": "model", + "type": { + "$ref": "1401" + }, + "value": { + "$id": "3067", + "maxSize": { + "$id": "3068", + "kind": "string", + "type": { + "$ref": "1403" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "3069", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "3070", + "volumeName": { + "$id": "3071", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3072", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3073", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3074", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "3075", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3076", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "3077", + "apiGroup": { + "$id": "3078", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3079", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3080", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3081", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "3082", + "apiGroup": { + "$id": "3083", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3084", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3085", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3086", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3087", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "3088", + "limits": { + "$id": "3089", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "3090", + "key2719": { + "$id": "3091", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3092", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "3093", + "key2909": { + "$id": "3094", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3095", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "3096", + "matchExpressions": { + "$id": "3097", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "3098", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "3099", + "key": { + "$id": "3100", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "3101", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "3102", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "3103", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3104", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "3105", + "key6673": { + "$id": "3106", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3107", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "3108", + "volumeName": { + "$id": "3109", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3110", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3111", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3112", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "3113", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3114", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "3115", + "apiGroup": { + "$id": "3116", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3117", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3118", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3119", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "3120", + "apiGroup": { + "$id": "3121", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3122", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3123", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3124", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3125", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "3126", + "limits": { + "$id": "3127", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "3128", + "key2719": { + "$id": "3129", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3130", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "3131", + "key2909": { + "$id": "3132", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3133", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "3134", + "matchExpressions": { + "$id": "3135", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "3136", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "3137", + "key": { + "$id": "3138", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "3139", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "3140", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "3141", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3142", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "3143", + "key6673": { + "$id": "3144", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3145", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "3146", + "cpu": { + "$id": "3147", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3148", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3149", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3150", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "3151", + "name": { + "$id": "3152", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3153", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3154", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "3155", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "dowrkel" + }, + "type": { + "$id": "3156", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "3157", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "3158", + "createdBy": { + "$id": "3159", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3160", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "3161", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3162", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3163", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3164", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "3165", + "response": { + "$ref": "2386" + }, + "statusCode": 201, + "bodyValue": { + "$id": "3166", + "kind": "model", + "type": { + "$ref": "1257" + }, + "value": { + "$id": "3167", + "properties": { + "$id": "3168", + "kind": "model", + "type": { + "$ref": "1259" + }, + "value": { + "$id": "3169", + "advanced": { + "$id": "3170", + "kind": "model", + "type": { + "$ref": "1261" + }, + "value": { + "$id": "3171", + "clients": { + "$id": "3172", + "kind": "model", + "type": { + "$ref": "1263" + }, + "value": { + "$id": "3173", + "maxSessionExpirySeconds": { + "$id": "3174", + "kind": "number", + "type": { + "$ref": "1265" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "3175", + "kind": "number", + "type": { + "$ref": "1269" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "3176", + "kind": "number", + "type": { + "$ref": "1273" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "3177", + "kind": "model", + "type": { + "$ref": "1277" + }, + "value": { + "$id": "3178", + "length": { + "$id": "3179", + "kind": "number", + "type": { + "$ref": "1279" + }, + "value": 6 + }, + "strategy": { + "$id": "3180", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "3181", + "kind": "number", + "type": { + "$ref": "1288" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "3182", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "3183", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "3184", + "kind": "model", + "type": { + "$ref": "1301" + }, + "value": { + "$id": "3185", + "duration": { + "$id": "3186", + "kind": "string", + "type": { + "$ref": "1303" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "3187", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "3188", + "kind": "model", + "type": { + "$ref": "1204" + }, + "value": { + "$id": "3189", + "algorithm": { + "$id": "3190", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3191", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "3192", + "kind": "model", + "type": { + "$ref": "1318" + }, + "value": { + "$id": "3193", + "backendChain": { + "$id": "3194", + "kind": "model", + "type": { + "$ref": "1320" + }, + "value": { + "$id": "3195", + "partitions": { + "$id": "3196", + "kind": "number", + "type": { + "$ref": "1322" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "3197", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 5 + }, + "workers": { + "$id": "3198", + "kind": "number", + "type": { + "$ref": "1330" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "3199", + "kind": "model", + "type": { + "$ref": "1336" + }, + "value": { + "$id": "3200", + "replicas": { + "$id": "3201", + "kind": "number", + "type": { + "$ref": "1338" + }, + "value": 2 + }, + "workers": { + "$id": "3202", + "kind": "number", + "type": { + "$ref": "1342" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "3203", + "kind": "model", + "type": { + "$ref": "1350" + }, + "value": { + "$id": "3204", + "logs": { + "$id": "3205", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3206", + "level": { + "$id": "3207", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "3208", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "3209", + "prometheusPort": { + "$id": "3210", + "kind": "number", + "type": { + "$ref": "931" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "3211", + "kind": "model", + "type": { + "$ref": "1358" + }, + "value": { + "$id": "3212", + "mode": { + "$id": "3213", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3214", + "kind": "number", + "type": { + "$ref": "1363" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "3215", + "kind": "number", + "type": { + "$ref": "1367" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "3216", + "kind": "model", + "type": { + "$ref": "1373" + }, + "value": { + "$id": "3217", + "mode": { + "$id": "3218", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "3219", + "kind": "number", + "type": { + "$ref": "1378" + }, + "value": 28 + }, + "selfTracing": { + "$id": "3220", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "3221", + "mode": { + "$id": "3222", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3223", + "kind": "number", + "type": { + "$ref": "1387" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "3224", + "kind": "number", + "type": { + "$ref": "1393" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "3225", + "kind": "model", + "type": { + "$ref": "1401" + }, + "value": { + "$id": "3226", + "maxSize": { + "$id": "3227", + "kind": "string", + "type": { + "$ref": "1403" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "3228", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "3229", + "volumeName": { + "$id": "3230", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3231", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3232", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3233", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "3234", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3235", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "3236", + "apiGroup": { + "$id": "3237", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3238", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3239", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3240", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "3241", + "apiGroup": { + "$id": "3242", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3243", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3244", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3245", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3246", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "3247", + "limits": { + "$id": "3248", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "3249", + "key2719": { + "$id": "3250", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3251", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "3252", + "key2909": { + "$id": "3253", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3254", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "3255", + "matchExpressions": { + "$id": "3256", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "3257", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "3258", + "key": { + "$id": "3259", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "3260", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "3261", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "3262", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3263", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "3264", + "key6673": { + "$id": "3265", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3266", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "3267", + "volumeName": { + "$id": "3268", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3269", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3270", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3271", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "3272", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3273", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "3274", + "apiGroup": { + "$id": "3275", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3276", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3277", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3278", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "3279", + "apiGroup": { + "$id": "3280", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3281", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3282", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3283", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3284", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "3285", + "limits": { + "$id": "3286", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "3287", + "key2719": { + "$id": "3288", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3289", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "3290", + "key2909": { + "$id": "3291", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3292", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "3293", + "matchExpressions": { + "$id": "3294", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "3295", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "3296", + "key": { + "$id": "3297", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "3298", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "3299", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "3300", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3301", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "3302", + "key6673": { + "$id": "3303", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3304", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "3305", + "cpu": { + "$id": "3306", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3307", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3308", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3309", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "3310", + "name": { + "$id": "3311", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3312", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3313", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "3314", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "dowrkel" + }, + "type": { + "$id": "3315", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "3316", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "3317", + "createdBy": { + "$id": "3318", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3319", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "3320", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3321", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3322", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3323", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "3324", + "kind": "http", + "name": "Broker_CreateOrUpdate_Simple", + "description": "Broker_CreateOrUpdate_Simple", + "filePath": "2025-04-01/Broker_CreateOrUpdate_Simple.json", + "parameters": [ + { + "$id": "3325", + "parameter": { + "$ref": "2365" + }, + "value": { + "$id": "3326", + "kind": "string", + "type": { + "$ref": "2366" + }, + "value": "2025-04-01" + } + }, + { + "$id": "3327", + "parameter": { + "$ref": "2369" + }, + "value": { + "$id": "3328", + "kind": "string", + "type": { + "$ref": "2370" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "3329", + "parameter": { + "$ref": "2372" + }, + "value": { + "$id": "3330", + "kind": "string", + "type": { + "$ref": "2373" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "3331", + "parameter": { + "$ref": "2374" + }, + "value": { + "$id": "3332", + "kind": "string", + "type": { + "$ref": "2375" + }, + "value": "resource-name123" + } + }, + { + "$id": "3333", + "parameter": { + "$ref": "2376" + }, + "value": { + "$id": "3334", + "kind": "string", + "type": { + "$ref": "2377" + }, + "value": "resource-name123" + } + }, + { + "$id": "3335", + "parameter": { + "$ref": "2384" + }, + "value": { + "$id": "3336", + "kind": "model", + "type": { + "$ref": "1257" + }, + "value": { + "$id": "3337", + "properties": { + "$id": "3338", + "kind": "model", + "type": { + "$ref": "1259" + }, + "value": { + "$id": "3339", + "cardinality": { + "$id": "3340", + "kind": "model", + "type": { + "$ref": "1318" + }, + "value": { + "$id": "3341", + "backendChain": { + "$id": "3342", + "kind": "model", + "type": { + "$ref": "1320" + }, + "value": { + "$id": "3343", + "partitions": { + "$id": "3344", + "kind": "number", + "type": { + "$ref": "1322" + }, + "value": 2 + }, + "redundancyFactor": { + "$id": "3345", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 2 + }, + "workers": { + "$id": "3346", + "kind": "number", + "type": { + "$ref": "1330" + }, + "value": 2 + } + } + }, + "frontend": { + "$id": "3347", + "kind": "model", + "type": { + "$ref": "1336" + }, + "value": { + "$id": "3348", + "replicas": { + "$id": "3349", + "kind": "number", + "type": { + "$ref": "1338" + }, + "value": 2 + }, + "workers": { + "$id": "3350", + "kind": "number", + "type": { + "$ref": "1342" + }, + "value": 2 + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3351", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "3352", + "cpu": { + "$id": "3353", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3354", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Low" + } + } + }, + "extendedLocation": { + "$id": "3355", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "3356", + "name": { + "$id": "3357", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3358", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "3359", + "response": { + "$ref": "2385" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3360", + "kind": "model", + "type": { + "$ref": "1257" + }, + "value": { + "$id": "3361", + "properties": { + "$id": "3362", + "kind": "model", + "type": { + "$ref": "1259" + }, + "value": { + "$id": "3363", + "advanced": { + "$id": "3364", + "kind": "model", + "type": { + "$ref": "1261" + }, + "value": { + "$id": "3365", + "clients": { + "$id": "3366", + "kind": "model", + "type": { + "$ref": "1263" + }, + "value": { + "$id": "3367", + "maxSessionExpirySeconds": { + "$id": "3368", + "kind": "number", + "type": { + "$ref": "1265" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "3369", + "kind": "number", + "type": { + "$ref": "1269" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "3370", + "kind": "number", + "type": { + "$ref": "1273" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "3371", + "kind": "model", + "type": { + "$ref": "1277" + }, + "value": { + "$id": "3372", + "length": { + "$id": "3373", + "kind": "number", + "type": { + "$ref": "1279" + }, + "value": 6 + }, + "strategy": { + "$id": "3374", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "3375", + "kind": "number", + "type": { + "$ref": "1288" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "3376", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "3377", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "3378", + "kind": "model", + "type": { + "$ref": "1301" + }, + "value": { + "$id": "3379", + "duration": { + "$id": "3380", + "kind": "string", + "type": { + "$ref": "1303" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "3381", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "3382", + "kind": "model", + "type": { + "$ref": "1204" + }, + "value": { + "$id": "3383", + "algorithm": { + "$id": "3384", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3385", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "3386", + "kind": "model", + "type": { + "$ref": "1318" + }, + "value": { + "$id": "3387", + "backendChain": { + "$id": "3388", + "kind": "model", + "type": { + "$ref": "1320" + }, + "value": { + "$id": "3389", + "partitions": { + "$id": "3390", + "kind": "number", + "type": { + "$ref": "1322" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "3391", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 5 + }, + "workers": { + "$id": "3392", + "kind": "number", + "type": { + "$ref": "1330" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "3393", + "kind": "model", + "type": { + "$ref": "1336" + }, + "value": { + "$id": "3394", + "replicas": { + "$id": "3395", + "kind": "number", + "type": { + "$ref": "1338" + }, + "value": 2 + }, + "workers": { + "$id": "3396", + "kind": "number", + "type": { + "$ref": "1342" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "3397", + "kind": "model", + "type": { + "$ref": "1350" + }, + "value": { + "$id": "3398", + "logs": { + "$id": "3399", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3400", + "level": { + "$id": "3401", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "3402", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "3403", + "prometheusPort": { + "$id": "3404", + "kind": "number", + "type": { + "$ref": "931" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "3405", + "kind": "model", + "type": { + "$ref": "1358" + }, + "value": { + "$id": "3406", + "mode": { + "$id": "3407", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3408", + "kind": "number", + "type": { + "$ref": "1363" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "3409", + "kind": "number", + "type": { + "$ref": "1367" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "3410", + "kind": "model", + "type": { + "$ref": "1373" + }, + "value": { + "$id": "3411", + "mode": { + "$id": "3412", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "3413", + "kind": "number", + "type": { + "$ref": "1378" + }, + "value": 28 + }, + "selfTracing": { + "$id": "3414", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "3415", + "mode": { + "$id": "3416", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3417", + "kind": "number", + "type": { + "$ref": "1387" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "3418", + "kind": "number", + "type": { + "$ref": "1393" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "3419", + "kind": "model", + "type": { + "$ref": "1401" + }, + "value": { + "$id": "3420", + "maxSize": { + "$id": "3421", + "kind": "string", + "type": { + "$ref": "1403" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "3422", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "3423", + "volumeName": { + "$id": "3424", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3425", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3426", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3427", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "3428", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3429", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "3430", + "apiGroup": { + "$id": "3431", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3432", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3433", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3434", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "3435", + "apiGroup": { + "$id": "3436", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3437", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3438", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3439", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3440", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "3441", + "limits": { + "$id": "3442", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "3443", + "key2719": { + "$id": "3444", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3445", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "3446", + "key2909": { + "$id": "3447", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3448", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "3449", + "matchExpressions": { + "$id": "3450", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "3451", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "3452", + "key": { + "$id": "3453", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "3454", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "3455", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "3456", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3457", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "3458", + "key6673": { + "$id": "3459", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3460", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "3461", + "volumeName": { + "$id": "3462", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3463", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3464", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3465", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "3466", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3467", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "3468", + "apiGroup": { + "$id": "3469", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3470", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3471", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3472", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "3473", + "apiGroup": { + "$id": "3474", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3475", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3476", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3477", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3478", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "3479", + "limits": { + "$id": "3480", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "3481", + "key2719": { + "$id": "3482", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3483", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "3484", + "key2909": { + "$id": "3485", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3486", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "3487", + "matchExpressions": { + "$id": "3488", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "3489", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "3490", + "key": { + "$id": "3491", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "3492", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "3493", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "3494", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3495", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "3496", + "key6673": { + "$id": "3497", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3498", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "3499", + "cpu": { + "$id": "3500", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3501", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3502", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3503", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "3504", + "name": { + "$id": "3505", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3506", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3507", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "3508", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "dowrkel" + }, + "type": { + "$id": "3509", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "3510", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "3511", + "createdBy": { + "$id": "3512", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3513", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "3514", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3515", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3516", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3517", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "3518", + "response": { + "$ref": "2386" + }, + "statusCode": 201, + "bodyValue": { + "$id": "3519", + "kind": "model", + "type": { + "$ref": "1257" + }, + "value": { + "$id": "3520", + "properties": { + "$id": "3521", + "kind": "model", + "type": { + "$ref": "1259" + }, + "value": { + "$id": "3522", + "advanced": { + "$id": "3523", + "kind": "model", + "type": { + "$ref": "1261" + }, + "value": { + "$id": "3524", + "clients": { + "$id": "3525", + "kind": "model", + "type": { + "$ref": "1263" + }, + "value": { + "$id": "3526", + "maxSessionExpirySeconds": { + "$id": "3527", + "kind": "number", + "type": { + "$ref": "1265" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "3528", + "kind": "number", + "type": { + "$ref": "1269" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "3529", + "kind": "number", + "type": { + "$ref": "1273" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "3530", + "kind": "model", + "type": { + "$ref": "1277" + }, + "value": { + "$id": "3531", + "length": { + "$id": "3532", + "kind": "number", + "type": { + "$ref": "1279" + }, + "value": 6 + }, + "strategy": { + "$id": "3533", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "3534", + "kind": "number", + "type": { + "$ref": "1288" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "3535", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "3536", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "3537", + "kind": "model", + "type": { + "$ref": "1301" + }, + "value": { + "$id": "3538", + "duration": { + "$id": "3539", + "kind": "string", + "type": { + "$ref": "1303" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "3540", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "3541", + "kind": "model", + "type": { + "$ref": "1204" + }, + "value": { + "$id": "3542", + "algorithm": { + "$id": "3543", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3544", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "3545", + "kind": "model", + "type": { + "$ref": "1318" + }, + "value": { + "$id": "3546", + "backendChain": { + "$id": "3547", + "kind": "model", + "type": { + "$ref": "1320" + }, + "value": { + "$id": "3548", + "partitions": { + "$id": "3549", + "kind": "number", + "type": { + "$ref": "1322" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "3550", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 5 + }, + "workers": { + "$id": "3551", + "kind": "number", + "type": { + "$ref": "1330" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "3552", + "kind": "model", + "type": { + "$ref": "1336" + }, + "value": { + "$id": "3553", + "replicas": { + "$id": "3554", + "kind": "number", + "type": { + "$ref": "1338" + }, + "value": 2 + }, + "workers": { + "$id": "3555", + "kind": "number", + "type": { + "$ref": "1342" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "3556", + "kind": "model", + "type": { + "$ref": "1350" + }, + "value": { + "$id": "3557", + "logs": { + "$id": "3558", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3559", + "level": { + "$id": "3560", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "3561", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "3562", + "prometheusPort": { + "$id": "3563", + "kind": "number", + "type": { + "$ref": "931" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "3564", + "kind": "model", + "type": { + "$ref": "1358" + }, + "value": { + "$id": "3565", + "mode": { + "$id": "3566", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3567", + "kind": "number", + "type": { + "$ref": "1363" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "3568", + "kind": "number", + "type": { + "$ref": "1367" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "3569", + "kind": "model", + "type": { + "$ref": "1373" + }, + "value": { + "$id": "3570", + "mode": { + "$id": "3571", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "3572", + "kind": "number", + "type": { + "$ref": "1378" + }, + "value": 28 + }, + "selfTracing": { + "$id": "3573", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "3574", + "mode": { + "$id": "3575", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3576", + "kind": "number", + "type": { + "$ref": "1387" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "3577", + "kind": "number", + "type": { + "$ref": "1393" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "3578", + "kind": "model", + "type": { + "$ref": "1401" + }, + "value": { + "$id": "3579", + "maxSize": { + "$id": "3580", + "kind": "string", + "type": { + "$ref": "1403" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "3581", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "3582", + "volumeName": { + "$id": "3583", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3584", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3585", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3586", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "3587", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3588", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "3589", + "apiGroup": { + "$id": "3590", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3591", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3592", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3593", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "3594", + "apiGroup": { + "$id": "3595", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3596", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3597", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3598", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3599", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "3600", + "limits": { + "$id": "3601", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "3602", + "key2719": { + "$id": "3603", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3604", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "3605", + "key2909": { + "$id": "3606", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3607", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "3608", + "matchExpressions": { + "$id": "3609", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "3610", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "3611", + "key": { + "$id": "3612", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "3613", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "3614", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "3615", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3616", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "3617", + "key6673": { + "$id": "3618", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3619", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "3620", + "volumeName": { + "$id": "3621", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3622", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3623", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3624", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "3625", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3626", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "3627", + "apiGroup": { + "$id": "3628", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3629", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3630", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3631", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "3632", + "apiGroup": { + "$id": "3633", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3634", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3635", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3636", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3637", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "3638", + "limits": { + "$id": "3639", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "3640", + "key2719": { + "$id": "3641", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3642", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "3643", + "key2909": { + "$id": "3644", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3645", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "3646", + "matchExpressions": { + "$id": "3647", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "3648", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "3649", + "key": { + "$id": "3650", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "3651", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "3652", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "3653", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3654", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "3655", + "key6673": { + "$id": "3656", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3657", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "3658", + "cpu": { + "$id": "3659", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3660", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3661", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3662", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "3663", + "name": { + "$id": "3664", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3665", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3666", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "3667", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "dowrkel" + }, + "type": { + "$id": "3668", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "3669", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "3670", + "createdBy": { + "$id": "3671", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3672", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "3673", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3674", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3675", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3676", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "3677", + "Name": "delete", + "ResourceName": "BrokerResource", + "Doc": "Delete a BrokerResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3678", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "3679", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3680", + "Type": { + "$id": "3681", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3682", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "3683", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3684", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3685", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "3686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3687", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "3688", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3689", + "Name": "brokerName", + "NameInRequest": "brokerName", + "Doc": "Name of broker.", + "Type": { + "$id": "3690", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3691", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3692", + "kind": "constant", + "valueType": { + "$id": "3693", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3694", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "3695", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "3696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "3697", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "3698", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "3699", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}", + "BufferResponse": true, + "LongRunning": { + "$id": "3700", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "3701", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Broker.delete", + "Decorators": [], + "Examples": [ + { + "$id": "3702", + "kind": "http", + "name": "Broker_Delete", + "description": "Broker_Delete", + "filePath": "2025-04-01/Broker_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "3703", + "parameter": { + "$ref": "3678" + }, + "value": { + "$id": "3704", + "kind": "string", + "type": { + "$ref": "3679" + }, + "value": "2025-04-01" + } + }, + { + "$id": "3705", + "parameter": { + "$ref": "3682" + }, + "value": { + "$id": "3706", + "kind": "string", + "type": { + "$ref": "3683" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "3707", + "parameter": { + "$ref": "3685" + }, + "value": { + "$id": "3708", + "kind": "string", + "type": { + "$ref": "3686" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "3709", + "parameter": { + "$ref": "3687" + }, + "value": { + "$id": "3710", + "kind": "string", + "type": { + "$ref": "3688" + }, + "value": "resource-name123" + } + }, + { + "$id": "3711", + "parameter": { + "$ref": "3689" + }, + "value": { + "$id": "3712", + "kind": "string", + "type": { + "$ref": "3690" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "3713", + "response": { + "$ref": "3694" + }, + "statusCode": 202 + }, + { + "$id": "3714", + "response": { + "$ref": "3699" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "3715", + "Name": "listByResourceGroup", + "ResourceName": "BrokerResource", + "Doc": "List BrokerResource resources by InstanceResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3716", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "3717", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3718", + "Type": { + "$id": "3719", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3720", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "3721", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3722", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3723", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "3724", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3725", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "3726", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3727", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3728", + "kind": "constant", + "valueType": { + "$id": "3729", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3730", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1529" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers", + "BufferResponse": true, + "Paging": { + "$id": "3731", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "3732", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Broker.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "3733", + "kind": "http", + "name": "Broker_ListByResourceGroup", + "description": "Broker_ListByResourceGroup", + "filePath": "2025-04-01/Broker_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "3734", + "parameter": { + "$ref": "3716" + }, + "value": { + "$id": "3735", + "kind": "string", + "type": { + "$ref": "3717" + }, + "value": "2025-04-01" + } + }, + { + "$id": "3736", + "parameter": { + "$ref": "3720" + }, + "value": { + "$id": "3737", + "kind": "string", + "type": { + "$ref": "3721" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "3738", + "parameter": { + "$ref": "3723" + }, + "value": { + "$id": "3739", + "kind": "string", + "type": { + "$ref": "3724" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "3740", + "parameter": { + "$ref": "3725" + }, + "value": { + "$id": "3741", + "kind": "string", + "type": { + "$ref": "3726" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "3742", + "response": { + "$ref": "3730" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3743", + "kind": "model", + "type": { + "$ref": "1529" + }, + "value": { + "$id": "3744", + "value": { + "$id": "3745", + "kind": "array", + "type": { + "$ref": "1531" + }, + "value": [ + { + "$id": "3746", + "kind": "model", + "type": { + "$ref": "1257" + }, + "value": { + "$id": "3747", + "properties": { + "$id": "3748", + "kind": "model", + "type": { + "$ref": "1259" + }, + "value": { + "$id": "3749", + "advanced": { + "$id": "3750", + "kind": "model", + "type": { + "$ref": "1261" + }, + "value": { + "$id": "3751", + "clients": { + "$id": "3752", + "kind": "model", + "type": { + "$ref": "1263" + }, + "value": { + "$id": "3753", + "maxSessionExpirySeconds": { + "$id": "3754", + "kind": "number", + "type": { + "$ref": "1265" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "3755", + "kind": "number", + "type": { + "$ref": "1269" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "3756", + "kind": "number", + "type": { + "$ref": "1273" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "3757", + "kind": "model", + "type": { + "$ref": "1277" + }, + "value": { + "$id": "3758", + "length": { + "$id": "3759", + "kind": "number", + "type": { + "$ref": "1279" + }, + "value": 6 + }, + "strategy": { + "$id": "3760", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "3761", + "kind": "number", + "type": { + "$ref": "1288" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "3762", + "kind": "number", + "type": { + "$ref": "1292" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "3763", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "3764", + "kind": "model", + "type": { + "$ref": "1301" + }, + "value": { + "$id": "3765", + "duration": { + "$id": "3766", + "kind": "string", + "type": { + "$ref": "1303" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "3767", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "3768", + "kind": "model", + "type": { + "$ref": "1204" + }, + "value": { + "$id": "3769", + "algorithm": { + "$id": "3770", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3771", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "3772", + "kind": "model", + "type": { + "$ref": "1318" + }, + "value": { + "$id": "3773", + "backendChain": { + "$id": "3774", + "kind": "model", + "type": { + "$ref": "1320" + }, + "value": { + "$id": "3775", + "partitions": { + "$id": "3776", + "kind": "number", + "type": { + "$ref": "1322" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "3777", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 5 + }, + "workers": { + "$id": "3778", + "kind": "number", + "type": { + "$ref": "1330" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "3779", + "kind": "model", + "type": { + "$ref": "1336" + }, + "value": { + "$id": "3780", + "replicas": { + "$id": "3781", + "kind": "number", + "type": { + "$ref": "1338" + }, + "value": 2 + }, + "workers": { + "$id": "3782", + "kind": "number", + "type": { + "$ref": "1342" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "3783", + "kind": "model", + "type": { + "$ref": "1350" + }, + "value": { + "$id": "3784", + "logs": { + "$id": "3785", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3786", + "level": { + "$id": "3787", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "3788", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "3789", + "prometheusPort": { + "$id": "3790", + "kind": "number", + "type": { + "$ref": "931" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "3791", + "kind": "model", + "type": { + "$ref": "1358" + }, + "value": { + "$id": "3792", + "mode": { + "$id": "3793", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3794", + "kind": "number", + "type": { + "$ref": "1363" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "3795", + "kind": "number", + "type": { + "$ref": "1367" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "3796", + "kind": "model", + "type": { + "$ref": "1373" + }, + "value": { + "$id": "3797", + "mode": { + "$id": "3798", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "3799", + "kind": "number", + "type": { + "$ref": "1378" + }, + "value": 28 + }, + "selfTracing": { + "$id": "3800", + "kind": "model", + "type": { + "$ref": "1382" + }, + "value": { + "$id": "3801", + "mode": { + "$id": "3802", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3803", + "kind": "number", + "type": { + "$ref": "1387" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "3804", + "kind": "number", + "type": { + "$ref": "1393" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "3805", + "kind": "model", + "type": { + "$ref": "1401" + }, + "value": { + "$id": "3806", + "maxSize": { + "$id": "3807", + "kind": "string", + "type": { + "$ref": "1403" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "3808", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "3809", + "volumeName": { + "$id": "3810", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3811", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3812", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3813", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "3814", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3815", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "3816", + "apiGroup": { + "$id": "3817", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3818", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3819", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3820", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "3821", + "apiGroup": { + "$id": "3822", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3823", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3824", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3825", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3826", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "3827", + "limits": { + "$id": "3828", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "3829", + "key2719": { + "$id": "3830", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3831", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "3832", + "key2909": { + "$id": "3833", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3834", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "3835", + "matchExpressions": { + "$id": "3836", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "3837", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "3838", + "key": { + "$id": "3839", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "3840", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "3841", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "3842", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3843", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "3844", + "key6673": { + "$id": "3845", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3846", + "kind": "model", + "type": { + "$ref": "1407" + }, + "value": { + "$id": "3847", + "volumeName": { + "$id": "3848", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3849", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3850", + "kind": "string", + "type": { + "$ref": "1417" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3851", + "kind": "array", + "type": { + "$ref": "1421" + }, + "value": [ + { + "$id": "3852", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3853", + "kind": "model", + "type": { + "$ref": "1426" + }, + "value": { + "$id": "3854", + "apiGroup": { + "$id": "3855", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3856", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3857", + "kind": "string", + "type": { + "$ref": "1436" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3858", + "kind": "model", + "type": { + "$ref": "1442" + }, + "value": { + "$id": "3859", + "apiGroup": { + "$id": "3860", + "kind": "string", + "type": { + "$ref": "1444" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3861", + "kind": "string", + "type": { + "$ref": "1448" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3862", + "kind": "string", + "type": { + "$ref": "1452" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3863", + "kind": "string", + "type": { + "$ref": "1456" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3864", + "kind": "model", + "type": { + "$ref": "1462" + }, + "value": { + "$id": "3865", + "limits": { + "$id": "3866", + "kind": "dict", + "type": { + "$ref": "1464" + }, + "value": { + "$id": "3867", + "key2719": { + "$id": "3868", + "kind": "string", + "type": { + "$ref": "1466" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3869", + "kind": "dict", + "type": { + "$ref": "1470" + }, + "value": { + "$id": "3870", + "key2909": { + "$id": "3871", + "kind": "string", + "type": { + "$ref": "1472" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3872", + "kind": "model", + "type": { + "$ref": "1478" + }, + "value": { + "$id": "3873", + "matchExpressions": { + "$id": "3874", + "kind": "array", + "type": { + "$ref": "1480" + }, + "value": [ + { + "$id": "3875", + "kind": "model", + "type": { + "$ref": "1481" + }, + "value": { + "$id": "3876", + "key": { + "$id": "3877", + "kind": "string", + "type": { + "$ref": "1483" + }, + "value": "e" + }, + "operator": { + "$id": "3878", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "In" + }, + "values": { + "$id": "3879", + "kind": "array", + "type": { + "$ref": "1490" + }, + "value": [ + { + "$id": "3880", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3881", + "kind": "dict", + "type": { + "$ref": "1497" + }, + "value": { + "$id": "3882", + "key6673": { + "$id": "3883", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3884", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "3885", + "cpu": { + "$id": "3886", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3887", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3888", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3889", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "3890", + "name": { + "$id": "3891", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3892", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3893", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "3894", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "dowrkel" + }, + "type": { + "$id": "3895", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "3896", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "3897", + "createdBy": { + "$id": "3898", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3899", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "3900", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3901", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3902", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3903", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "3904", + "kind": "string", + "type": { + "$ref": "1535" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "3905" + }, + "Parent": "IoTOperationsClient", + "Parameters": [ + { + "$id": "3906", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "3907", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "3908", + "Type": { + "$id": "3909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Broker" + }, + { + "$id": "3910", + "Name": "BrokerListener", + "Namespace": "Microsoft.IoTOperations", + "Operations": [ + { + "$id": "3911", + "Name": "get", + "ResourceName": "BrokerListenerResource", + "Doc": "Get a BrokerListenerResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "3912", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "3913", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "3914", + "Type": { + "$id": "3915", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3916", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "3917", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3918", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3919", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "3920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3921", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "3922", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3923", + "Name": "brokerName", + "NameInRequest": "brokerName", + "Doc": "Name of broker.", + "Type": { + "$id": "3924", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3925", + "Name": "listenerName", + "NameInRequest": "listenerName", + "Doc": "Name of Instance broker listener resource", + "Type": { + "$id": "3926", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "3927", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "3928", + "kind": "constant", + "valueType": { + "$id": "3929", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "3930", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1140" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/listeners/{listenerName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener.get", + "Decorators": [], + "Examples": [ + { + "$id": "3931", + "kind": "http", + "name": "BrokerListener_Get", + "description": "BrokerListener_Get", + "filePath": "2025-04-01/BrokerListener_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "3932", + "parameter": { + "$ref": "3912" + }, + "value": { + "$id": "3933", + "kind": "string", + "type": { + "$ref": "3913" + }, + "value": "2025-04-01" + } + }, + { + "$id": "3934", + "parameter": { + "$ref": "3916" + }, + "value": { + "$id": "3935", + "kind": "string", + "type": { + "$ref": "3917" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "3936", + "parameter": { + "$ref": "3919" + }, + "value": { + "$id": "3937", + "kind": "string", + "type": { + "$ref": "3920" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "3938", + "parameter": { + "$ref": "3921" + }, + "value": { + "$id": "3939", + "kind": "string", + "type": { + "$ref": "3922" + }, + "value": "resource-name123" + } + }, + { + "$id": "3940", + "parameter": { + "$ref": "3923" + }, + "value": { + "$id": "3941", + "kind": "string", + "type": { + "$ref": "3924" + }, + "value": "resource-name123" + } + }, + { + "$id": "3942", + "parameter": { + "$ref": "3925" + }, + "value": { + "$id": "3943", + "kind": "string", + "type": { + "$ref": "3926" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "3944", + "response": { + "$ref": "3930" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3945", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "3946", + "properties": { + "$id": "3947", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "3948", + "serviceName": { + "$id": "3949", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "tpfiszlapdpxktx" + }, + "ports": { + "$id": "3950", + "kind": "array", + "type": { + "$ref": "1148" + }, + "value": [ + { + "$id": "3951", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "3952", + "authenticationRef": { + "$id": "3953", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "tjvdroaqqy" + }, + "authorizationRef": { + "$id": "3954", + "kind": "string", + "type": { + "$ref": "1155" + }, + "value": "inxhvxnwswyrvt" + }, + "nodePort": { + "$id": "3955", + "kind": "number", + "type": { + "$ref": "1159" + }, + "value": 7281 + }, + "port": { + "$id": "3956", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 1268 + }, + "protocol": { + "$id": "3957", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Mqtt" + }, + "tls": { + "$id": "3958", + "kind": "model", + "type": { + "$ref": "1170" + }, + "value": { + "$id": "3959", + "mode": { + "$id": "3960", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "3961", + "kind": "model", + "type": { + "$ref": "1175" + }, + "value": { + "$id": "3962", + "duration": { + "$id": "3963", + "kind": "string", + "type": { + "$ref": "1177" + }, + "value": "qmpeffoksron" + }, + "secretName": { + "$id": "3964", + "kind": "string", + "type": { + "$ref": "1181" + }, + "value": "oagi" + }, + "renewBefore": { + "$id": "3965", + "kind": "string", + "type": { + "$ref": "1185" + }, + "value": "hutno" + }, + "issuerRef": { + "$id": "3966", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "3967", + "group": { + "$id": "3968", + "kind": "string", + "type": { + "$ref": "1191" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "kind": { + "$id": "3969", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "Issuer" + }, + "name": { + "$id": "3970", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "ocwoqpgucvjrsuudtjhb" + } + } + }, + "privateKey": { + "$id": "3971", + "kind": "model", + "type": { + "$ref": "1204" + }, + "value": { + "$id": "3972", + "algorithm": { + "$id": "3973", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3974", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "Always" + } + } + }, + "san": { + "$id": "3975", + "kind": "model", + "type": { + "$ref": "1214" + }, + "value": { + "$id": "3976", + "dns": { + "$id": "3977", + "kind": "array", + "type": { + "$ref": "1216" + }, + "value": [ + { + "$id": "3978", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "xhvmhrrhgfsapocjeebqtnzarlj" + } + ] + }, + "ip": { + "$id": "3979", + "kind": "array", + "type": { + "$ref": "1221" + }, + "value": [ + { + "$id": "3980", + "kind": "string", + "type": { + "$ref": "1222" + }, + "value": "zbgugfzcgsmegevzktsnibyuyp" + } + ] + } + } + } + } + }, + "manual": { + "$id": "3981", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "3982", + "secretRef": { + "$id": "3983", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "secret-name" + } + } + } + } + } + } + } + ] + }, + "serviceType": { + "$id": "3984", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "ClusterIp" + }, + "provisioningState": { + "$id": "3985", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3986", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "3987", + "name": { + "$id": "3988", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3989", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3990", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "3991", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "3992", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "3993", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "3994", + "createdBy": { + "$id": "3995", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3996", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "3997", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3998", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3999", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4000", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "4001", + "Name": "createOrUpdate", + "ResourceName": "BrokerListenerResource", + "Doc": "Create a BrokerListenerResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4002", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "4003", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "4004", + "Type": { + "$id": "4005", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4006", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "4007", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4008", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4009", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "4010", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4011", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "4012", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4013", + "Name": "brokerName", + "NameInRequest": "brokerName", + "Doc": "Name of broker.", + "Type": { + "$id": "4014", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4015", + "Name": "listenerName", + "NameInRequest": "listenerName", + "Doc": "Name of Instance broker listener resource", + "Type": { + "$id": "4016", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4017", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4018", + "kind": "constant", + "valueType": { + "$id": "4019", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4020", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4021", + "kind": "constant", + "valueType": { + "$id": "4022", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4023", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "1140" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4024", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1140" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "4025", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "1140" + }, + "Headers": [ + { + "$id": "4026", + "Name": "azureAsyncOperation", + "NameInResponse": "Azure-AsyncOperation", + "Doc": "A link to the status monitor", + "Type": { + "$id": "4027", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "4028", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "4029", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/listeners/{listenerName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "4030", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "4031", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1140" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener.createOrUpdate", + "Decorators": [], + "Examples": [ + { + "$id": "4032", + "kind": "http", + "name": "BrokerListener_CreateOrUpdate_Complex", + "description": "BrokerListener_CreateOrUpdate_Complex", + "filePath": "2025-04-01/BrokerListener_CreateOrUpdate_Complex.json", + "parameters": [ + { + "$id": "4033", + "parameter": { + "$ref": "4002" + }, + "value": { + "$id": "4034", + "kind": "string", + "type": { + "$ref": "4003" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4035", + "parameter": { + "$ref": "4006" + }, + "value": { + "$id": "4036", + "kind": "string", + "type": { + "$ref": "4007" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4037", + "parameter": { + "$ref": "4009" + }, + "value": { + "$id": "4038", + "kind": "string", + "type": { + "$ref": "4010" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4039", + "parameter": { + "$ref": "4011" + }, + "value": { + "$id": "4040", + "kind": "string", + "type": { + "$ref": "4012" + }, + "value": "resource-name123" + } + }, + { + "$id": "4041", + "parameter": { + "$ref": "4013" + }, + "value": { + "$id": "4042", + "kind": "string", + "type": { + "$ref": "4014" + }, + "value": "resource-name123" + } + }, + { + "$id": "4043", + "parameter": { + "$ref": "4015" + }, + "value": { + "$id": "4044", + "kind": "string", + "type": { + "$ref": "4016" + }, + "value": "resource-name123" + } + }, + { + "$id": "4045", + "parameter": { + "$ref": "4023" + }, + "value": { + "$id": "4046", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4047", + "properties": { + "$id": "4048", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4049", + "serviceType": { + "$id": "4050", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "LoadBalancer" + }, + "ports": { + "$id": "4051", + "kind": "array", + "type": { + "$ref": "1148" + }, + "value": [ + { + "$id": "4052", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4053", + "port": { + "$id": "4054", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 8080 + }, + "authenticationRef": { + "$id": "4055", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4056", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "WebSockets" + } + } + }, + { + "$id": "4057", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4058", + "port": { + "$id": "4059", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 8443 + }, + "authenticationRef": { + "$id": "4060", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4061", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "WebSockets" + }, + "tls": { + "$id": "4062", + "kind": "model", + "type": { + "$ref": "1170" + }, + "value": { + "$id": "4063", + "mode": { + "$id": "4064", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4065", + "kind": "model", + "type": { + "$ref": "1175" + }, + "value": { + "$id": "4066", + "issuerRef": { + "$id": "4067", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "4068", + "group": { + "$id": "4069", + "kind": "string", + "type": { + "$ref": "1191" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "name": { + "$id": "4070", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "example-issuer" + }, + "kind": { + "$id": "4071", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "Issuer" + } + } + } + } + } + } + } + } + }, + { + "$id": "4072", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4073", + "port": { + "$id": "4074", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 1883 + }, + "authenticationRef": { + "$id": "4075", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "example-authentication" + } + } + }, + { + "$id": "4076", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4077", + "port": { + "$id": "4078", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 8883 + }, + "authenticationRef": { + "$id": "4079", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "example-authentication" + }, + "tls": { + "$id": "4080", + "kind": "model", + "type": { + "$ref": "1170" + }, + "value": { + "$id": "4081", + "mode": { + "$id": "4082", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Manual" + }, + "manual": { + "$id": "4083", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4084", + "secretRef": { + "$id": "4085", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "example-secret" + } + } + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "4086", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4087", + "name": { + "$id": "4088", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4089", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "4090", + "response": { + "$ref": "4024" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4091", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4092", + "properties": { + "$id": "4093", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4094", + "serviceName": { + "$id": "4095", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "tpfiszlapdpxktx" + }, + "serviceType": { + "$id": "4096", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "LoadBalancer" + }, + "ports": { + "$id": "4097", + "kind": "array", + "type": { + "$ref": "1148" + }, + "value": [ + { + "$id": "4098", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4099", + "port": { + "$id": "4100", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 8080 + }, + "authenticationRef": { + "$id": "4101", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4102", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "WebSockets" + } + } + }, + { + "$id": "4103", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4104", + "port": { + "$id": "4105", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 8443 + }, + "authenticationRef": { + "$id": "4106", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4107", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "WebSockets" + }, + "tls": { + "$id": "4108", + "kind": "model", + "type": { + "$ref": "1170" + }, + "value": { + "$id": "4109", + "mode": { + "$id": "4110", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4111", + "kind": "model", + "type": { + "$ref": "1175" + }, + "value": { + "$id": "4112", + "issuerRef": { + "$id": "4113", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "4114", + "group": { + "$id": "4115", + "kind": "string", + "type": { + "$ref": "1191" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "name": { + "$id": "4116", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "example-issuer" + }, + "kind": { + "$id": "4117", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "Issuer" + } + } + } + } + } + } + } + } + }, + { + "$id": "4118", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4119", + "port": { + "$id": "4120", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 1883 + }, + "authenticationRef": { + "$id": "4121", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "example-authentication" + } + } + }, + { + "$id": "4122", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4123", + "port": { + "$id": "4124", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 8883 + }, + "authenticationRef": { + "$id": "4125", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "example-authentication" + }, + "tls": { + "$id": "4126", + "kind": "model", + "type": { + "$ref": "1170" + }, + "value": { + "$id": "4127", + "mode": { + "$id": "4128", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Manual" + }, + "manual": { + "$id": "4129", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4130", + "secretRef": { + "$id": "4131", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "example-secret" + } + } + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4132", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4133", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4134", + "name": { + "$id": "4135", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4136", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4137", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "4138", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4139", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4140", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "4141", + "createdBy": { + "$id": "4142", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4143", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "4144", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4145", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4146", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4147", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "4148", + "response": { + "$ref": "4025" + }, + "statusCode": 201, + "bodyValue": { + "$id": "4149", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4150", + "properties": { + "$id": "4151", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4152", + "serviceName": { + "$id": "4153", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "tpfiszlapdpxktx" + }, + "serviceType": { + "$id": "4154", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "LoadBalancer" + }, + "ports": { + "$id": "4155", + "kind": "array", + "type": { + "$ref": "1148" + }, + "value": [ + { + "$id": "4156", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4157", + "port": { + "$id": "4158", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 8080 + }, + "authenticationRef": { + "$id": "4159", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4160", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "WebSockets" + } + } + }, + { + "$id": "4161", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4162", + "port": { + "$id": "4163", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 8443 + }, + "authenticationRef": { + "$id": "4164", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4165", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "WebSockets" + }, + "tls": { + "$id": "4166", + "kind": "model", + "type": { + "$ref": "1170" + }, + "value": { + "$id": "4167", + "mode": { + "$id": "4168", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4169", + "kind": "model", + "type": { + "$ref": "1175" + }, + "value": { + "$id": "4170", + "issuerRef": { + "$id": "4171", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "4172", + "group": { + "$id": "4173", + "kind": "string", + "type": { + "$ref": "1191" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "name": { + "$id": "4174", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "example-issuer" + }, + "kind": { + "$id": "4175", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "Issuer" + } + } + } + } + } + } + } + } + }, + { + "$id": "4176", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4177", + "port": { + "$id": "4178", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 1883 + }, + "authenticationRef": { + "$id": "4179", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "example-authentication" + } + } + }, + { + "$id": "4180", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4181", + "port": { + "$id": "4182", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 8883 + }, + "authenticationRef": { + "$id": "4183", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "example-authentication" + }, + "tls": { + "$id": "4184", + "kind": "model", + "type": { + "$ref": "1170" + }, + "value": { + "$id": "4185", + "mode": { + "$id": "4186", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Manual" + }, + "manual": { + "$id": "4187", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4188", + "secretRef": { + "$id": "4189", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "example-secret" + } + } + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4190", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4191", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4192", + "name": { + "$id": "4193", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4194", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4195", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "4196", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4197", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4198", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "4199", + "createdBy": { + "$id": "4200", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4201", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "4202", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4203", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4204", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4205", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "4206", + "kind": "http", + "name": "BrokerListener_CreateOrUpdate", + "description": "BrokerListener_CreateOrUpdate", + "filePath": "2025-04-01/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "4207", + "parameter": { + "$ref": "4002" + }, + "value": { + "$id": "4208", + "kind": "string", + "type": { + "$ref": "4003" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4209", + "parameter": { + "$ref": "4006" + }, + "value": { + "$id": "4210", + "kind": "string", + "type": { + "$ref": "4007" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4211", + "parameter": { + "$ref": "4009" + }, + "value": { + "$id": "4212", + "kind": "string", + "type": { + "$ref": "4010" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4213", + "parameter": { + "$ref": "4011" + }, + "value": { + "$id": "4214", + "kind": "string", + "type": { + "$ref": "4012" + }, + "value": "resource-name123" + } + }, + { + "$id": "4215", + "parameter": { + "$ref": "4013" + }, + "value": { + "$id": "4216", + "kind": "string", + "type": { + "$ref": "4014" + }, + "value": "resource-name123" + } + }, + { + "$id": "4217", + "parameter": { + "$ref": "4015" + }, + "value": { + "$id": "4218", + "kind": "string", + "type": { + "$ref": "4016" + }, + "value": "resource-name123" + } + }, + { + "$id": "4219", + "parameter": { + "$ref": "4023" + }, + "value": { + "$id": "4220", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4221", + "properties": { + "$id": "4222", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4223", + "serviceName": { + "$id": "4224", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "tpfiszlapdpxktx" + }, + "ports": { + "$id": "4225", + "kind": "array", + "type": { + "$ref": "1148" + }, + "value": [ + { + "$id": "4226", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4227", + "authenticationRef": { + "$id": "4228", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "tjvdroaqqy" + }, + "authorizationRef": { + "$id": "4229", + "kind": "string", + "type": { + "$ref": "1155" + }, + "value": "inxhvxnwswyrvt" + }, + "nodePort": { + "$id": "4230", + "kind": "number", + "type": { + "$ref": "1159" + }, + "value": 7281 + }, + "port": { + "$id": "4231", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 1268 + }, + "protocol": { + "$id": "4232", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Mqtt" + }, + "tls": { + "$id": "4233", + "kind": "model", + "type": { + "$ref": "1170" + }, + "value": { + "$id": "4234", + "mode": { + "$id": "4235", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4236", + "kind": "model", + "type": { + "$ref": "1175" + }, + "value": { + "$id": "4237", + "duration": { + "$id": "4238", + "kind": "string", + "type": { + "$ref": "1177" + }, + "value": "qmpeffoksron" + }, + "secretName": { + "$id": "4239", + "kind": "string", + "type": { + "$ref": "1181" + }, + "value": "oagi" + }, + "renewBefore": { + "$id": "4240", + "kind": "string", + "type": { + "$ref": "1185" + }, + "value": "hutno" + }, + "issuerRef": { + "$id": "4241", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "4242", + "group": { + "$id": "4243", + "kind": "string", + "type": { + "$ref": "1191" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "kind": { + "$id": "4244", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "Issuer" + }, + "name": { + "$id": "4245", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "ocwoqpgucvjrsuudtjhb" + } + } + }, + "privateKey": { + "$id": "4246", + "kind": "model", + "type": { + "$ref": "1204" + }, + "value": { + "$id": "4247", + "algorithm": { + "$id": "4248", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "4249", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "Always" + } + } + }, + "san": { + "$id": "4250", + "kind": "model", + "type": { + "$ref": "1214" + }, + "value": { + "$id": "4251", + "dns": { + "$id": "4252", + "kind": "array", + "type": { + "$ref": "1216" + }, + "value": [ + { + "$id": "4253", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "xhvmhrrhgfsapocjeebqtnzarlj" + } + ] + }, + "ip": { + "$id": "4254", + "kind": "array", + "type": { + "$ref": "1221" + }, + "value": [ + { + "$id": "4255", + "kind": "string", + "type": { + "$ref": "1222" + }, + "value": "zbgugfzcgsmegevzktsnibyuyp" + } + ] + } + } + } + } + }, + "manual": { + "$id": "4256", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4257", + "secretRef": { + "$id": "4258", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "secret-name" + } + } + } + } + } + } + } + ] + }, + "serviceType": { + "$id": "4259", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "ClusterIp" + } + } + }, + "extendedLocation": { + "$id": "4260", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4261", + "name": { + "$id": "4262", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4263", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "4264", + "response": { + "$ref": "4024" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4265", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4266", + "properties": { + "$id": "4267", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4268", + "serviceName": { + "$id": "4269", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "tpfiszlapdpxktx" + }, + "ports": { + "$id": "4270", + "kind": "array", + "type": { + "$ref": "1148" + }, + "value": [ + { + "$id": "4271", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4272", + "authenticationRef": { + "$id": "4273", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "tjvdroaqqy" + }, + "authorizationRef": { + "$id": "4274", + "kind": "string", + "type": { + "$ref": "1155" + }, + "value": "inxhvxnwswyrvt" + }, + "nodePort": { + "$id": "4275", + "kind": "number", + "type": { + "$ref": "1159" + }, + "value": 7281 + }, + "port": { + "$id": "4276", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 1268 + }, + "protocol": { + "$id": "4277", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Mqtt" + }, + "tls": { + "$id": "4278", + "kind": "model", + "type": { + "$ref": "1170" + }, + "value": { + "$id": "4279", + "mode": { + "$id": "4280", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4281", + "kind": "model", + "type": { + "$ref": "1175" + }, + "value": { + "$id": "4282", + "duration": { + "$id": "4283", + "kind": "string", + "type": { + "$ref": "1177" + }, + "value": "qmpeffoksron" + }, + "secretName": { + "$id": "4284", + "kind": "string", + "type": { + "$ref": "1181" + }, + "value": "oagi" + }, + "renewBefore": { + "$id": "4285", + "kind": "string", + "type": { + "$ref": "1185" + }, + "value": "hutno" + }, + "issuerRef": { + "$id": "4286", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "4287", + "group": { + "$id": "4288", + "kind": "string", + "type": { + "$ref": "1191" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "kind": { + "$id": "4289", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "Issuer" + }, + "name": { + "$id": "4290", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "ocwoqpgucvjrsuudtjhb" + } + } + }, + "privateKey": { + "$id": "4291", + "kind": "model", + "type": { + "$ref": "1204" + }, + "value": { + "$id": "4292", + "algorithm": { + "$id": "4293", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "4294", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "Always" + } + } + }, + "san": { + "$id": "4295", + "kind": "model", + "type": { + "$ref": "1214" + }, + "value": { + "$id": "4296", + "dns": { + "$id": "4297", + "kind": "array", + "type": { + "$ref": "1216" + }, + "value": [ + { + "$id": "4298", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "xhvmhrrhgfsapocjeebqtnzarlj" + } + ] + }, + "ip": { + "$id": "4299", + "kind": "array", + "type": { + "$ref": "1221" + }, + "value": [ + { + "$id": "4300", + "kind": "string", + "type": { + "$ref": "1222" + }, + "value": "zbgugfzcgsmegevzktsnibyuyp" + } + ] + } + } + } + } + }, + "manual": { + "$id": "4301", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4302", + "secretRef": { + "$id": "4303", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "secret-name" + } + } + } + } + } + } + } + ] + }, + "serviceType": { + "$id": "4304", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "ClusterIp" + }, + "provisioningState": { + "$id": "4305", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4306", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4307", + "name": { + "$id": "4308", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4309", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4310", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "4311", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4312", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4313", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "4314", + "createdBy": { + "$id": "4315", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4316", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "4317", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4318", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4319", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4320", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "4321", + "response": { + "$ref": "4025" + }, + "statusCode": 201, + "bodyValue": { + "$id": "4322", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4323", + "properties": { + "$id": "4324", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4325", + "serviceName": { + "$id": "4326", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "tpfiszlapdpxktx" + }, + "ports": { + "$id": "4327", + "kind": "array", + "type": { + "$ref": "1148" + }, + "value": [ + { + "$id": "4328", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4329", + "authenticationRef": { + "$id": "4330", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "tjvdroaqqy" + }, + "authorizationRef": { + "$id": "4331", + "kind": "string", + "type": { + "$ref": "1155" + }, + "value": "inxhvxnwswyrvt" + }, + "nodePort": { + "$id": "4332", + "kind": "number", + "type": { + "$ref": "1159" + }, + "value": 7281 + }, + "port": { + "$id": "4333", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 1268 + }, + "protocol": { + "$id": "4334", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Mqtt" + }, + "tls": { + "$id": "4335", + "kind": "model", + "type": { + "$ref": "1170" + }, + "value": { + "$id": "4336", + "mode": { + "$id": "4337", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4338", + "kind": "model", + "type": { + "$ref": "1175" + }, + "value": { + "$id": "4339", + "duration": { + "$id": "4340", + "kind": "string", + "type": { + "$ref": "1177" + }, + "value": "qmpeffoksron" + }, + "secretName": { + "$id": "4341", + "kind": "string", + "type": { + "$ref": "1181" + }, + "value": "oagi" + }, + "renewBefore": { + "$id": "4342", + "kind": "string", + "type": { + "$ref": "1185" + }, + "value": "hutno" + }, + "issuerRef": { + "$id": "4343", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "4344", + "group": { + "$id": "4345", + "kind": "string", + "type": { + "$ref": "1191" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "kind": { + "$id": "4346", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "Issuer" + }, + "name": { + "$id": "4347", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "ocwoqpgucvjrsuudtjhb" + } + } + }, + "privateKey": { + "$id": "4348", + "kind": "model", + "type": { + "$ref": "1204" + }, + "value": { + "$id": "4349", + "algorithm": { + "$id": "4350", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "4351", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "Always" + } + } + }, + "san": { + "$id": "4352", + "kind": "model", + "type": { + "$ref": "1214" + }, + "value": { + "$id": "4353", + "dns": { + "$id": "4354", + "kind": "array", + "type": { + "$ref": "1216" + }, + "value": [ + { + "$id": "4355", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "xhvmhrrhgfsapocjeebqtnzarlj" + } + ] + }, + "ip": { + "$id": "4356", + "kind": "array", + "type": { + "$ref": "1221" + }, + "value": [ + { + "$id": "4357", + "kind": "string", + "type": { + "$ref": "1222" + }, + "value": "zbgugfzcgsmegevzktsnibyuyp" + } + ] + } + } + } + } + }, + "manual": { + "$id": "4358", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4359", + "secretRef": { + "$id": "4360", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "secret-name" + } + } + } + } + } + } + } + ] + }, + "serviceType": { + "$id": "4361", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "ClusterIp" + }, + "provisioningState": { + "$id": "4362", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4363", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4364", + "name": { + "$id": "4365", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4366", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4367", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "4368", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4369", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4370", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "4371", + "createdBy": { + "$id": "4372", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4373", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "4374", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4375", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4376", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4377", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "4378", + "kind": "http", + "name": "BrokerListener_CreateOrUpdate_Simple", + "description": "BrokerListener_CreateOrUpdate_Simple", + "filePath": "2025-04-01/BrokerListener_CreateOrUpdate_Simple.json", + "parameters": [ + { + "$id": "4379", + "parameter": { + "$ref": "4002" + }, + "value": { + "$id": "4380", + "kind": "string", + "type": { + "$ref": "4003" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4381", + "parameter": { + "$ref": "4006" + }, + "value": { + "$id": "4382", + "kind": "string", + "type": { + "$ref": "4007" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4383", + "parameter": { + "$ref": "4009" + }, + "value": { + "$id": "4384", + "kind": "string", + "type": { + "$ref": "4010" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4385", + "parameter": { + "$ref": "4011" + }, + "value": { + "$id": "4386", + "kind": "string", + "type": { + "$ref": "4012" + }, + "value": "resource-name123" + } + }, + { + "$id": "4387", + "parameter": { + "$ref": "4013" + }, + "value": { + "$id": "4388", + "kind": "string", + "type": { + "$ref": "4014" + }, + "value": "resource-name123" + } + }, + { + "$id": "4389", + "parameter": { + "$ref": "4015" + }, + "value": { + "$id": "4390", + "kind": "string", + "type": { + "$ref": "4016" + }, + "value": "resource-name123" + } + }, + { + "$id": "4391", + "parameter": { + "$ref": "4023" + }, + "value": { + "$id": "4392", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4393", + "properties": { + "$id": "4394", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4395", + "ports": { + "$id": "4396", + "kind": "array", + "type": { + "$ref": "1148" + }, + "value": [ + { + "$id": "4397", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4398", + "port": { + "$id": "4399", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 1883 + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "4400", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4401", + "name": { + "$id": "4402", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4403", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "4404", + "response": { + "$ref": "4024" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4405", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4406", + "properties": { + "$id": "4407", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4408", + "serviceName": { + "$id": "4409", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "tpfiszlapdpxktx" + }, + "serviceType": { + "$id": "4410", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "LoadBalancer" + }, + "ports": { + "$id": "4411", + "kind": "array", + "type": { + "$ref": "1148" + }, + "value": [ + { + "$id": "4412", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4413", + "port": { + "$id": "4414", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 1883 + } + } + } + ] + }, + "provisioningState": { + "$id": "4415", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4416", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4417", + "name": { + "$id": "4418", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4419", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4420", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "4421", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4422", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4423", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "4424", + "createdBy": { + "$id": "4425", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4426", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "4427", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4428", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4429", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4430", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "4431", + "response": { + "$ref": "4025" + }, + "statusCode": 201, + "bodyValue": { + "$id": "4432", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4433", + "properties": { + "$id": "4434", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4435", + "serviceName": { + "$id": "4436", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "tpfiszlapdpxktx" + }, + "serviceType": { + "$id": "4437", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "LoadBalancer" + }, + "ports": { + "$id": "4438", + "kind": "array", + "type": { + "$ref": "1148" + }, + "value": [ + { + "$id": "4439", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4440", + "port": { + "$id": "4441", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 1883 + } + } + } + ] + }, + "provisioningState": { + "$id": "4442", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4443", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4444", + "name": { + "$id": "4445", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4446", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4447", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "4448", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4449", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4450", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "4451", + "createdBy": { + "$id": "4452", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4453", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "4454", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4455", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4456", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4457", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "4458", + "Name": "delete", + "ResourceName": "BrokerListenerResource", + "Doc": "Delete a BrokerListenerResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4459", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "4460", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "4461", + "Type": { + "$id": "4462", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4463", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "4464", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4465", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4466", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "4467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4468", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "4469", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4470", + "Name": "brokerName", + "NameInRequest": "brokerName", + "Doc": "Name of broker.", + "Type": { + "$id": "4471", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4472", + "Name": "listenerName", + "NameInRequest": "listenerName", + "Doc": "Name of Instance broker listener resource", + "Type": { + "$id": "4473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4474", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4475", + "kind": "constant", + "valueType": { + "$id": "4476", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4477", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "4478", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "4479", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "4480", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "4481", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "4482", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/listeners/{listenerName}", + "BufferResponse": true, + "LongRunning": { + "$id": "4483", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "4484", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener.delete", + "Decorators": [], + "Examples": [ + { + "$id": "4485", + "kind": "http", + "name": "BrokerListener_Delete", + "description": "BrokerListener_Delete", + "filePath": "2025-04-01/BrokerListener_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "4486", + "parameter": { + "$ref": "4459" + }, + "value": { + "$id": "4487", + "kind": "string", + "type": { + "$ref": "4460" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4488", + "parameter": { + "$ref": "4463" + }, + "value": { + "$id": "4489", + "kind": "string", + "type": { + "$ref": "4464" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4490", + "parameter": { + "$ref": "4466" + }, + "value": { + "$id": "4491", + "kind": "string", + "type": { + "$ref": "4467" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4492", + "parameter": { + "$ref": "4468" + }, + "value": { + "$id": "4493", + "kind": "string", + "type": { + "$ref": "4469" + }, + "value": "resource-name123" + } + }, + { + "$id": "4494", + "parameter": { + "$ref": "4470" + }, + "value": { + "$id": "4495", + "kind": "string", + "type": { + "$ref": "4471" + }, + "value": "resource-name123" + } + }, + { + "$id": "4496", + "parameter": { + "$ref": "4472" + }, + "value": { + "$id": "4497", + "kind": "string", + "type": { + "$ref": "4473" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "4498", + "response": { + "$ref": "4477" + }, + "statusCode": 202 + }, + { + "$id": "4499", + "response": { + "$ref": "4482" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "4500", + "Name": "listByResourceGroup", + "ResourceName": "BrokerListenerResource", + "Doc": "List BrokerListenerResource resources by BrokerResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4501", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "4502", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "4503", + "Type": { + "$id": "4504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4505", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "4506", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4507", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4508", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "4509", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4510", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "4511", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4512", + "Name": "brokerName", + "NameInRequest": "brokerName", + "Doc": "Name of broker.", + "Type": { + "$id": "4513", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4514", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4515", + "kind": "constant", + "valueType": { + "$id": "4516", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4517", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1247" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/listeners", + "BufferResponse": true, + "Paging": { + "$id": "4518", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "4519", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "4520", + "kind": "http", + "name": "BrokerListener_ListByResourceGroup", + "description": "BrokerListener_ListByResourceGroup", + "filePath": "2025-04-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "4521", + "parameter": { + "$ref": "4501" + }, + "value": { + "$id": "4522", + "kind": "string", + "type": { + "$ref": "4502" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4523", + "parameter": { + "$ref": "4505" + }, + "value": { + "$id": "4524", + "kind": "string", + "type": { + "$ref": "4506" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4525", + "parameter": { + "$ref": "4508" + }, + "value": { + "$id": "4526", + "kind": "string", + "type": { + "$ref": "4509" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4527", + "parameter": { + "$ref": "4510" + }, + "value": { + "$id": "4528", + "kind": "string", + "type": { + "$ref": "4511" + }, + "value": "resource-name123" + } + }, + { + "$id": "4529", + "parameter": { + "$ref": "4512" + }, + "value": { + "$id": "4530", + "kind": "string", + "type": { + "$ref": "4513" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "4531", + "response": { + "$ref": "4517" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4532", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "4533", + "value": { + "$id": "4534", + "kind": "array", + "type": { + "$ref": "1249" + }, + "value": [ + { + "$id": "4535", + "kind": "model", + "type": { + "$ref": "1140" + }, + "value": { + "$id": "4536", + "properties": { + "$id": "4537", + "kind": "model", + "type": { + "$ref": "1142" + }, + "value": { + "$id": "4538", + "serviceName": { + "$id": "4539", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "tpfiszlapdpxktx" + }, + "ports": { + "$id": "4540", + "kind": "array", + "type": { + "$ref": "1148" + }, + "value": [ + { + "$id": "4541", + "kind": "model", + "type": { + "$ref": "1149" + }, + "value": { + "$id": "4542", + "authenticationRef": { + "$id": "4543", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "tjvdroaqqy" + }, + "authorizationRef": { + "$id": "4544", + "kind": "string", + "type": { + "$ref": "1155" + }, + "value": "inxhvxnwswyrvt" + }, + "nodePort": { + "$id": "4545", + "kind": "number", + "type": { + "$ref": "1159" + }, + "value": 7281 + }, + "port": { + "$id": "4546", + "kind": "number", + "type": { + "$ref": "1163" + }, + "value": 1268 + }, + "protocol": { + "$id": "4547", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Mqtt" + }, + "tls": { + "$id": "4548", + "kind": "model", + "type": { + "$ref": "1170" + }, + "value": { + "$id": "4549", + "mode": { + "$id": "4550", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4551", + "kind": "model", + "type": { + "$ref": "1175" + }, + "value": { + "$id": "4552", + "duration": { + "$id": "4553", + "kind": "string", + "type": { + "$ref": "1177" + }, + "value": "qmpeffoksron" + }, + "secretName": { + "$id": "4554", + "kind": "string", + "type": { + "$ref": "1181" + }, + "value": "oagi" + }, + "renewBefore": { + "$id": "4555", + "kind": "string", + "type": { + "$ref": "1185" + }, + "value": "hutno" + }, + "issuerRef": { + "$id": "4556", + "kind": "model", + "type": { + "$ref": "1189" + }, + "value": { + "$id": "4557", + "group": { + "$id": "4558", + "kind": "string", + "type": { + "$ref": "1191" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "kind": { + "$id": "4559", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "Issuer" + }, + "name": { + "$id": "4560", + "kind": "string", + "type": { + "$ref": "1198" + }, + "value": "ocwoqpgucvjrsuudtjhb" + } + } + }, + "privateKey": { + "$id": "4561", + "kind": "model", + "type": { + "$ref": "1204" + }, + "value": { + "$id": "4562", + "algorithm": { + "$id": "4563", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "4564", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "Always" + } + } + }, + "san": { + "$id": "4565", + "kind": "model", + "type": { + "$ref": "1214" + }, + "value": { + "$id": "4566", + "dns": { + "$id": "4567", + "kind": "array", + "type": { + "$ref": "1216" + }, + "value": [ + { + "$id": "4568", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "xhvmhrrhgfsapocjeebqtnzarlj" + } + ] + }, + "ip": { + "$id": "4569", + "kind": "array", + "type": { + "$ref": "1221" + }, + "value": [ + { + "$id": "4570", + "kind": "string", + "type": { + "$ref": "1222" + }, + "value": "zbgugfzcgsmegevzktsnibyuyp" + } + ] + } + } + } + } + }, + "manual": { + "$id": "4571", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4572", + "secretRef": { + "$id": "4573", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "secret-name" + } + } + } + } + } + } + } + ] + }, + "serviceType": { + "$id": "4574", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "ClusterIp" + }, + "provisioningState": { + "$id": "4575", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4576", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4577", + "name": { + "$id": "4578", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4579", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4580", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "4581", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4582", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4583", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "4584", + "createdBy": { + "$id": "4585", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4586", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "4587", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4588", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4589", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4590", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "4591", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "4592" + }, + "Parent": "IoTOperationsClient", + "Parameters": [ + { + "$id": "4593", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "4594", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "4595", + "Type": { + "$id": "4596", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener" + }, + { + "$id": "4597", + "Name": "BrokerAuthentication", + "Namespace": "Microsoft.IoTOperations", + "Operations": [ + { + "$id": "4598", + "Name": "get", + "ResourceName": "BrokerAuthenticationResource", + "Doc": "Get a BrokerAuthenticationResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4599", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "4600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "4601", + "Type": { + "$id": "4602", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4603", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "4604", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4606", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "4607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4608", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "4609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4610", + "Name": "brokerName", + "NameInRequest": "brokerName", + "Doc": "Name of broker.", + "Type": { + "$id": "4611", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4612", + "Name": "authenticationName", + "NameInRequest": "authenticationName", + "Doc": "Name of Instance broker authentication resource", + "Type": { + "$id": "4613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4614", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4615", + "kind": "constant", + "valueType": { + "$id": "4616", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4617", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1048" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications/{authenticationName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication.get", + "Decorators": [], + "Examples": [ + { + "$id": "4618", + "kind": "http", + "name": "BrokerAuthentication_Get", + "description": "BrokerAuthentication_Get", + "filePath": "2025-04-01/BrokerAuthentication_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "4619", + "parameter": { + "$ref": "4599" + }, + "value": { + "$id": "4620", + "kind": "string", + "type": { + "$ref": "4600" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4621", + "parameter": { + "$ref": "4603" + }, + "value": { + "$id": "4622", + "kind": "string", + "type": { + "$ref": "4604" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4623", + "parameter": { + "$ref": "4606" + }, + "value": { + "$id": "4624", + "kind": "string", + "type": { + "$ref": "4607" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4625", + "parameter": { + "$ref": "4608" + }, + "value": { + "$id": "4626", + "kind": "string", + "type": { + "$ref": "4609" + }, + "value": "resource-name123" + } + }, + { + "$id": "4627", + "parameter": { + "$ref": "4610" + }, + "value": { + "$id": "4628", + "kind": "string", + "type": { + "$ref": "4611" + }, + "value": "resource-name123" + } + }, + { + "$id": "4629", + "parameter": { + "$ref": "4612" + }, + "value": { + "$id": "4630", + "kind": "string", + "type": { + "$ref": "4613" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "4631", + "response": { + "$ref": "4617" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4632", + "kind": "model", + "type": { + "$ref": "1048" + }, + "value": { + "$id": "4633", + "properties": { + "$id": "4634", + "kind": "model", + "type": { + "$ref": "1050" + }, + "value": { + "$id": "4635", + "authenticationMethods": { + "$id": "4636", + "kind": "array", + "type": { + "$ref": "1052" + }, + "value": [ + { + "$id": "4637", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "4638", + "method": { + "$id": "4639", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Custom" + }, + "customSettings": { + "$id": "4640", + "kind": "model", + "type": { + "$ref": "1058" + }, + "value": { + "$id": "4641", + "auth": { + "$id": "4642", + "kind": "model", + "type": { + "$ref": "1060" + }, + "value": { + "$id": "4643", + "x509": { + "$id": "4644", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4645", + "secretRef": { + "$id": "4646", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "secret-name" + } + } + } + } + }, + "caCertConfigMap": { + "$id": "4647", + "kind": "string", + "type": { + "$ref": "1072" + }, + "value": "pdecudefqyolvncbus" + }, + "endpoint": { + "$id": "4648", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "https://www.example.com" + }, + "headers": { + "$id": "4649", + "kind": "dict", + "type": { + "$ref": "1080" + }, + "value": { + "$id": "4650", + "key8518": { + "$id": "4651", + "kind": "string", + "type": { + "$ref": "1082" + }, + "value": "bwityjy" + } + } + } + } + }, + "serviceAccountTokenSettings": { + "$id": "4652", + "kind": "model", + "type": { + "$ref": "1088" + }, + "value": { + "$id": "4653", + "audiences": { + "$id": "4654", + "kind": "array", + "type": { + "$ref": "1090" + }, + "value": [ + { + "$id": "4655", + "kind": "string", + "type": { + "$ref": "1091" + }, + "value": "jqyhyqatuydg" + } + ] + } + } + }, + "x509Settings": { + "$id": "4656", + "kind": "model", + "type": { + "$ref": "1097" + }, + "value": { + "$id": "4657", + "authorizationAttributes": { + "$id": "4658", + "kind": "dict", + "type": { + "$ref": "1099" + }, + "value": { + "$id": "4659", + "key3384": { + "$id": "4660", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "4661", + "attributes": { + "$id": "4662", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "4663", + "key186": { + "$id": "4664", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "ucpajramsz" + } + } + }, + "subject": { + "$id": "4665", + "kind": "string", + "type": { + "$ref": "1109" + }, + "value": "jpgwctfeixitptfgfnqhua" + } + } + } + } + }, + "trustedClientCaCert": { + "$id": "4666", + "kind": "string", + "type": { + "$ref": "1115" + }, + "value": "vlctsqddl" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4667", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4668", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4669", + "name": { + "$id": "4670", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4671", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4672", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123" + }, + "name": { + "$id": "4673", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "4674", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "4675", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "4676", + "createdBy": { + "$id": "4677", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4678", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "4679", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4680", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4681", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4682", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "4683", + "Name": "createOrUpdate", + "ResourceName": "BrokerAuthenticationResource", + "Doc": "Create a BrokerAuthenticationResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "4684", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "4685", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "4686", + "Type": { + "$id": "4687", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4688", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "4689", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4690", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4691", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "4692", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4693", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "4694", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4695", + "Name": "brokerName", + "NameInRequest": "brokerName", + "Doc": "Name of broker.", + "Type": { + "$id": "4696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4697", + "Name": "authenticationName", + "NameInRequest": "authenticationName", + "Doc": "Name of Instance broker authentication resource", + "Type": { + "$id": "4698", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4699", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "4700", + "kind": "constant", + "valueType": { + "$id": "4701", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4702", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "4703", + "kind": "constant", + "valueType": { + "$id": "4704", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "4705", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "1048" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "4706", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1048" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "4707", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "1048" + }, + "Headers": [ + { + "$id": "4708", + "Name": "azureAsyncOperation", + "NameInResponse": "Azure-AsyncOperation", + "Doc": "A link to the status monitor", + "Type": { + "$id": "4709", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "4710", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "4711", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications/{authenticationName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "4712", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "4713", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1048" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication.createOrUpdate", + "Decorators": [], + "Examples": [ + { + "$id": "4714", + "kind": "http", + "name": "BrokerAuthentication_CreateOrUpdate_Complex", + "description": "BrokerAuthentication_CreateOrUpdate_Complex", + "filePath": "2025-04-01/BrokerAuthentication_CreateOrUpdate_Complex.json", + "parameters": [ + { + "$id": "4715", + "parameter": { + "$ref": "4684" + }, + "value": { + "$id": "4716", + "kind": "string", + "type": { + "$ref": "4685" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4717", + "parameter": { + "$ref": "4688" + }, + "value": { + "$id": "4718", + "kind": "string", + "type": { + "$ref": "4689" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4719", + "parameter": { + "$ref": "4691" + }, + "value": { + "$id": "4720", + "kind": "string", + "type": { + "$ref": "4692" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4721", + "parameter": { + "$ref": "4693" + }, + "value": { + "$id": "4722", + "kind": "string", + "type": { + "$ref": "4694" + }, + "value": "resource-name123" + } + }, + { + "$id": "4723", + "parameter": { + "$ref": "4695" + }, + "value": { + "$id": "4724", + "kind": "string", + "type": { + "$ref": "4696" + }, + "value": "resource-name123" + } + }, + { + "$id": "4725", + "parameter": { + "$ref": "4697" + }, + "value": { + "$id": "4726", + "kind": "string", + "type": { + "$ref": "4698" + }, + "value": "resource-name123" + } + }, + { + "$id": "4727", + "parameter": { + "$ref": "4705" + }, + "value": { + "$id": "4728", + "kind": "model", + "type": { + "$ref": "1048" + }, + "value": { + "$id": "4729", + "properties": { + "$id": "4730", + "kind": "model", + "type": { + "$ref": "1050" + }, + "value": { + "$id": "4731", + "authenticationMethods": { + "$id": "4732", + "kind": "array", + "type": { + "$ref": "1052" + }, + "value": [ + { + "$id": "4733", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "4734", + "method": { + "$id": "4735", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "ServiceAccountToken" + }, + "serviceAccountTokenSettings": { + "$id": "4736", + "kind": "model", + "type": { + "$ref": "1088" + }, + "value": { + "$id": "4737", + "audiences": { + "$id": "4738", + "kind": "array", + "type": { + "$ref": "1090" + }, + "value": [ + { + "$id": "4739", + "kind": "string", + "type": { + "$ref": "1091" + }, + "value": "aio-internal" + } + ] + } + } + } + } + }, + { + "$id": "4740", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "4741", + "method": { + "$id": "4742", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "X509" + }, + "x509Settings": { + "$id": "4743", + "kind": "model", + "type": { + "$ref": "1097" + }, + "value": { + "$id": "4744", + "trustedClientCaCert": { + "$id": "4745", + "kind": "string", + "type": { + "$ref": "1115" + }, + "value": "my-ca" + }, + "authorizationAttributes": { + "$id": "4746", + "kind": "dict", + "type": { + "$ref": "1099" + }, + "value": { + "$id": "4747", + "root": { + "$id": "4748", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "4749", + "subject": { + "$id": "4750", + "kind": "string", + "type": { + "$ref": "1109" + }, + "value": "CN = Contoso Root CA Cert, OU = Engineering, C = US" + }, + "attributes": { + "$id": "4751", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "4752", + "organization": { + "$id": "4753", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "contoso" + } + } + } + } + }, + "intermediate": { + "$id": "4754", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "4755", + "subject": { + "$id": "4756", + "kind": "string", + "type": { + "$ref": "1109" + }, + "value": "CN = Contoso Intermediate CA" + }, + "attributes": { + "$id": "4757", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "4758", + "city": { + "$id": "4759", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "seattle" + }, + "foo": { + "$id": "4760", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "bar" + } + } + } + } + }, + "smart-fan": { + "$id": "4761", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "4762", + "subject": { + "$id": "4763", + "kind": "string", + "type": { + "$ref": "1109" + }, + "value": "CN = smart-fan" + }, + "attributes": { + "$id": "4764", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "4765", + "building": { + "$id": "4766", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "17" + } + } + } + } + } + } + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "4767", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4768", + "name": { + "$id": "4769", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4770", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "4771", + "response": { + "$ref": "4706" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4772", + "kind": "model", + "type": { + "$ref": "1048" + }, + "value": { + "$id": "4773", + "properties": { + "$id": "4774", + "kind": "model", + "type": { + "$ref": "1050" + }, + "value": { + "$id": "4775", + "authenticationMethods": { + "$id": "4776", + "kind": "array", + "type": { + "$ref": "1052" + }, + "value": [ + { + "$id": "4777", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "4778", + "method": { + "$id": "4779", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "ServiceAccountToken" + }, + "serviceAccountTokenSettings": { + "$id": "4780", + "kind": "model", + "type": { + "$ref": "1088" + }, + "value": { + "$id": "4781", + "audiences": { + "$id": "4782", + "kind": "array", + "type": { + "$ref": "1090" + }, + "value": [ + { + "$id": "4783", + "kind": "string", + "type": { + "$ref": "1091" + }, + "value": "aio-internal" + } + ] + } + } + } + } + }, + { + "$id": "4784", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "4785", + "method": { + "$id": "4786", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "X509" + }, + "x509Settings": { + "$id": "4787", + "kind": "model", + "type": { + "$ref": "1097" + }, + "value": { + "$id": "4788", + "trustedClientCaCert": { + "$id": "4789", + "kind": "string", + "type": { + "$ref": "1115" + }, + "value": "my-ca" + }, + "authorizationAttributes": { + "$id": "4790", + "kind": "dict", + "type": { + "$ref": "1099" + }, + "value": { + "$id": "4791", + "root": { + "$id": "4792", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "4793", + "subject": { + "$id": "4794", + "kind": "string", + "type": { + "$ref": "1109" + }, + "value": "CN = Contoso Root CA Cert, OU = Engineering, C = US" + }, + "attributes": { + "$id": "4795", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "4796", + "organization": { + "$id": "4797", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "contoso" + } + } + } + } + }, + "intermediate": { + "$id": "4798", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "4799", + "subject": { + "$id": "4800", + "kind": "string", + "type": { + "$ref": "1109" + }, + "value": "CN = Contoso Intermediate CA" + }, + "attributes": { + "$id": "4801", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "4802", + "city": { + "$id": "4803", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "seattle" + }, + "foo": { + "$id": "4804", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "bar" + } + } + } + } + }, + "smart-fan": { + "$id": "4805", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "4806", + "subject": { + "$id": "4807", + "kind": "string", + "type": { + "$ref": "1109" + }, + "value": "CN = smart-fan" + }, + "attributes": { + "$id": "4808", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "4809", + "building": { + "$id": "4810", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "17" + } + } + } + } + } + } + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4811", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4812", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4813", + "name": { + "$id": "4814", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4815", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4816", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123" + }, + "name": { + "$id": "4817", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "4818", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "4819", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "4820", + "createdBy": { + "$id": "4821", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4822", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "4823", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4824", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4825", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4826", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "4827", + "response": { + "$ref": "4707" + }, + "statusCode": 201, + "bodyValue": { + "$id": "4828", + "kind": "model", + "type": { + "$ref": "1048" + }, + "value": { + "$id": "4829", + "properties": { + "$id": "4830", + "kind": "model", + "type": { + "$ref": "1050" + }, + "value": { + "$id": "4831", + "authenticationMethods": { + "$id": "4832", + "kind": "array", + "type": { + "$ref": "1052" + }, + "value": [ + { + "$id": "4833", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "4834", + "method": { + "$id": "4835", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "ServiceAccountToken" + }, + "serviceAccountTokenSettings": { + "$id": "4836", + "kind": "model", + "type": { + "$ref": "1088" + }, + "value": { + "$id": "4837", + "audiences": { + "$id": "4838", + "kind": "array", + "type": { + "$ref": "1090" + }, + "value": [ + { + "$id": "4839", + "kind": "string", + "type": { + "$ref": "1091" + }, + "value": "aio-internal" + } + ] + } + } + } + } + }, + { + "$id": "4840", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "4841", + "method": { + "$id": "4842", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "X509" + }, + "x509Settings": { + "$id": "4843", + "kind": "model", + "type": { + "$ref": "1097" + }, + "value": { + "$id": "4844", + "trustedClientCaCert": { + "$id": "4845", + "kind": "string", + "type": { + "$ref": "1115" + }, + "value": "my-ca" + }, + "authorizationAttributes": { + "$id": "4846", + "kind": "dict", + "type": { + "$ref": "1099" + }, + "value": { + "$id": "4847", + "root": { + "$id": "4848", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "4849", + "subject": { + "$id": "4850", + "kind": "string", + "type": { + "$ref": "1109" + }, + "value": "CN = Contoso Root CA Cert, OU = Engineering, C = US" + }, + "attributes": { + "$id": "4851", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "4852", + "organization": { + "$id": "4853", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "contoso" + } + } + } + } + }, + "intermediate": { + "$id": "4854", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "4855", + "subject": { + "$id": "4856", + "kind": "string", + "type": { + "$ref": "1109" + }, + "value": "CN = Contoso Intermediate CA" + }, + "attributes": { + "$id": "4857", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "4858", + "city": { + "$id": "4859", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "seattle" + }, + "foo": { + "$id": "4860", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "bar" + } + } + } + } + }, + "smart-fan": { + "$id": "4861", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "4862", + "subject": { + "$id": "4863", + "kind": "string", + "type": { + "$ref": "1109" + }, + "value": "CN = smart-fan" + }, + "attributes": { + "$id": "4864", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "4865", + "building": { + "$id": "4866", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "17" + } + } + } + } + } + } + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4867", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4868", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4869", + "name": { + "$id": "4870", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4871", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4872", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123" + }, + "name": { + "$id": "4873", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "4874", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "4875", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "4876", + "createdBy": { + "$id": "4877", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4878", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "4879", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4880", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4881", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4882", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "4883", + "kind": "http", + "name": "BrokerAuthentication_CreateOrUpdate", + "description": "BrokerAuthentication_CreateOrUpdate", + "filePath": "2025-04-01/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "4884", + "parameter": { + "$ref": "4684" + }, + "value": { + "$id": "4885", + "kind": "string", + "type": { + "$ref": "4685" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4886", + "parameter": { + "$ref": "4688" + }, + "value": { + "$id": "4887", + "kind": "string", + "type": { + "$ref": "4689" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4888", + "parameter": { + "$ref": "4691" + }, + "value": { + "$id": "4889", + "kind": "string", + "type": { + "$ref": "4692" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4890", + "parameter": { + "$ref": "4693" + }, + "value": { + "$id": "4891", + "kind": "string", + "type": { + "$ref": "4694" + }, + "value": "resource-name123" + } + }, + { + "$id": "4892", + "parameter": { + "$ref": "4695" + }, + "value": { + "$id": "4893", + "kind": "string", + "type": { + "$ref": "4696" + }, + "value": "resource-name123" + } + }, + { + "$id": "4894", + "parameter": { + "$ref": "4697" + }, + "value": { + "$id": "4895", + "kind": "string", + "type": { + "$ref": "4698" + }, + "value": "resource-name123" + } + }, + { + "$id": "4896", + "parameter": { + "$ref": "4705" + }, + "value": { + "$id": "4897", + "kind": "model", + "type": { + "$ref": "1048" + }, + "value": { + "$id": "4898", + "properties": { + "$id": "4899", + "kind": "model", + "type": { + "$ref": "1050" + }, + "value": { + "$id": "4900", + "authenticationMethods": { + "$id": "4901", + "kind": "array", + "type": { + "$ref": "1052" + }, + "value": [ + { + "$id": "4902", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "4903", + "method": { + "$id": "4904", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Custom" + }, + "customSettings": { + "$id": "4905", + "kind": "model", + "type": { + "$ref": "1058" + }, + "value": { + "$id": "4906", + "auth": { + "$id": "4907", + "kind": "model", + "type": { + "$ref": "1060" + }, + "value": { + "$id": "4908", + "x509": { + "$id": "4909", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4910", + "secretRef": { + "$id": "4911", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "secret-name" + } + } + } + } + }, + "caCertConfigMap": { + "$id": "4912", + "kind": "string", + "type": { + "$ref": "1072" + }, + "value": "pdecudefqyolvncbus" + }, + "endpoint": { + "$id": "4913", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "https://www.example.com" + }, + "headers": { + "$id": "4914", + "kind": "dict", + "type": { + "$ref": "1080" + }, + "value": { + "$id": "4915", + "key8518": { + "$id": "4916", + "kind": "string", + "type": { + "$ref": "1082" + }, + "value": "bwityjy" + } + } + } + } + }, + "serviceAccountTokenSettings": { + "$id": "4917", + "kind": "model", + "type": { + "$ref": "1088" + }, + "value": { + "$id": "4918", + "audiences": { + "$id": "4919", + "kind": "array", + "type": { + "$ref": "1090" + }, + "value": [ + { + "$id": "4920", + "kind": "string", + "type": { + "$ref": "1091" + }, + "value": "jqyhyqatuydg" + } + ] + } + } + }, + "x509Settings": { + "$id": "4921", + "kind": "model", + "type": { + "$ref": "1097" + }, + "value": { + "$id": "4922", + "authorizationAttributes": { + "$id": "4923", + "kind": "dict", + "type": { + "$ref": "1099" + }, + "value": { + "$id": "4924", + "key3384": { + "$id": "4925", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "4926", + "attributes": { + "$id": "4927", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "4928", + "key186": { + "$id": "4929", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "ucpajramsz" + } + } + }, + "subject": { + "$id": "4930", + "kind": "string", + "type": { + "$ref": "1109" + }, + "value": "jpgwctfeixitptfgfnqhua" + } + } + } + } + }, + "trustedClientCaCert": { + "$id": "4931", + "kind": "string", + "type": { + "$ref": "1115" + }, + "value": "vlctsqddl" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "4932", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4933", + "name": { + "$id": "4934", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4935", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "4936", + "response": { + "$ref": "4706" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4937", + "kind": "model", + "type": { + "$ref": "1048" + }, + "value": { + "$id": "4938", + "properties": { + "$id": "4939", + "kind": "model", + "type": { + "$ref": "1050" + }, + "value": { + "$id": "4940", + "authenticationMethods": { + "$id": "4941", + "kind": "array", + "type": { + "$ref": "1052" + }, + "value": [ + { + "$id": "4942", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "4943", + "method": { + "$id": "4944", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Custom" + }, + "customSettings": { + "$id": "4945", + "kind": "model", + "type": { + "$ref": "1058" + }, + "value": { + "$id": "4946", + "auth": { + "$id": "4947", + "kind": "model", + "type": { + "$ref": "1060" + }, + "value": { + "$id": "4948", + "x509": { + "$id": "4949", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4950", + "secretRef": { + "$id": "4951", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "secret-name" + } + } + } + } + }, + "caCertConfigMap": { + "$id": "4952", + "kind": "string", + "type": { + "$ref": "1072" + }, + "value": "pdecudefqyolvncbus" + }, + "endpoint": { + "$id": "4953", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "https://www.example.com" + }, + "headers": { + "$id": "4954", + "kind": "dict", + "type": { + "$ref": "1080" + }, + "value": { + "$id": "4955", + "key8518": { + "$id": "4956", + "kind": "string", + "type": { + "$ref": "1082" + }, + "value": "bwityjy" + } + } + } + } + }, + "serviceAccountTokenSettings": { + "$id": "4957", + "kind": "model", + "type": { + "$ref": "1088" + }, + "value": { + "$id": "4958", + "audiences": { + "$id": "4959", + "kind": "array", + "type": { + "$ref": "1090" + }, + "value": [ + { + "$id": "4960", + "kind": "string", + "type": { + "$ref": "1091" + }, + "value": "jqyhyqatuydg" + } + ] + } + } + }, + "x509Settings": { + "$id": "4961", + "kind": "model", + "type": { + "$ref": "1097" + }, + "value": { + "$id": "4962", + "authorizationAttributes": { + "$id": "4963", + "kind": "dict", + "type": { + "$ref": "1099" + }, + "value": { + "$id": "4964", + "key3384": { + "$id": "4965", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "4966", + "attributes": { + "$id": "4967", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "4968", + "key186": { + "$id": "4969", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "ucpajramsz" + } + } + }, + "subject": { + "$id": "4970", + "kind": "string", + "type": { + "$ref": "1109" + }, + "value": "jpgwctfeixitptfgfnqhua" + } + } + } + } + }, + "trustedClientCaCert": { + "$id": "4971", + "kind": "string", + "type": { + "$ref": "1115" + }, + "value": "vlctsqddl" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4972", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4973", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4974", + "name": { + "$id": "4975", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4976", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4977", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123" + }, + "name": { + "$id": "4978", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "4979", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "4980", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "4981", + "createdBy": { + "$id": "4982", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4983", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "4984", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4985", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4986", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4987", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "4988", + "response": { + "$ref": "4707" + }, + "statusCode": 201, + "bodyValue": { + "$id": "4989", + "kind": "model", + "type": { + "$ref": "1048" + }, + "value": { + "$id": "4990", + "properties": { + "$id": "4991", + "kind": "model", + "type": { + "$ref": "1050" + }, + "value": { + "$id": "4992", + "authenticationMethods": { + "$id": "4993", + "kind": "array", + "type": { + "$ref": "1052" + }, + "value": [ + { + "$id": "4994", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "4995", + "method": { + "$id": "4996", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Custom" + }, + "customSettings": { + "$id": "4997", + "kind": "model", + "type": { + "$ref": "1058" + }, + "value": { + "$id": "4998", + "auth": { + "$id": "4999", + "kind": "model", + "type": { + "$ref": "1060" + }, + "value": { + "$id": "5000", + "x509": { + "$id": "5001", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "5002", + "secretRef": { + "$id": "5003", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "secret-name" + } + } + } + } + }, + "caCertConfigMap": { + "$id": "5004", + "kind": "string", + "type": { + "$ref": "1072" + }, + "value": "pdecudefqyolvncbus" + }, + "endpoint": { + "$id": "5005", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "https://www.example.com" + }, + "headers": { + "$id": "5006", + "kind": "dict", + "type": { + "$ref": "1080" + }, + "value": { + "$id": "5007", + "key8518": { + "$id": "5008", + "kind": "string", + "type": { + "$ref": "1082" + }, + "value": "bwityjy" + } + } + } + } + }, + "serviceAccountTokenSettings": { + "$id": "5009", + "kind": "model", + "type": { + "$ref": "1088" + }, + "value": { + "$id": "5010", + "audiences": { + "$id": "5011", + "kind": "array", + "type": { + "$ref": "1090" + }, + "value": [ + { + "$id": "5012", + "kind": "string", + "type": { + "$ref": "1091" + }, + "value": "jqyhyqatuydg" + } + ] + } + } + }, + "x509Settings": { + "$id": "5013", + "kind": "model", + "type": { + "$ref": "1097" + }, + "value": { + "$id": "5014", + "authorizationAttributes": { + "$id": "5015", + "kind": "dict", + "type": { + "$ref": "1099" + }, + "value": { + "$id": "5016", + "key3384": { + "$id": "5017", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "5018", + "attributes": { + "$id": "5019", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "5020", + "key186": { + "$id": "5021", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "ucpajramsz" + } + } + }, + "subject": { + "$id": "5022", + "kind": "string", + "type": { + "$ref": "1109" + }, + "value": "jpgwctfeixitptfgfnqhua" + } + } + } + } + }, + "trustedClientCaCert": { + "$id": "5023", + "kind": "string", + "type": { + "$ref": "1115" + }, + "value": "vlctsqddl" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "5024", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5025", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "5026", + "name": { + "$id": "5027", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5028", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5029", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123" + }, + "name": { + "$id": "5030", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "5031", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "5032", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "5033", + "createdBy": { + "$id": "5034", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5035", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "5036", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5037", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5038", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5039", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "5040", + "Name": "delete", + "ResourceName": "BrokerAuthenticationResource", + "Doc": "Delete a BrokerAuthenticationResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "5041", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "5042", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "5043", + "Type": { + "$id": "5044", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5045", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "5046", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5047", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5048", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "5049", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5050", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "5051", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5052", + "Name": "brokerName", + "NameInRequest": "brokerName", + "Doc": "Name of broker.", + "Type": { + "$id": "5053", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5054", + "Name": "authenticationName", + "NameInRequest": "authenticationName", + "Doc": "Name of Instance broker authentication resource", + "Type": { + "$id": "5055", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5056", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5057", + "kind": "constant", + "valueType": { + "$id": "5058", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5059", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "5060", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "5061", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "5062", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "5063", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "5064", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications/{authenticationName}", + "BufferResponse": true, + "LongRunning": { + "$id": "5065", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "5066", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication.delete", + "Decorators": [], + "Examples": [ + { + "$id": "5067", + "kind": "http", + "name": "BrokerAuthentication_Delete", + "description": "BrokerAuthentication_Delete", + "filePath": "2025-04-01/BrokerAuthentication_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5068", + "parameter": { + "$ref": "5041" + }, + "value": { + "$id": "5069", + "kind": "string", + "type": { + "$ref": "5042" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5070", + "parameter": { + "$ref": "5045" + }, + "value": { + "$id": "5071", + "kind": "string", + "type": { + "$ref": "5046" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5072", + "parameter": { + "$ref": "5048" + }, + "value": { + "$id": "5073", + "kind": "string", + "type": { + "$ref": "5049" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5074", + "parameter": { + "$ref": "5050" + }, + "value": { + "$id": "5075", + "kind": "string", + "type": { + "$ref": "5051" + }, + "value": "resource-name123" + } + }, + { + "$id": "5076", + "parameter": { + "$ref": "5052" + }, + "value": { + "$id": "5077", + "kind": "string", + "type": { + "$ref": "5053" + }, + "value": "resource-name123" + } + }, + { + "$id": "5078", + "parameter": { + "$ref": "5054" + }, + "value": { + "$id": "5079", + "kind": "string", + "type": { + "$ref": "5055" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "5080", + "response": { + "$ref": "5059" + }, + "statusCode": 202 + }, + { + "$id": "5081", + "response": { + "$ref": "5064" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "5082", + "Name": "listByResourceGroup", + "ResourceName": "BrokerAuthenticationResource", + "Doc": "List BrokerAuthenticationResource resources by BrokerResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "5083", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "5084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "5085", + "Type": { + "$id": "5086", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5087", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "5088", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5089", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5090", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "5091", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5092", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "5093", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5094", + "Name": "brokerName", + "NameInRequest": "brokerName", + "Doc": "Name of broker.", + "Type": { + "$id": "5095", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5096", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5097", + "kind": "constant", + "valueType": { + "$id": "5098", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5099", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1130" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications", + "BufferResponse": true, + "Paging": { + "$id": "5100", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "5101", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "5102", + "kind": "http", + "name": "BrokerAuthentication_ListByResourceGroup", + "description": "BrokerAuthentication_ListByResourceGroup", + "filePath": "2025-04-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5103", + "parameter": { + "$ref": "5083" + }, + "value": { + "$id": "5104", + "kind": "string", + "type": { + "$ref": "5084" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5105", + "parameter": { + "$ref": "5087" + }, + "value": { + "$id": "5106", + "kind": "string", + "type": { + "$ref": "5088" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5107", + "parameter": { + "$ref": "5090" + }, + "value": { + "$id": "5108", + "kind": "string", + "type": { + "$ref": "5091" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5109", + "parameter": { + "$ref": "5092" + }, + "value": { + "$id": "5110", + "kind": "string", + "type": { + "$ref": "5093" + }, + "value": "resource-name123" + } + }, + { + "$id": "5111", + "parameter": { + "$ref": "5094" + }, + "value": { + "$id": "5112", + "kind": "string", + "type": { + "$ref": "5095" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "5113", + "response": { + "$ref": "5099" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5114", + "kind": "model", + "type": { + "$ref": "1130" + }, + "value": { + "$id": "5115", + "value": { + "$id": "5116", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "5117", + "kind": "model", + "type": { + "$ref": "1048" + }, + "value": { + "$id": "5118", + "properties": { + "$id": "5119", + "kind": "model", + "type": { + "$ref": "1050" + }, + "value": { + "$id": "5120", + "authenticationMethods": { + "$id": "5121", + "kind": "array", + "type": { + "$ref": "1052" + }, + "value": [ + { + "$id": "5122", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "5123", + "method": { + "$id": "5124", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Custom" + }, + "customSettings": { + "$id": "5125", + "kind": "model", + "type": { + "$ref": "1058" + }, + "value": { + "$id": "5126", + "auth": { + "$id": "5127", + "kind": "model", + "type": { + "$ref": "1060" + }, + "value": { + "$id": "5128", + "x509": { + "$id": "5129", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "5130", + "secretRef": { + "$id": "5131", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "secret-name" + } + } + } + } + }, + "caCertConfigMap": { + "$id": "5132", + "kind": "string", + "type": { + "$ref": "1072" + }, + "value": "pdecudefqyolvncbus" + }, + "endpoint": { + "$id": "5133", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "https://www.example.com" + }, + "headers": { + "$id": "5134", + "kind": "dict", + "type": { + "$ref": "1080" + }, + "value": { + "$id": "5135", + "key8518": { + "$id": "5136", + "kind": "string", + "type": { + "$ref": "1082" + }, + "value": "bwityjy" + } + } + } + } + }, + "serviceAccountTokenSettings": { + "$id": "5137", + "kind": "model", + "type": { + "$ref": "1088" + }, + "value": { + "$id": "5138", + "audiences": { + "$id": "5139", + "kind": "array", + "type": { + "$ref": "1090" + }, + "value": [ + { + "$id": "5140", + "kind": "string", + "type": { + "$ref": "1091" + }, + "value": "jqyhyqatuydg" + } + ] + } + } + }, + "x509Settings": { + "$id": "5141", + "kind": "model", + "type": { + "$ref": "1097" + }, + "value": { + "$id": "5142", + "authorizationAttributes": { + "$id": "5143", + "kind": "dict", + "type": { + "$ref": "1099" + }, + "value": { + "$id": "5144", + "key3384": { + "$id": "5145", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "5146", + "attributes": { + "$id": "5147", + "kind": "dict", + "type": { + "$ref": "1103" + }, + "value": { + "$id": "5148", + "key186": { + "$id": "5149", + "kind": "string", + "type": { + "$ref": "1105" + }, + "value": "ucpajramsz" + } + } + }, + "subject": { + "$id": "5150", + "kind": "string", + "type": { + "$ref": "1109" + }, + "value": "jpgwctfeixitptfgfnqhua" + } + } + } + } + }, + "trustedClientCaCert": { + "$id": "5151", + "kind": "string", + "type": { + "$ref": "1115" + }, + "value": "vlctsqddl" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "5152", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5153", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "5154", + "name": { + "$id": "5155", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5156", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5157", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123" + }, + "name": { + "$id": "5158", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "5159", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "5160", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "5161", + "createdBy": { + "$id": "5162", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5163", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "5164", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5165", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5166", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5167", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "5168", + "kind": "string", + "type": { + "$ref": "1136" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "5169" + }, + "Parent": "IoTOperationsClient", + "Parameters": [ + { + "$id": "5170", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "5171", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "5172", + "Type": { + "$id": "5173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication" + }, + { + "$id": "5174", + "Name": "BrokerAuthorization", + "Namespace": "Microsoft.IoTOperations", + "Operations": [ + { + "$id": "5175", + "Name": "get", + "ResourceName": "BrokerAuthorizationResource", + "Doc": "Get a BrokerAuthorizationResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "5176", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "5177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "5178", + "Type": { + "$id": "5179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5180", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "5181", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5183", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "5184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5185", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "5186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5187", + "Name": "brokerName", + "NameInRequest": "brokerName", + "Doc": "Name of broker.", + "Type": { + "$id": "5188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5189", + "Name": "authorizationName", + "NameInRequest": "authorizationName", + "Doc": "Name of Instance broker authorization resource", + "Type": { + "$id": "5190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5191", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5192", + "kind": "constant", + "valueType": { + "$id": "5193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5194", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "960" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authorizations/{authorizationName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.get", + "Decorators": [], + "Examples": [ + { + "$id": "5195", + "kind": "http", + "name": "BrokerAuthorization_Get", + "description": "BrokerAuthorization_Get", + "filePath": "2025-04-01/BrokerAuthorization_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5196", + "parameter": { + "$ref": "5176" + }, + "value": { + "$id": "5197", + "kind": "string", + "type": { + "$ref": "5177" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5198", + "parameter": { + "$ref": "5180" + }, + "value": { + "$id": "5199", + "kind": "string", + "type": { + "$ref": "5181" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5200", + "parameter": { + "$ref": "5183" + }, + "value": { + "$id": "5201", + "kind": "string", + "type": { + "$ref": "5184" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5202", + "parameter": { + "$ref": "5185" + }, + "value": { + "$id": "5203", + "kind": "string", + "type": { + "$ref": "5186" + }, + "value": "resource-name123" + } + }, + { + "$id": "5204", + "parameter": { + "$ref": "5187" + }, + "value": { + "$id": "5205", + "kind": "string", + "type": { + "$ref": "5188" + }, + "value": "resource-name123" + } + }, + { + "$id": "5206", + "parameter": { + "$ref": "5189" + }, + "value": { + "$id": "5207", + "kind": "string", + "type": { + "$ref": "5190" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "5208", + "response": { + "$ref": "5194" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5209", + "kind": "model", + "type": { + "$ref": "960" + }, + "value": { + "$id": "5210", + "properties": { + "$id": "5211", + "kind": "model", + "type": { + "$ref": "962" + }, + "value": { + "$id": "5212", + "authorizationPolicies": { + "$id": "5213", + "kind": "model", + "type": { + "$ref": "964" + }, + "value": { + "$id": "5214", + "cache": { + "$id": "5215", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5216", + "kind": "array", + "type": { + "$ref": "969" + }, + "value": [ + { + "$id": "5217", + "kind": "model", + "type": { + "$ref": "970" + }, + "value": { + "$id": "5218", + "brokerResources": { + "$id": "5219", + "kind": "array", + "type": { + "$ref": "972" + }, + "value": [ + { + "$id": "5220", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5221", + "method": { + "$id": "5222", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5223", + "kind": "array", + "type": { + "$ref": "978" + }, + "value": [ + { + "$id": "5224", + "kind": "string", + "type": { + "$ref": "979" + }, + "value": "nlc" + } + ] + }, + "topics": { + "$id": "5225", + "kind": "array", + "type": { + "$ref": "983" + }, + "value": [ + { + "$id": "5226", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "wvuca" + } + ] + } + } + } + ] + }, + "principals": { + "$id": "5227", + "kind": "model", + "type": { + "$ref": "990" + }, + "value": { + "$id": "5228", + "attributes": { + "$id": "5229", + "kind": "array", + "type": { + "$ref": "992" + }, + "value": [ + { + "$id": "5230", + "kind": "dict", + "type": { + "$ref": "993" + }, + "value": { + "$id": "5231", + "key5526": { + "$id": "5232", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "nydhzdhbldygqcn" + } + } + } + ] + }, + "clientIds": { + "$id": "5233", + "kind": "array", + "type": { + "$ref": "999" + }, + "value": [ + { + "$id": "5234", + "kind": "string", + "type": { + "$ref": "1000" + }, + "value": "smopeaeddsygz" + } + ] + }, + "usernames": { + "$id": "5235", + "kind": "array", + "type": { + "$ref": "1004" + }, + "value": [ + { + "$id": "5236", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "iozngyqndrteikszkbasinzdjtm" + } + ] + } + } + }, + "stateStoreResources": { + "$id": "5237", + "kind": "array", + "type": { + "$ref": "1011" + }, + "value": [ + { + "$id": "5238", + "kind": "model", + "type": { + "$ref": "1012" + }, + "value": { + "$id": "5239", + "keyType": { + "$id": "5240", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5241", + "kind": "array", + "type": { + "$ref": "1017" + }, + "value": [ + { + "$id": "5242", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "tkounsqtwvzyaklxjqoerpu" + } + ] + }, + "method": { + "$id": "5243", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "Read" + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5244", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5245", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "5246", + "name": { + "$id": "5247", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5248", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5249", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "5250", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5251", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5252", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "5253", + "createdBy": { + "$id": "5254", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5255", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "5256", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5257", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5258", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5259", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "5260", + "Name": "createOrUpdate", + "ResourceName": "BrokerAuthorizationResource", + "Doc": "Create a BrokerAuthorizationResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "5261", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "5262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "5263", + "Type": { + "$id": "5264", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5265", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "5266", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5268", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "5269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5270", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "5271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5272", + "Name": "brokerName", + "NameInRequest": "brokerName", + "Doc": "Name of broker.", + "Type": { + "$id": "5273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5274", + "Name": "authorizationName", + "NameInRequest": "authorizationName", + "Doc": "Name of Instance broker authorization resource", + "Type": { + "$id": "5275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5276", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "5277", + "kind": "constant", + "valueType": { + "$id": "5278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5279", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5280", + "kind": "constant", + "valueType": { + "$id": "5281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5282", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "960" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5283", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "960" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "5284", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "960" + }, + "Headers": [ + { + "$id": "5285", + "Name": "azureAsyncOperation", + "NameInResponse": "Azure-AsyncOperation", + "Doc": "A link to the status monitor", + "Type": { + "$id": "5286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "5287", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "5288", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authorizations/{authorizationName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "5289", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "5290", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "960" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.createOrUpdate", + "Decorators": [], + "Examples": [ + { + "$id": "5291", + "kind": "http", + "name": "BrokerAuthorization_CreateOrUpdate_Complex", + "description": "BrokerAuthorization_CreateOrUpdate_Complex", + "filePath": "2025-04-01/BrokerAuthorization_CreateOrUpdate_Complex.json", + "parameters": [ + { + "$id": "5292", + "parameter": { + "$ref": "5261" + }, + "value": { + "$id": "5293", + "kind": "string", + "type": { + "$ref": "5262" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5294", + "parameter": { + "$ref": "5265" + }, + "value": { + "$id": "5295", + "kind": "string", + "type": { + "$ref": "5266" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5296", + "parameter": { + "$ref": "5268" + }, + "value": { + "$id": "5297", + "kind": "string", + "type": { + "$ref": "5269" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5298", + "parameter": { + "$ref": "5270" + }, + "value": { + "$id": "5299", + "kind": "string", + "type": { + "$ref": "5271" + }, + "value": "resource-name123" + } + }, + { + "$id": "5300", + "parameter": { + "$ref": "5272" + }, + "value": { + "$id": "5301", + "kind": "string", + "type": { + "$ref": "5273" + }, + "value": "resource-name123" + } + }, + { + "$id": "5302", + "parameter": { + "$ref": "5274" + }, + "value": { + "$id": "5303", + "kind": "string", + "type": { + "$ref": "5275" + }, + "value": "resource-name123" + } + }, + { + "$id": "5304", + "parameter": { + "$ref": "5282" + }, + "value": { + "$id": "5305", + "kind": "model", + "type": { + "$ref": "960" + }, + "value": { + "$id": "5306", + "properties": { + "$id": "5307", + "kind": "model", + "type": { + "$ref": "962" + }, + "value": { + "$id": "5308", + "authorizationPolicies": { + "$id": "5309", + "kind": "model", + "type": { + "$ref": "964" + }, + "value": { + "$id": "5310", + "cache": { + "$id": "5311", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5312", + "kind": "array", + "type": { + "$ref": "969" + }, + "value": [ + { + "$id": "5313", + "kind": "model", + "type": { + "$ref": "970" + }, + "value": { + "$id": "5314", + "principals": { + "$id": "5315", + "kind": "model", + "type": { + "$ref": "990" + }, + "value": { + "$id": "5316", + "usernames": { + "$id": "5317", + "kind": "array", + "type": { + "$ref": "1004" + }, + "value": [ + { + "$id": "5318", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "temperature-sensor" + }, + { + "$id": "5319", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "humidity-sensor" + } + ] + }, + "attributes": { + "$id": "5320", + "kind": "array", + "type": { + "$ref": "992" + }, + "value": [ + { + "$id": "5321", + "kind": "dict", + "type": { + "$ref": "993" + }, + "value": { + "$id": "5322", + "building": { + "$id": "5323", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "17" + }, + "organization": { + "$id": "5324", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "contoso" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5325", + "kind": "array", + "type": { + "$ref": "972" + }, + "value": [ + { + "$id": "5326", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5327", + "method": { + "$id": "5328", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5329", + "kind": "array", + "type": { + "$ref": "978" + }, + "value": [ + { + "$id": "5330", + "kind": "string", + "type": { + "$ref": "979" + }, + "value": "{principal.attributes.building}*" + } + ] + } + } + }, + { + "$id": "5331", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5332", + "method": { + "$id": "5333", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Publish" + }, + "topics": { + "$id": "5334", + "kind": "array", + "type": { + "$ref": "983" + }, + "value": [ + { + "$id": "5335", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*" + } + ] + } + } + }, + { + "$id": "5336", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5337", + "method": { + "$id": "5338", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5339", + "kind": "array", + "type": { + "$ref": "983" + }, + "value": [ + { + "$id": "5340", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "commands/{principal.attributes.organization}" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5341", + "kind": "array", + "type": { + "$ref": "1011" + }, + "value": [ + { + "$id": "5342", + "kind": "model", + "type": { + "$ref": "1012" + }, + "value": { + "$id": "5343", + "method": { + "$id": "5344", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "Read" + }, + "keyType": { + "$id": "5345", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5346", + "kind": "array", + "type": { + "$ref": "1017" + }, + "value": [ + { + "$id": "5347", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "myreadkey" + }, + { + "$id": "5348", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "myotherkey?" + }, + { + "$id": "5349", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "mynumerickeysuffix[0-9]" + }, + { + "$id": "5350", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "clients:{principal.clientId}:*" + } + ] + } + } + }, + { + "$id": "5351", + "kind": "model", + "type": { + "$ref": "1012" + }, + "value": { + "$id": "5352", + "method": { + "$id": "5353", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5354", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "Binary" + }, + "keys": { + "$id": "5355", + "kind": "array", + "type": { + "$ref": "1017" + }, + "value": [ + { + "$id": "5356", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "MTE2IDEwMSAxMTUgMTE2" + } + ] + } + } + } + ] + } + } + } + ] + } + } + } + } + }, + "extendedLocation": { + "$id": "5357", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "5358", + "name": { + "$id": "5359", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5360", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "5361", + "response": { + "$ref": "5283" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5362", + "kind": "model", + "type": { + "$ref": "960" + }, + "value": { + "$id": "5363", + "properties": { + "$id": "5364", + "kind": "model", + "type": { + "$ref": "962" + }, + "value": { + "$id": "5365", + "authorizationPolicies": { + "$id": "5366", + "kind": "model", + "type": { + "$ref": "964" + }, + "value": { + "$id": "5367", + "cache": { + "$id": "5368", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5369", + "kind": "array", + "type": { + "$ref": "969" + }, + "value": [ + { + "$id": "5370", + "kind": "model", + "type": { + "$ref": "970" + }, + "value": { + "$id": "5371", + "principals": { + "$id": "5372", + "kind": "model", + "type": { + "$ref": "990" + }, + "value": { + "$id": "5373", + "usernames": { + "$id": "5374", + "kind": "array", + "type": { + "$ref": "1004" + }, + "value": [ + { + "$id": "5375", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "temperature-sensor" + }, + { + "$id": "5376", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "humidity-sensor" + } + ] + }, + "attributes": { + "$id": "5377", + "kind": "array", + "type": { + "$ref": "992" + }, + "value": [ + { + "$id": "5378", + "kind": "dict", + "type": { + "$ref": "993" + }, + "value": { + "$id": "5379", + "building": { + "$id": "5380", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "17" + }, + "organization": { + "$id": "5381", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "contoso" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5382", + "kind": "array", + "type": { + "$ref": "972" + }, + "value": [ + { + "$id": "5383", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5384", + "method": { + "$id": "5385", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5386", + "kind": "array", + "type": { + "$ref": "978" + }, + "value": [ + { + "$id": "5387", + "kind": "string", + "type": { + "$ref": "979" + }, + "value": "{principal.attributes.building}*" + } + ] + } + } + }, + { + "$id": "5388", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5389", + "method": { + "$id": "5390", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Publish" + }, + "topics": { + "$id": "5391", + "kind": "array", + "type": { + "$ref": "983" + }, + "value": [ + { + "$id": "5392", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*" + } + ] + } + } + }, + { + "$id": "5393", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5394", + "method": { + "$id": "5395", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5396", + "kind": "array", + "type": { + "$ref": "983" + }, + "value": [ + { + "$id": "5397", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "commands/{principal.attributes.organization}" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5398", + "kind": "array", + "type": { + "$ref": "1011" + }, + "value": [ + { + "$id": "5399", + "kind": "model", + "type": { + "$ref": "1012" + }, + "value": { + "$id": "5400", + "method": { + "$id": "5401", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "Read" + }, + "keyType": { + "$id": "5402", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5403", + "kind": "array", + "type": { + "$ref": "1017" + }, + "value": [ + { + "$id": "5404", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "myreadkey" + }, + { + "$id": "5405", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "myotherkey?" + }, + { + "$id": "5406", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "mynumerickeysuffix[0-9]" + }, + { + "$id": "5407", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "clients:{principal.clientId}:*" + } + ] + } + } + }, + { + "$id": "5408", + "kind": "model", + "type": { + "$ref": "1012" + }, + "value": { + "$id": "5409", + "method": { + "$id": "5410", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5411", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "Binary" + }, + "keys": { + "$id": "5412", + "kind": "array", + "type": { + "$ref": "1017" + }, + "value": [ + { + "$id": "5413", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "MTE2IDEwMSAxMTUgMTE2" + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5414", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5415", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "5416", + "name": { + "$id": "5417", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5418", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5419", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "5420", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5421", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5422", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "5423", + "createdBy": { + "$id": "5424", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5425", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "5426", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5427", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5428", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5429", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "5430", + "response": { + "$ref": "5284" + }, + "statusCode": 201, + "bodyValue": { + "$id": "5431", + "kind": "model", + "type": { + "$ref": "960" + }, + "value": { + "$id": "5432", + "properties": { + "$id": "5433", + "kind": "model", + "type": { + "$ref": "962" + }, + "value": { + "$id": "5434", + "authorizationPolicies": { + "$id": "5435", + "kind": "model", + "type": { + "$ref": "964" + }, + "value": { + "$id": "5436", + "cache": { + "$id": "5437", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5438", + "kind": "array", + "type": { + "$ref": "969" + }, + "value": [ + { + "$id": "5439", + "kind": "model", + "type": { + "$ref": "970" + }, + "value": { + "$id": "5440", + "principals": { + "$id": "5441", + "kind": "model", + "type": { + "$ref": "990" + }, + "value": { + "$id": "5442", + "usernames": { + "$id": "5443", + "kind": "array", + "type": { + "$ref": "1004" + }, + "value": [ + { + "$id": "5444", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "temperature-sensor" + }, + { + "$id": "5445", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "humidity-sensor" + } + ] + }, + "attributes": { + "$id": "5446", + "kind": "array", + "type": { + "$ref": "992" + }, + "value": [ + { + "$id": "5447", + "kind": "dict", + "type": { + "$ref": "993" + }, + "value": { + "$id": "5448", + "building": { + "$id": "5449", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "17" + }, + "organization": { + "$id": "5450", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "contoso" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5451", + "kind": "array", + "type": { + "$ref": "972" + }, + "value": [ + { + "$id": "5452", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5453", + "method": { + "$id": "5454", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5455", + "kind": "array", + "type": { + "$ref": "978" + }, + "value": [ + { + "$id": "5456", + "kind": "string", + "type": { + "$ref": "979" + }, + "value": "{principal.attributes.building}*" + } + ] + } + } + }, + { + "$id": "5457", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5458", + "method": { + "$id": "5459", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Publish" + }, + "topics": { + "$id": "5460", + "kind": "array", + "type": { + "$ref": "983" + }, + "value": [ + { + "$id": "5461", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*" + } + ] + } + } + }, + { + "$id": "5462", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5463", + "method": { + "$id": "5464", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5465", + "kind": "array", + "type": { + "$ref": "983" + }, + "value": [ + { + "$id": "5466", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "commands/{principal.attributes.organization}" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5467", + "kind": "array", + "type": { + "$ref": "1011" + }, + "value": [ + { + "$id": "5468", + "kind": "model", + "type": { + "$ref": "1012" + }, + "value": { + "$id": "5469", + "method": { + "$id": "5470", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "Read" + }, + "keyType": { + "$id": "5471", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5472", + "kind": "array", + "type": { + "$ref": "1017" + }, + "value": [ + { + "$id": "5473", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "myreadkey" + }, + { + "$id": "5474", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "myotherkey?" + }, + { + "$id": "5475", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "mynumerickeysuffix[0-9]" + }, + { + "$id": "5476", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "clients:{principal.clientId}:*" + } + ] + } + } + }, + { + "$id": "5477", + "kind": "model", + "type": { + "$ref": "1012" + }, + "value": { + "$id": "5478", + "method": { + "$id": "5479", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5480", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "Binary" + }, + "keys": { + "$id": "5481", + "kind": "array", + "type": { + "$ref": "1017" + }, + "value": [ + { + "$id": "5482", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "MTE2IDEwMSAxMTUgMTE2" + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5483", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5484", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "5485", + "name": { + "$id": "5486", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5487", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5488", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "5489", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5490", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5491", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "5492", + "createdBy": { + "$id": "5493", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5494", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "5495", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5496", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5497", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5498", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "5499", + "kind": "http", + "name": "BrokerAuthorization_CreateOrUpdate", + "description": "BrokerAuthorization_CreateOrUpdate", + "filePath": "2025-04-01/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5500", + "parameter": { + "$ref": "5261" + }, + "value": { + "$id": "5501", + "kind": "string", + "type": { + "$ref": "5262" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5502", + "parameter": { + "$ref": "5265" + }, + "value": { + "$id": "5503", + "kind": "string", + "type": { + "$ref": "5266" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5504", + "parameter": { + "$ref": "5268" + }, + "value": { + "$id": "5505", + "kind": "string", + "type": { + "$ref": "5269" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5506", + "parameter": { + "$ref": "5270" + }, + "value": { + "$id": "5507", + "kind": "string", + "type": { + "$ref": "5271" + }, + "value": "resource-name123" + } + }, + { + "$id": "5508", + "parameter": { + "$ref": "5272" + }, + "value": { + "$id": "5509", + "kind": "string", + "type": { + "$ref": "5273" + }, + "value": "resource-name123" + } + }, + { + "$id": "5510", + "parameter": { + "$ref": "5274" + }, + "value": { + "$id": "5511", + "kind": "string", + "type": { + "$ref": "5275" + }, + "value": "resource-name123" + } + }, + { + "$id": "5512", + "parameter": { + "$ref": "5282" + }, + "value": { + "$id": "5513", + "kind": "model", + "type": { + "$ref": "960" + }, + "value": { + "$id": "5514", + "properties": { + "$id": "5515", + "kind": "model", + "type": { + "$ref": "962" + }, + "value": { + "$id": "5516", + "authorizationPolicies": { + "$id": "5517", + "kind": "model", + "type": { + "$ref": "964" + }, + "value": { + "$id": "5518", + "cache": { + "$id": "5519", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5520", + "kind": "array", + "type": { + "$ref": "969" + }, + "value": [ + { + "$id": "5521", + "kind": "model", + "type": { + "$ref": "970" + }, + "value": { + "$id": "5522", + "brokerResources": { + "$id": "5523", + "kind": "array", + "type": { + "$ref": "972" + }, + "value": [ + { + "$id": "5524", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5525", + "method": { + "$id": "5526", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5527", + "kind": "array", + "type": { + "$ref": "978" + }, + "value": [ + { + "$id": "5528", + "kind": "string", + "type": { + "$ref": "979" + }, + "value": "nlc" + } + ] + }, + "topics": { + "$id": "5529", + "kind": "array", + "type": { + "$ref": "983" + }, + "value": [ + { + "$id": "5530", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "wvuca" + } + ] + } + } + } + ] + }, + "principals": { + "$id": "5531", + "kind": "model", + "type": { + "$ref": "990" + }, + "value": { + "$id": "5532", + "attributes": { + "$id": "5533", + "kind": "array", + "type": { + "$ref": "992" + }, + "value": [ + { + "$id": "5534", + "kind": "dict", + "type": { + "$ref": "993" + }, + "value": { + "$id": "5535", + "key5526": { + "$id": "5536", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "nydhzdhbldygqcn" + } + } + } + ] + }, + "clientIds": { + "$id": "5537", + "kind": "array", + "type": { + "$ref": "999" + }, + "value": [ + { + "$id": "5538", + "kind": "string", + "type": { + "$ref": "1000" + }, + "value": "smopeaeddsygz" + } + ] + }, + "usernames": { + "$id": "5539", + "kind": "array", + "type": { + "$ref": "1004" + }, + "value": [ + { + "$id": "5540", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "iozngyqndrteikszkbasinzdjtm" + } + ] + } + } + }, + "stateStoreResources": { + "$id": "5541", + "kind": "array", + "type": { + "$ref": "1011" + }, + "value": [ + { + "$id": "5542", + "kind": "model", + "type": { + "$ref": "1012" + }, + "value": { + "$id": "5543", + "keyType": { + "$id": "5544", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5545", + "kind": "array", + "type": { + "$ref": "1017" + }, + "value": [ + { + "$id": "5546", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "tkounsqtwvzyaklxjqoerpu" + } + ] + }, + "method": { + "$id": "5547", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "Read" + } + } + } + ] + } + } + } + ] + } + } + } + } + }, + "extendedLocation": { + "$id": "5548", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "5549", + "name": { + "$id": "5550", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5551", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "5552", + "response": { + "$ref": "5283" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5553", + "kind": "model", + "type": { + "$ref": "960" + }, + "value": { + "$id": "5554", + "properties": { + "$id": "5555", + "kind": "model", + "type": { + "$ref": "962" + }, + "value": { + "$id": "5556", + "authorizationPolicies": { + "$id": "5557", + "kind": "model", + "type": { + "$ref": "964" + }, + "value": { + "$id": "5558", + "cache": { + "$id": "5559", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5560", + "kind": "array", + "type": { + "$ref": "969" + }, + "value": [ + { + "$id": "5561", + "kind": "model", + "type": { + "$ref": "970" + }, + "value": { + "$id": "5562", + "brokerResources": { + "$id": "5563", + "kind": "array", + "type": { + "$ref": "972" + }, + "value": [ + { + "$id": "5564", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5565", + "method": { + "$id": "5566", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5567", + "kind": "array", + "type": { + "$ref": "978" + }, + "value": [ + { + "$id": "5568", + "kind": "string", + "type": { + "$ref": "979" + }, + "value": "nlc" + } + ] + }, + "topics": { + "$id": "5569", + "kind": "array", + "type": { + "$ref": "983" + }, + "value": [ + { + "$id": "5570", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "wvuca" + } + ] + } + } + } + ] + }, + "principals": { + "$id": "5571", + "kind": "model", + "type": { + "$ref": "990" + }, + "value": { + "$id": "5572", + "attributes": { + "$id": "5573", + "kind": "array", + "type": { + "$ref": "992" + }, + "value": [ + { + "$id": "5574", + "kind": "dict", + "type": { + "$ref": "993" + }, + "value": { + "$id": "5575", + "key5526": { + "$id": "5576", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "nydhzdhbldygqcn" + } + } + } + ] + }, + "clientIds": { + "$id": "5577", + "kind": "array", + "type": { + "$ref": "999" + }, + "value": [ + { + "$id": "5578", + "kind": "string", + "type": { + "$ref": "1000" + }, + "value": "smopeaeddsygz" + } + ] + }, + "usernames": { + "$id": "5579", + "kind": "array", + "type": { + "$ref": "1004" + }, + "value": [ + { + "$id": "5580", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "iozngyqndrteikszkbasinzdjtm" + } + ] + } + } + }, + "stateStoreResources": { + "$id": "5581", + "kind": "array", + "type": { + "$ref": "1011" + }, + "value": [ + { + "$id": "5582", + "kind": "model", + "type": { + "$ref": "1012" + }, + "value": { + "$id": "5583", + "keyType": { + "$id": "5584", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5585", + "kind": "array", + "type": { + "$ref": "1017" + }, + "value": [ + { + "$id": "5586", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "tkounsqtwvzyaklxjqoerpu" + } + ] + }, + "method": { + "$id": "5587", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "Read" + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5588", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5589", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "5590", + "name": { + "$id": "5591", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5592", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5593", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "5594", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5595", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5596", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "5597", + "createdBy": { + "$id": "5598", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5599", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "5600", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5601", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5602", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5603", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "5604", + "response": { + "$ref": "5284" + }, + "statusCode": 201, + "bodyValue": { + "$id": "5605", + "kind": "model", + "type": { + "$ref": "960" + }, + "value": { + "$id": "5606", + "properties": { + "$id": "5607", + "kind": "model", + "type": { + "$ref": "962" + }, + "value": { + "$id": "5608", + "authorizationPolicies": { + "$id": "5609", + "kind": "model", + "type": { + "$ref": "964" + }, + "value": { + "$id": "5610", + "cache": { + "$id": "5611", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5612", + "kind": "array", + "type": { + "$ref": "969" + }, + "value": [ + { + "$id": "5613", + "kind": "model", + "type": { + "$ref": "970" + }, + "value": { + "$id": "5614", + "brokerResources": { + "$id": "5615", + "kind": "array", + "type": { + "$ref": "972" + }, + "value": [ + { + "$id": "5616", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5617", + "method": { + "$id": "5618", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5619", + "kind": "array", + "type": { + "$ref": "978" + }, + "value": [ + { + "$id": "5620", + "kind": "string", + "type": { + "$ref": "979" + }, + "value": "nlc" + } + ] + }, + "topics": { + "$id": "5621", + "kind": "array", + "type": { + "$ref": "983" + }, + "value": [ + { + "$id": "5622", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "wvuca" + } + ] + } + } + } + ] + }, + "principals": { + "$id": "5623", + "kind": "model", + "type": { + "$ref": "990" + }, + "value": { + "$id": "5624", + "attributes": { + "$id": "5625", + "kind": "array", + "type": { + "$ref": "992" + }, + "value": [ + { + "$id": "5626", + "kind": "dict", + "type": { + "$ref": "993" + }, + "value": { + "$id": "5627", + "key5526": { + "$id": "5628", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "nydhzdhbldygqcn" + } + } + } + ] + }, + "clientIds": { + "$id": "5629", + "kind": "array", + "type": { + "$ref": "999" + }, + "value": [ + { + "$id": "5630", + "kind": "string", + "type": { + "$ref": "1000" + }, + "value": "smopeaeddsygz" + } + ] + }, + "usernames": { + "$id": "5631", + "kind": "array", + "type": { + "$ref": "1004" + }, + "value": [ + { + "$id": "5632", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "iozngyqndrteikszkbasinzdjtm" + } + ] + } + } + }, + "stateStoreResources": { + "$id": "5633", + "kind": "array", + "type": { + "$ref": "1011" + }, + "value": [ + { + "$id": "5634", + "kind": "model", + "type": { + "$ref": "1012" + }, + "value": { + "$id": "5635", + "keyType": { + "$id": "5636", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5637", + "kind": "array", + "type": { + "$ref": "1017" + }, + "value": [ + { + "$id": "5638", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "tkounsqtwvzyaklxjqoerpu" + } + ] + }, + "method": { + "$id": "5639", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "Read" + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5640", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5641", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "5642", + "name": { + "$id": "5643", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5644", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5645", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "5646", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5647", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5648", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "5649", + "createdBy": { + "$id": "5650", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5651", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "5652", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5653", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5654", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5655", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "5656", + "kind": "http", + "name": "BrokerAuthorization_CreateOrUpdate_Simple", + "description": "BrokerAuthorization_CreateOrUpdate_Simple", + "filePath": "2025-04-01/BrokerAuthorization_CreateOrUpdate_Simple.json", + "parameters": [ + { + "$id": "5657", + "parameter": { + "$ref": "5261" + }, + "value": { + "$id": "5658", + "kind": "string", + "type": { + "$ref": "5262" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5659", + "parameter": { + "$ref": "5265" + }, + "value": { + "$id": "5660", + "kind": "string", + "type": { + "$ref": "5266" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5661", + "parameter": { + "$ref": "5268" + }, + "value": { + "$id": "5662", + "kind": "string", + "type": { + "$ref": "5269" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5663", + "parameter": { + "$ref": "5270" + }, + "value": { + "$id": "5664", + "kind": "string", + "type": { + "$ref": "5271" + }, + "value": "resource-name123" + } + }, + { + "$id": "5665", + "parameter": { + "$ref": "5272" + }, + "value": { + "$id": "5666", + "kind": "string", + "type": { + "$ref": "5273" + }, + "value": "resource-name123" + } + }, + { + "$id": "5667", + "parameter": { + "$ref": "5274" + }, + "value": { + "$id": "5668", + "kind": "string", + "type": { + "$ref": "5275" + }, + "value": "resource-name123" + } + }, + { + "$id": "5669", + "parameter": { + "$ref": "5282" + }, + "value": { + "$id": "5670", + "kind": "model", + "type": { + "$ref": "960" + }, + "value": { + "$id": "5671", + "properties": { + "$id": "5672", + "kind": "model", + "type": { + "$ref": "962" + }, + "value": { + "$id": "5673", + "authorizationPolicies": { + "$id": "5674", + "kind": "model", + "type": { + "$ref": "964" + }, + "value": { + "$id": "5675", + "cache": { + "$id": "5676", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5677", + "kind": "array", + "type": { + "$ref": "969" + }, + "value": [ + { + "$id": "5678", + "kind": "model", + "type": { + "$ref": "970" + }, + "value": { + "$id": "5679", + "principals": { + "$id": "5680", + "kind": "model", + "type": { + "$ref": "990" + }, + "value": { + "$id": "5681", + "clientIds": { + "$id": "5682", + "kind": "array", + "type": { + "$ref": "999" + }, + "value": [ + { + "$id": "5683", + "kind": "string", + "type": { + "$ref": "1000" + }, + "value": "my-client-id" + } + ] + }, + "attributes": { + "$id": "5684", + "kind": "array", + "type": { + "$ref": "992" + }, + "value": [ + { + "$id": "5685", + "kind": "dict", + "type": { + "$ref": "993" + }, + "value": { + "$id": "5686", + "floor": { + "$id": "5687", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "floor1" + }, + "site": { + "$id": "5688", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "site1" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5689", + "kind": "array", + "type": { + "$ref": "972" + }, + "value": [ + { + "$id": "5690", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5691", + "method": { + "$id": "5692", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Connect" + } + } + }, + { + "$id": "5693", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5694", + "method": { + "$id": "5695", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5696", + "kind": "array", + "type": { + "$ref": "983" + }, + "value": [ + { + "$id": "5697", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "topic" + }, + { + "$id": "5698", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "topic/with/wildcard/#" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5699", + "kind": "array", + "type": { + "$ref": "1011" + }, + "value": [ + { + "$id": "5700", + "kind": "model", + "type": { + "$ref": "1012" + }, + "value": { + "$id": "5701", + "method": { + "$id": "5702", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5703", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5704", + "kind": "array", + "type": { + "$ref": "1017" + }, + "value": [ + { + "$id": "5705", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "*" + } + ] + } + } + } + ] + } + } + } + ] + } + } + } + } + }, + "extendedLocation": { + "$id": "5706", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "5707", + "name": { + "$id": "5708", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5709", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "5710", + "response": { + "$ref": "5283" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5711", + "kind": "model", + "type": { + "$ref": "960" + }, + "value": { + "$id": "5712", + "properties": { + "$id": "5713", + "kind": "model", + "type": { + "$ref": "962" + }, + "value": { + "$id": "5714", + "authorizationPolicies": { + "$id": "5715", + "kind": "model", + "type": { + "$ref": "964" + }, + "value": { + "$id": "5716", + "cache": { + "$id": "5717", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5718", + "kind": "array", + "type": { + "$ref": "969" + }, + "value": [ + { + "$id": "5719", + "kind": "model", + "type": { + "$ref": "970" + }, + "value": { + "$id": "5720", + "principals": { + "$id": "5721", + "kind": "model", + "type": { + "$ref": "990" + }, + "value": { + "$id": "5722", + "clientIds": { + "$id": "5723", + "kind": "array", + "type": { + "$ref": "999" + }, + "value": [ + { + "$id": "5724", + "kind": "string", + "type": { + "$ref": "1000" + }, + "value": "my-client-id" + } + ] + }, + "attributes": { + "$id": "5725", + "kind": "array", + "type": { + "$ref": "992" + }, + "value": [ + { + "$id": "5726", + "kind": "dict", + "type": { + "$ref": "993" + }, + "value": { + "$id": "5727", + "floor": { + "$id": "5728", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "floor1" + }, + "site": { + "$id": "5729", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "site1" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5730", + "kind": "array", + "type": { + "$ref": "972" + }, + "value": [ + { + "$id": "5731", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5732", + "method": { + "$id": "5733", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Connect" + } + } + }, + { + "$id": "5734", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5735", + "method": { + "$id": "5736", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5737", + "kind": "array", + "type": { + "$ref": "983" + }, + "value": [ + { + "$id": "5738", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "topic" + }, + { + "$id": "5739", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "topic/with/wildcard/#" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5740", + "kind": "array", + "type": { + "$ref": "1011" + }, + "value": [ + { + "$id": "5741", + "kind": "model", + "type": { + "$ref": "1012" + }, + "value": { + "$id": "5742", + "method": { + "$id": "5743", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5744", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5745", + "kind": "array", + "type": { + "$ref": "1017" + }, + "value": [ + { + "$id": "5746", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "*" + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5747", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5748", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "5749", + "name": { + "$id": "5750", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5751", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5752", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "5753", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5754", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5755", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "5756", + "createdBy": { + "$id": "5757", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5758", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "5759", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5760", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5761", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5762", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "5763", + "response": { + "$ref": "5284" + }, + "statusCode": 201, + "bodyValue": { + "$id": "5764", + "kind": "model", + "type": { + "$ref": "960" + }, + "value": { + "$id": "5765", + "properties": { + "$id": "5766", + "kind": "model", + "type": { + "$ref": "962" + }, + "value": { + "$id": "5767", + "authorizationPolicies": { + "$id": "5768", + "kind": "model", + "type": { + "$ref": "964" + }, + "value": { + "$id": "5769", + "cache": { + "$id": "5770", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5771", + "kind": "array", + "type": { + "$ref": "969" + }, + "value": [ + { + "$id": "5772", + "kind": "model", + "type": { + "$ref": "970" + }, + "value": { + "$id": "5773", + "principals": { + "$id": "5774", + "kind": "model", + "type": { + "$ref": "990" + }, + "value": { + "$id": "5775", + "clientIds": { + "$id": "5776", + "kind": "array", + "type": { + "$ref": "999" + }, + "value": [ + { + "$id": "5777", + "kind": "string", + "type": { + "$ref": "1000" + }, + "value": "my-client-id" + } + ] + }, + "attributes": { + "$id": "5778", + "kind": "array", + "type": { + "$ref": "992" + }, + "value": [ + { + "$id": "5779", + "kind": "dict", + "type": { + "$ref": "993" + }, + "value": { + "$id": "5780", + "floor": { + "$id": "5781", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "floor1" + }, + "site": { + "$id": "5782", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "site1" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5783", + "kind": "array", + "type": { + "$ref": "972" + }, + "value": [ + { + "$id": "5784", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5785", + "method": { + "$id": "5786", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Connect" + } + } + }, + { + "$id": "5787", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5788", + "method": { + "$id": "5789", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5790", + "kind": "array", + "type": { + "$ref": "983" + }, + "value": [ + { + "$id": "5791", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "topic" + }, + { + "$id": "5792", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "topic/with/wildcard/#" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5793", + "kind": "array", + "type": { + "$ref": "1011" + }, + "value": [ + { + "$id": "5794", + "kind": "model", + "type": { + "$ref": "1012" + }, + "value": { + "$id": "5795", + "method": { + "$id": "5796", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5797", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5798", + "kind": "array", + "type": { + "$ref": "1017" + }, + "value": [ + { + "$id": "5799", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "*" + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5800", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5801", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "5802", + "name": { + "$id": "5803", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5804", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5805", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "5806", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5807", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5808", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "5809", + "createdBy": { + "$id": "5810", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5811", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "5812", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5813", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5814", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5815", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "5816", + "Name": "delete", + "ResourceName": "BrokerAuthorizationResource", + "Doc": "Delete a BrokerAuthorizationResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "5817", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "5818", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "5819", + "Type": { + "$id": "5820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5821", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "5822", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5823", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5824", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "5825", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5826", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "5827", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5828", + "Name": "brokerName", + "NameInRequest": "brokerName", + "Doc": "Name of broker.", + "Type": { + "$id": "5829", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5830", + "Name": "authorizationName", + "NameInRequest": "authorizationName", + "Doc": "Name of Instance broker authorization resource", + "Type": { + "$id": "5831", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5832", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5833", + "kind": "constant", + "valueType": { + "$id": "5834", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5835", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "5836", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "5837", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "5838", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "5839", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "5840", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authorizations/{authorizationName}", + "BufferResponse": true, + "LongRunning": { + "$id": "5841", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "5842", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.delete", + "Decorators": [], + "Examples": [ + { + "$id": "5843", + "kind": "http", + "name": "BrokerAuthorization_Delete", + "description": "BrokerAuthorization_Delete", + "filePath": "2025-04-01/BrokerAuthorization_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5844", + "parameter": { + "$ref": "5817" + }, + "value": { + "$id": "5845", + "kind": "string", + "type": { + "$ref": "5818" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5846", + "parameter": { + "$ref": "5821" + }, + "value": { + "$id": "5847", + "kind": "string", + "type": { + "$ref": "5822" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5848", + "parameter": { + "$ref": "5824" + }, + "value": { + "$id": "5849", + "kind": "string", + "type": { + "$ref": "5825" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5850", + "parameter": { + "$ref": "5826" + }, + "value": { + "$id": "5851", + "kind": "string", + "type": { + "$ref": "5827" + }, + "value": "resource-name123" + } + }, + { + "$id": "5852", + "parameter": { + "$ref": "5828" + }, + "value": { + "$id": "5853", + "kind": "string", + "type": { + "$ref": "5829" + }, + "value": "resource-name123" + } + }, + { + "$id": "5854", + "parameter": { + "$ref": "5830" + }, + "value": { + "$id": "5855", + "kind": "string", + "type": { + "$ref": "5831" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "5856", + "response": { + "$ref": "5835" + }, + "statusCode": 202 + }, + { + "$id": "5857", + "response": { + "$ref": "5840" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "5858", + "Name": "listByResourceGroup", + "ResourceName": "BrokerAuthorizationResource", + "Doc": "List BrokerAuthorizationResource resources by BrokerResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "5859", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "5860", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "5861", + "Type": { + "$id": "5862", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5863", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "5864", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5865", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5866", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "5867", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5868", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "5869", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5870", + "Name": "brokerName", + "NameInRequest": "brokerName", + "Doc": "Name of broker.", + "Type": { + "$id": "5871", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5872", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5873", + "kind": "constant", + "valueType": { + "$id": "5874", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5875", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "1038" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authorizations", + "BufferResponse": true, + "Paging": { + "$id": "5876", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "5877", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "5878", + "kind": "http", + "name": "BrokerAuthorization_ListByResourceGroup", + "description": "BrokerAuthorization_ListByResourceGroup", + "filePath": "2025-04-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5879", + "parameter": { + "$ref": "5859" + }, + "value": { + "$id": "5880", + "kind": "string", + "type": { + "$ref": "5860" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5881", + "parameter": { + "$ref": "5863" + }, + "value": { + "$id": "5882", + "kind": "string", + "type": { + "$ref": "5864" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5883", + "parameter": { + "$ref": "5866" + }, + "value": { + "$id": "5884", + "kind": "string", + "type": { + "$ref": "5867" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5885", + "parameter": { + "$ref": "5868" + }, + "value": { + "$id": "5886", + "kind": "string", + "type": { + "$ref": "5869" + }, + "value": "resource-name123" + } + }, + { + "$id": "5887", + "parameter": { + "$ref": "5870" + }, + "value": { + "$id": "5888", + "kind": "string", + "type": { + "$ref": "5871" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "5889", + "response": { + "$ref": "5875" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5890", + "kind": "model", + "type": { + "$ref": "1038" + }, + "value": { + "$id": "5891", + "value": { + "$id": "5892", + "kind": "array", + "type": { + "$ref": "1040" + }, + "value": [ + { + "$id": "5893", + "kind": "model", + "type": { + "$ref": "960" + }, + "value": { + "$id": "5894", + "properties": { + "$id": "5895", + "kind": "model", + "type": { + "$ref": "962" + }, + "value": { + "$id": "5896", + "authorizationPolicies": { + "$id": "5897", + "kind": "model", + "type": { + "$ref": "964" + }, + "value": { + "$id": "5898", + "cache": { + "$id": "5899", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5900", + "kind": "array", + "type": { + "$ref": "969" + }, + "value": [ + { + "$id": "5901", + "kind": "model", + "type": { + "$ref": "970" + }, + "value": { + "$id": "5902", + "brokerResources": { + "$id": "5903", + "kind": "array", + "type": { + "$ref": "972" + }, + "value": [ + { + "$id": "5904", + "kind": "model", + "type": { + "$ref": "973" + }, + "value": { + "$id": "5905", + "method": { + "$id": "5906", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5907", + "kind": "array", + "type": { + "$ref": "978" + }, + "value": [ + { + "$id": "5908", + "kind": "string", + "type": { + "$ref": "979" + }, + "value": "nlc" + } + ] + }, + "topics": { + "$id": "5909", + "kind": "array", + "type": { + "$ref": "983" + }, + "value": [ + { + "$id": "5910", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "wvuca" + } + ] + } + } + } + ] + }, + "principals": { + "$id": "5911", + "kind": "model", + "type": { + "$ref": "990" + }, + "value": { + "$id": "5912", + "attributes": { + "$id": "5913", + "kind": "array", + "type": { + "$ref": "992" + }, + "value": [ + { + "$id": "5914", + "kind": "dict", + "type": { + "$ref": "993" + }, + "value": { + "$id": "5915", + "key5526": { + "$id": "5916", + "kind": "string", + "type": { + "$ref": "995" + }, + "value": "nydhzdhbldygqcn" + } + } + } + ] + }, + "clientIds": { + "$id": "5917", + "kind": "array", + "type": { + "$ref": "999" + }, + "value": [ + { + "$id": "5918", + "kind": "string", + "type": { + "$ref": "1000" + }, + "value": "smopeaeddsygz" + } + ] + }, + "usernames": { + "$id": "5919", + "kind": "array", + "type": { + "$ref": "1004" + }, + "value": [ + { + "$id": "5920", + "kind": "string", + "type": { + "$ref": "1005" + }, + "value": "iozngyqndrteikszkbasinzdjtm" + } + ] + } + } + }, + "stateStoreResources": { + "$id": "5921", + "kind": "array", + "type": { + "$ref": "1011" + }, + "value": [ + { + "$id": "5922", + "kind": "model", + "type": { + "$ref": "1012" + }, + "value": { + "$id": "5923", + "keyType": { + "$id": "5924", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5925", + "kind": "array", + "type": { + "$ref": "1017" + }, + "value": [ + { + "$id": "5926", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "tkounsqtwvzyaklxjqoerpu" + } + ] + }, + "method": { + "$id": "5927", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "Read" + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5928", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5929", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "5930", + "name": { + "$id": "5931", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5932", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5933", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "5934", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5935", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5936", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "5937", + "createdBy": { + "$id": "5938", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5939", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "5940", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5941", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5942", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5943", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "5944", + "kind": "string", + "type": { + "$ref": "1044" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "5945" + }, + "Parent": "IoTOperationsClient", + "Parameters": [ + { + "$id": "5946", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "5947", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "5948", + "Type": { + "$id": "5949", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization" + }, + { + "$id": "5950", + "Name": "DataflowProfile", + "Namespace": "Microsoft.IoTOperations", + "Operations": [ + { + "$id": "5951", + "Name": "get", + "ResourceName": "DataflowProfileResource", + "Doc": "Get a DataflowProfileResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "5952", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "5953", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "5954", + "Type": { + "$id": "5955", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5956", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "5957", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5958", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5959", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "5960", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5961", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "5962", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5963", + "Name": "dataflowProfileName", + "NameInRequest": "dataflowProfileName", + "Doc": "Name of Instance dataflowProfile resource", + "Type": { + "$id": "5964", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "5965", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "5966", + "kind": "constant", + "valueType": { + "$id": "5967", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "5968", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "915" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile.get", + "Decorators": [], + "Examples": [ + { + "$id": "5969", + "kind": "http", + "name": "DataflowProfile_Get", + "description": "DataflowProfile_Get", + "filePath": "2025-04-01/DataflowProfile_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5970", + "parameter": { + "$ref": "5952" + }, + "value": { + "$id": "5971", + "kind": "string", + "type": { + "$ref": "5953" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5972", + "parameter": { + "$ref": "5956" + }, + "value": { + "$id": "5973", + "kind": "string", + "type": { + "$ref": "5957" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5974", + "parameter": { + "$ref": "5959" + }, + "value": { + "$id": "5975", + "kind": "string", + "type": { + "$ref": "5960" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5976", + "parameter": { + "$ref": "5961" + }, + "value": { + "$id": "5977", + "kind": "string", + "type": { + "$ref": "5962" + }, + "value": "resource-name123" + } + }, + { + "$id": "5978", + "parameter": { + "$ref": "5963" + }, + "value": { + "$id": "5979", + "kind": "string", + "type": { + "$ref": "5964" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "5980", + "response": { + "$ref": "5968" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5981", + "kind": "model", + "type": { + "$ref": "915" + }, + "value": { + "$id": "5982", + "properties": { + "$id": "5983", + "kind": "model", + "type": { + "$ref": "917" + }, + "value": { + "$id": "5984", + "diagnostics": { + "$id": "5985", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "5986", + "logs": { + "$id": "5987", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "5988", + "level": { + "$id": "5989", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "5990", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "5991", + "prometheusPort": { + "$id": "5992", + "kind": "number", + "type": { + "$ref": "931" + }, + "value": 7581 + } + } + } + } + }, + "instanceCount": { + "$id": "5993", + "kind": "number", + "type": { + "$ref": "939" + }, + "value": 14 + }, + "provisioningState": { + "$id": "5994", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5995", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "5996", + "name": { + "$id": "5997", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5998", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5999", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6000", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6001", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6002", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "6003", + "createdBy": { + "$id": "6004", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6005", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "6006", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6007", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6008", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6009", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "6010", + "Name": "createOrUpdate", + "ResourceName": "DataflowProfileResource", + "Doc": "Create a DataflowProfileResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "6011", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "6012", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "6013", + "Type": { + "$id": "6014", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6015", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "6016", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6018", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "6019", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6020", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "6021", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6022", + "Name": "dataflowProfileName", + "NameInRequest": "dataflowProfileName", + "Doc": "Name of Instance dataflowProfile resource", + "Type": { + "$id": "6023", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6024", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "6025", + "kind": "constant", + "valueType": { + "$id": "6026", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6027", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "6028", + "kind": "constant", + "valueType": { + "$id": "6029", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6030", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "915" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "6031", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "915" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "6032", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "915" + }, + "Headers": [ + { + "$id": "6033", + "Name": "azureAsyncOperation", + "NameInResponse": "Azure-AsyncOperation", + "Doc": "A link to the status monitor", + "Type": { + "$id": "6034", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "6035", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "6036", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "6037", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "6038", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "915" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile.createOrUpdate", + "Decorators": [], + "Examples": [ + { + "$id": "6039", + "kind": "http", + "name": "DataflowProfile_CreateOrUpdate", + "description": "DataflowProfile_CreateOrUpdate", + "filePath": "2025-04-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "6040", + "parameter": { + "$ref": "6011" + }, + "value": { + "$id": "6041", + "kind": "string", + "type": { + "$ref": "6012" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6042", + "parameter": { + "$ref": "6015" + }, + "value": { + "$id": "6043", + "kind": "string", + "type": { + "$ref": "6016" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6044", + "parameter": { + "$ref": "6018" + }, + "value": { + "$id": "6045", + "kind": "string", + "type": { + "$ref": "6019" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6046", + "parameter": { + "$ref": "6020" + }, + "value": { + "$id": "6047", + "kind": "string", + "type": { + "$ref": "6021" + }, + "value": "resource-name123" + } + }, + { + "$id": "6048", + "parameter": { + "$ref": "6022" + }, + "value": { + "$id": "6049", + "kind": "string", + "type": { + "$ref": "6023" + }, + "value": "resource-name123" + } + }, + { + "$id": "6050", + "parameter": { + "$ref": "6030" + }, + "value": { + "$id": "6051", + "kind": "model", + "type": { + "$ref": "915" + }, + "value": { + "$id": "6052", + "properties": { + "$id": "6053", + "kind": "model", + "type": { + "$ref": "917" + }, + "value": { + "$id": "6054", + "diagnostics": { + "$id": "6055", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "6056", + "logs": { + "$id": "6057", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "6058", + "level": { + "$id": "6059", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "6060", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "6061", + "prometheusPort": { + "$id": "6062", + "kind": "number", + "type": { + "$ref": "931" + }, + "value": 7581 + } + } + } + } + }, + "instanceCount": { + "$id": "6063", + "kind": "number", + "type": { + "$ref": "939" + }, + "value": 14 + } + } + }, + "extendedLocation": { + "$id": "6064", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6065", + "name": { + "$id": "6066", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6067", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6068", + "response": { + "$ref": "6031" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6069", + "kind": "model", + "type": { + "$ref": "915" + }, + "value": { + "$id": "6070", + "properties": { + "$id": "6071", + "kind": "model", + "type": { + "$ref": "917" + }, + "value": { + "$id": "6072", + "diagnostics": { + "$id": "6073", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "6074", + "logs": { + "$id": "6075", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "6076", + "level": { + "$id": "6077", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "6078", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "6079", + "prometheusPort": { + "$id": "6080", + "kind": "number", + "type": { + "$ref": "931" + }, + "value": 7581 + } + } + } + } + }, + "instanceCount": { + "$id": "6081", + "kind": "number", + "type": { + "$ref": "939" + }, + "value": 14 + }, + "provisioningState": { + "$id": "6082", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6083", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6084", + "name": { + "$id": "6085", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6086", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6087", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6088", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6089", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6090", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "6091", + "createdBy": { + "$id": "6092", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6093", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "6094", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6095", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6096", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6097", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "6098", + "response": { + "$ref": "6032" + }, + "statusCode": 201, + "bodyValue": { + "$id": "6099", + "kind": "model", + "type": { + "$ref": "915" + }, + "value": { + "$id": "6100", + "properties": { + "$id": "6101", + "kind": "model", + "type": { + "$ref": "917" + }, + "value": { + "$id": "6102", + "diagnostics": { + "$id": "6103", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "6104", + "logs": { + "$id": "6105", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "6106", + "level": { + "$id": "6107", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "6108", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "6109", + "prometheusPort": { + "$id": "6110", + "kind": "number", + "type": { + "$ref": "931" + }, + "value": 7581 + } + } + } + } + }, + "instanceCount": { + "$id": "6111", + "kind": "number", + "type": { + "$ref": "939" + }, + "value": 14 + }, + "provisioningState": { + "$id": "6112", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6113", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6114", + "name": { + "$id": "6115", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6116", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6117", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6118", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6119", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6120", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "6121", + "createdBy": { + "$id": "6122", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6123", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "6124", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6125", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6126", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6127", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "6128", + "kind": "http", + "name": "DataflowProfile_CreateOrUpdate_Minimal", + "description": "DataflowProfile_CreateOrUpdate_Minimal", + "filePath": "2025-04-01/DataflowProfile_CreateOrUpdate_Minimal.json", + "parameters": [ + { + "$id": "6129", + "parameter": { + "$ref": "6011" + }, + "value": { + "$id": "6130", + "kind": "string", + "type": { + "$ref": "6012" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6131", + "parameter": { + "$ref": "6015" + }, + "value": { + "$id": "6132", + "kind": "string", + "type": { + "$ref": "6016" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6133", + "parameter": { + "$ref": "6018" + }, + "value": { + "$id": "6134", + "kind": "string", + "type": { + "$ref": "6019" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6135", + "parameter": { + "$ref": "6020" + }, + "value": { + "$id": "6136", + "kind": "string", + "type": { + "$ref": "6021" + }, + "value": "resource-name123" + } + }, + { + "$id": "6137", + "parameter": { + "$ref": "6022" + }, + "value": { + "$id": "6138", + "kind": "string", + "type": { + "$ref": "6023" + }, + "value": "aio-dataflowprofile" + } + }, + { + "$id": "6139", + "parameter": { + "$ref": "6030" + }, + "value": { + "$id": "6140", + "kind": "model", + "type": { + "$ref": "915" + }, + "value": { + "$id": "6141", + "properties": { + "$id": "6142", + "kind": "model", + "type": { + "$ref": "917" + }, + "value": { + "$id": "6143", + "instanceCount": { + "$id": "6144", + "kind": "number", + "type": { + "$ref": "939" + }, + "value": 1 + } + } + }, + "extendedLocation": { + "$id": "6145", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6146", + "name": { + "$id": "6147", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6148", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6149", + "response": { + "$ref": "6031" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6150", + "kind": "model", + "type": { + "$ref": "915" + }, + "value": { + "$id": "6151", + "properties": { + "$id": "6152", + "kind": "model", + "type": { + "$ref": "917" + }, + "value": { + "$id": "6153", + "instanceCount": { + "$id": "6154", + "kind": "number", + "type": { + "$ref": "939" + }, + "value": 1 + }, + "provisioningState": { + "$id": "6155", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6156", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6157", + "name": { + "$id": "6158", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6159", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6160", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6161", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6162", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6163", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "6164", + "createdBy": { + "$id": "6165", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6166", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "6167", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6168", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6169", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6170", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "6171", + "response": { + "$ref": "6032" + }, + "statusCode": 201, + "bodyValue": { + "$id": "6172", + "kind": "model", + "type": { + "$ref": "915" + }, + "value": { + "$id": "6173", + "properties": { + "$id": "6174", + "kind": "model", + "type": { + "$ref": "917" + }, + "value": { + "$id": "6175", + "instanceCount": { + "$id": "6176", + "kind": "number", + "type": { + "$ref": "939" + }, + "value": 1 + }, + "provisioningState": { + "$id": "6177", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6178", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6179", + "name": { + "$id": "6180", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6181", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6182", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6183", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6184", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6185", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "6186", + "createdBy": { + "$id": "6187", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6188", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "6189", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6190", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6191", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6192", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "6193", + "kind": "http", + "name": "DataflowProfile_CreateOrUpdate_Multi", + "description": "DataflowProfile_CreateOrUpdate_Multi", + "filePath": "2025-04-01/DataflowProfile_CreateOrUpdate_Multi.json", + "parameters": [ + { + "$id": "6194", + "parameter": { + "$ref": "6011" + }, + "value": { + "$id": "6195", + "kind": "string", + "type": { + "$ref": "6012" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6196", + "parameter": { + "$ref": "6015" + }, + "value": { + "$id": "6197", + "kind": "string", + "type": { + "$ref": "6016" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6198", + "parameter": { + "$ref": "6018" + }, + "value": { + "$id": "6199", + "kind": "string", + "type": { + "$ref": "6019" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6200", + "parameter": { + "$ref": "6020" + }, + "value": { + "$id": "6201", + "kind": "string", + "type": { + "$ref": "6021" + }, + "value": "resource-name123" + } + }, + { + "$id": "6202", + "parameter": { + "$ref": "6022" + }, + "value": { + "$id": "6203", + "kind": "string", + "type": { + "$ref": "6023" + }, + "value": "aio-dataflowprofile" + } + }, + { + "$id": "6204", + "parameter": { + "$ref": "6030" + }, + "value": { + "$id": "6205", + "kind": "model", + "type": { + "$ref": "915" + }, + "value": { + "$id": "6206", + "properties": { + "$id": "6207", + "kind": "model", + "type": { + "$ref": "917" + }, + "value": { + "$id": "6208", + "instanceCount": { + "$id": "6209", + "kind": "number", + "type": { + "$ref": "939" + }, + "value": 3 + } + } + }, + "extendedLocation": { + "$id": "6210", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6211", + "name": { + "$id": "6212", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6213", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6214", + "response": { + "$ref": "6031" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6215", + "kind": "model", + "type": { + "$ref": "915" + }, + "value": { + "$id": "6216", + "properties": { + "$id": "6217", + "kind": "model", + "type": { + "$ref": "917" + }, + "value": { + "$id": "6218", + "instanceCount": { + "$id": "6219", + "kind": "number", + "type": { + "$ref": "939" + }, + "value": 3 + }, + "provisioningState": { + "$id": "6220", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6221", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6222", + "name": { + "$id": "6223", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6224", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6225", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6226", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6227", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6228", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "6229", + "createdBy": { + "$id": "6230", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6231", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "6232", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6233", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6234", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6235", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "6236", + "response": { + "$ref": "6032" + }, + "statusCode": 201, + "bodyValue": { + "$id": "6237", + "kind": "model", + "type": { + "$ref": "915" + }, + "value": { + "$id": "6238", + "properties": { + "$id": "6239", + "kind": "model", + "type": { + "$ref": "917" + }, + "value": { + "$id": "6240", + "instanceCount": { + "$id": "6241", + "kind": "number", + "type": { + "$ref": "939" + }, + "value": 3 + }, + "provisioningState": { + "$id": "6242", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6243", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6244", + "name": { + "$id": "6245", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6246", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6247", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6248", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6249", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6250", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "6251", + "createdBy": { + "$id": "6252", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6253", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "6254", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6255", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6256", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6257", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "6258", + "Name": "delete", + "ResourceName": "DataflowProfileResource", + "Doc": "Delete a DataflowProfileResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "6259", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "6260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "6261", + "Type": { + "$id": "6262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6263", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "6264", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6266", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "6267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6268", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "6269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6270", + "Name": "dataflowProfileName", + "NameInRequest": "dataflowProfileName", + "Doc": "Name of Instance dataflowProfile resource", + "Type": { + "$id": "6271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6272", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "6273", + "kind": "constant", + "valueType": { + "$id": "6274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "6275", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "6276", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "6277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "6278", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "6279", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "6280", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}", + "BufferResponse": true, + "LongRunning": { + "$id": "6281", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "6282", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile.delete", + "Decorators": [], + "Examples": [ + { + "$id": "6283", + "kind": "http", + "name": "DataflowProfile_Delete", + "description": "DataflowProfile_Delete", + "filePath": "2025-04-01/DataflowProfile_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "6284", + "parameter": { + "$ref": "6259" + }, + "value": { + "$id": "6285", + "kind": "string", + "type": { + "$ref": "6260" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6286", + "parameter": { + "$ref": "6263" + }, + "value": { + "$id": "6287", + "kind": "string", + "type": { + "$ref": "6264" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6288", + "parameter": { + "$ref": "6266" + }, + "value": { + "$id": "6289", + "kind": "string", + "type": { + "$ref": "6267" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6290", + "parameter": { + "$ref": "6268" + }, + "value": { + "$id": "6291", + "kind": "string", + "type": { + "$ref": "6269" + }, + "value": "resource-name123" + } + }, + { + "$id": "6292", + "parameter": { + "$ref": "6270" + }, + "value": { + "$id": "6293", + "kind": "string", + "type": { + "$ref": "6271" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "6294", + "response": { + "$ref": "6275" + }, + "statusCode": 202 + }, + { + "$id": "6295", + "response": { + "$ref": "6280" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "6296", + "Name": "listByResourceGroup", + "ResourceName": "DataflowProfileResource", + "Doc": "List DataflowProfileResource resources by InstanceResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "6297", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "6298", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "6299", + "Type": { + "$id": "6300", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6301", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "6302", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6304", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "6305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6306", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "6307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6308", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "6309", + "kind": "constant", + "valueType": { + "$id": "6310", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "6311", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "950" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles", + "BufferResponse": true, + "Paging": { + "$id": "6312", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "6313", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "6314", + "kind": "http", + "name": "DataflowProfile_ListByResourceGroup", + "description": "DataflowProfile_ListByResourceGroup", + "filePath": "2025-04-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "6315", + "parameter": { + "$ref": "6297" + }, + "value": { + "$id": "6316", + "kind": "string", + "type": { + "$ref": "6298" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6317", + "parameter": { + "$ref": "6301" + }, + "value": { + "$id": "6318", + "kind": "string", + "type": { + "$ref": "6302" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6319", + "parameter": { + "$ref": "6304" + }, + "value": { + "$id": "6320", + "kind": "string", + "type": { + "$ref": "6305" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6321", + "parameter": { + "$ref": "6306" + }, + "value": { + "$id": "6322", + "kind": "string", + "type": { + "$ref": "6307" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "6323", + "response": { + "$ref": "6311" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6324", + "kind": "model", + "type": { + "$ref": "950" + }, + "value": { + "$id": "6325", + "value": { + "$id": "6326", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "6327", + "kind": "model", + "type": { + "$ref": "915" + }, + "value": { + "$id": "6328", + "properties": { + "$id": "6329", + "kind": "model", + "type": { + "$ref": "917" + }, + "value": { + "$id": "6330", + "diagnostics": { + "$id": "6331", + "kind": "model", + "type": { + "$ref": "919" + }, + "value": { + "$id": "6332", + "logs": { + "$id": "6333", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "6334", + "level": { + "$id": "6335", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "6336", + "kind": "model", + "type": { + "$ref": "929" + }, + "value": { + "$id": "6337", + "prometheusPort": { + "$id": "6338", + "kind": "number", + "type": { + "$ref": "931" + }, + "value": 7581 + } + } + } + } + }, + "instanceCount": { + "$id": "6339", + "kind": "number", + "type": { + "$ref": "939" + }, + "value": 14 + }, + "provisioningState": { + "$id": "6340", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6341", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6342", + "name": { + "$id": "6343", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6344", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6345", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6346", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6347", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6348", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "6349", + "createdBy": { + "$id": "6350", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6351", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "6352", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6353", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6354", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6355", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "6356", + "kind": "string", + "type": { + "$ref": "956" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "6357" + }, + "Parent": "IoTOperationsClient", + "Parameters": [ + { + "$id": "6358", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "6359", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "6360", + "Type": { + "$id": "6361", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile" + }, + { + "$id": "6362", + "Name": "Dataflow", + "Namespace": "Microsoft.IoTOperations", + "Operations": [ + { + "$id": "6363", + "Name": "get", + "ResourceName": "DataflowResource", + "Doc": "Get a DataflowResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "6364", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "6365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "6366", + "Type": { + "$id": "6367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6368", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "6369", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6370", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6371", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "6372", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6373", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "6374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6375", + "Name": "dataflowProfileName", + "NameInRequest": "dataflowProfileName", + "Doc": "Name of Instance dataflowProfile resource", + "Type": { + "$id": "6376", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6377", + "Name": "dataflowName", + "NameInRequest": "dataflowName", + "Doc": "Name of Instance dataflowProfile dataflow resource", + "Type": { + "$id": "6378", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6379", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "6380", + "kind": "constant", + "valueType": { + "$id": "6381", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "6382", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "758" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows/{dataflowName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow.get", + "Decorators": [], + "Examples": [ + { + "$id": "6383", + "kind": "http", + "name": "Dataflow_Get", + "description": "Dataflow_Get", + "filePath": "2025-04-01/Dataflow_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "6384", + "parameter": { + "$ref": "6364" + }, + "value": { + "$id": "6385", + "kind": "string", + "type": { + "$ref": "6365" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6386", + "parameter": { + "$ref": "6368" + }, + "value": { + "$id": "6387", + "kind": "string", + "type": { + "$ref": "6369" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6388", + "parameter": { + "$ref": "6371" + }, + "value": { + "$id": "6389", + "kind": "string", + "type": { + "$ref": "6372" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6390", + "parameter": { + "$ref": "6373" + }, + "value": { + "$id": "6391", + "kind": "string", + "type": { + "$ref": "6374" + }, + "value": "resource-name123" + } + }, + { + "$id": "6392", + "parameter": { + "$ref": "6375" + }, + "value": { + "$id": "6393", + "kind": "string", + "type": { + "$ref": "6376" + }, + "value": "resource-name123" + } + }, + { + "$id": "6394", + "parameter": { + "$ref": "6377" + }, + "value": { + "$id": "6395", + "kind": "string", + "type": { + "$ref": "6378" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "6396", + "response": { + "$ref": "6382" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6397", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "6398", + "properties": { + "$id": "6399", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "6400", + "mode": { + "$id": "6401", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6402", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "6403", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6404", + "operationType": { + "$id": "6405", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "6406", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "knnafvkwoeakm" + }, + "sourceSettings": { + "$id": "6407", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "6408", + "endpointRef": { + "$id": "6409", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "iixotodhvhkkfcfyrkoveslqig" + }, + "assetRef": { + "$id": "6410", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "zayyykwmckaocywdkohmu" + }, + "serializationFormat": { + "$id": "6411", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Json" + }, + "schemaRef": { + "$id": "6412", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "pknmdzqll" + }, + "dataSources": { + "$id": "6413", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "6414", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "chkkpymxhp" + } + ] + } + } + }, + "builtInTransformationSettings": { + "$id": "6415", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "6416", + "serializationFormat": { + "$id": "6417", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Delta" + }, + "schemaRef": { + "$id": "6418", + "kind": "string", + "type": { + "$ref": "805" + }, + "value": "mcdc" + }, + "datasets": { + "$id": "6419", + "kind": "array", + "type": { + "$ref": "809" + }, + "value": [ + { + "$id": "6420", + "kind": "model", + "type": { + "$ref": "810" + }, + "value": { + "$id": "6421", + "key": { + "$id": "6422", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "qsfqcgxaxnhfumrsdsokwyv" + }, + "description": { + "$id": "6423", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "schemaRef": { + "$id": "6424", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "n" + }, + "inputs": { + "$id": "6425", + "kind": "array", + "type": { + "$ref": "824" + }, + "value": [ + { + "$id": "6426", + "kind": "string", + "type": { + "$ref": "825" + }, + "value": "mosffpsslifkq" + } + ] + }, + "expression": { + "$id": "6427", + "kind": "string", + "type": { + "$ref": "829" + }, + "value": "aatbwomvflemsxialv" + } + } + } + ] + }, + "filter": { + "$id": "6428", + "kind": "array", + "type": { + "$ref": "835" + }, + "value": [ + { + "$id": "6429", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "6430", + "type": { + "$id": "6431", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Filter" + }, + "description": { + "$id": "6432", + "kind": "string", + "type": { + "$ref": "841" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "6433", + "kind": "array", + "type": { + "$ref": "845" + }, + "value": [ + { + "$id": "6434", + "kind": "string", + "type": { + "$ref": "846" + }, + "value": "sxmjkbntgb" + } + ] + }, + "expression": { + "$id": "6435", + "kind": "string", + "type": { + "$ref": "850" + }, + "value": "n" + } + } + } + ] + }, + "map": { + "$id": "6436", + "kind": "array", + "type": { + "$ref": "856" + }, + "value": [ + { + "$id": "6437", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6438", + "type": { + "$id": "6439", + "kind": "string", + "type": { + "$ref": "188" + }, + "value": "NewProperties" + }, + "description": { + "$id": "6440", + "kind": "string", + "type": { + "$ref": "862" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "6441", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6442", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "xsbxuk" + } + ] + }, + "expression": { + "$id": "6443", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "txoiltogsarwkzalsphvlmt" + }, + "output": { + "$id": "6444", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "nvgtmkfl" + } + } + } + ] + } + } + }, + "destinationSettings": { + "$id": "6445", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "6446", + "endpointRef": { + "$id": "6447", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "kybkchnzimerguekuvqlqiqdvvrt" + }, + "dataDestination": { + "$id": "6448", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "cbrh" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "6449", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6450", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6451", + "name": { + "$id": "6452", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6453", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6454", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "6455", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "6456", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "6457", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "6458", + "createdBy": { + "$id": "6459", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6460", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "6461", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6462", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6463", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6464", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "6465", + "Name": "createOrUpdate", + "ResourceName": "DataflowResource", + "Doc": "Create a DataflowResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "6466", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "6467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "6468", + "Type": { + "$id": "6469", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6470", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "6471", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6472", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6473", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "6474", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6475", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "6476", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6477", + "Name": "dataflowProfileName", + "NameInRequest": "dataflowProfileName", + "Doc": "Name of Instance dataflowProfile resource", + "Type": { + "$id": "6478", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6479", + "Name": "dataflowName", + "NameInRequest": "dataflowName", + "Doc": "Name of Instance dataflowProfile dataflow resource", + "Type": { + "$id": "6480", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6481", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "6482", + "kind": "constant", + "valueType": { + "$id": "6483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6484", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "6485", + "kind": "constant", + "valueType": { + "$id": "6486", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "6487", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "758" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "6488", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "758" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "6489", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "758" + }, + "Headers": [ + { + "$id": "6490", + "Name": "azureAsyncOperation", + "NameInResponse": "Azure-AsyncOperation", + "Doc": "A link to the status monitor", + "Type": { + "$id": "6491", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "6492", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "6493", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows/{dataflowName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "6494", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "6495", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "758" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow.createOrUpdate", + "Decorators": [], + "Examples": [ + { + "$id": "6496", + "kind": "http", + "name": "Dataflow_CreateOrUpdate_ComplexContextualization", + "description": "Dataflow_CreateOrUpdate_ComplexContextualization", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_ComplexContextualization.json", + "parameters": [ + { + "$id": "6497", + "parameter": { + "$ref": "6466" + }, + "value": { + "$id": "6498", + "kind": "string", + "type": { + "$ref": "6467" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6499", + "parameter": { + "$ref": "6470" + }, + "value": { + "$id": "6500", + "kind": "string", + "type": { + "$ref": "6471" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6501", + "parameter": { + "$ref": "6473" + }, + "value": { + "$id": "6502", + "kind": "string", + "type": { + "$ref": "6474" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6503", + "parameter": { + "$ref": "6475" + }, + "value": { + "$id": "6504", + "kind": "string", + "type": { + "$ref": "6476" + }, + "value": "resource-name123" + } + }, + { + "$id": "6505", + "parameter": { + "$ref": "6477" + }, + "value": { + "$id": "6506", + "kind": "string", + "type": { + "$ref": "6478" + }, + "value": "resource-name123" + } + }, + { + "$id": "6507", + "parameter": { + "$ref": "6479" + }, + "value": { + "$id": "6508", + "kind": "string", + "type": { + "$ref": "6480" + }, + "value": "aio-to-adx-contexualized" + } + }, + { + "$id": "6509", + "parameter": { + "$ref": "6487" + }, + "value": { + "$id": "6510", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "6511", + "properties": { + "$id": "6512", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "6513", + "mode": { + "$id": "6514", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6515", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "6516", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6517", + "operationType": { + "$id": "6518", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "6519", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6520", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "6521", + "endpointRef": { + "$id": "6522", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6523", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "6524", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6525", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6526", + "operationType": { + "$id": "6527", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6528", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "6529", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "6530", + "map": { + "$id": "6531", + "kind": "array", + "type": { + "$ref": "856" + }, + "value": [ + { + "$id": "6532", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6533", + "inputs": { + "$id": "6534", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6535", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6536", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "*" + } + } + }, + { + "$id": "6537", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6538", + "inputs": { + "$id": "6539", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6540", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "$context(quality).*" + } + ] + }, + "output": { + "$id": "6541", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "enriched.*" + } + } + } + ] + }, + "datasets": { + "$id": "6542", + "kind": "array", + "type": { + "$ref": "809" + }, + "value": [ + { + "$id": "6543", + "kind": "model", + "type": { + "$ref": "810" + }, + "value": { + "$id": "6544", + "key": { + "$id": "6545", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "quality" + }, + "inputs": { + "$id": "6546", + "kind": "array", + "type": { + "$ref": "824" + }, + "value": [ + { + "$id": "6547", + "kind": "string", + "type": { + "$ref": "825" + }, + "value": "$source.country" + }, + { + "$id": "6548", + "kind": "string", + "type": { + "$ref": "825" + }, + "value": "$context.country" + } + ] + }, + "expression": { + "$id": "6549", + "kind": "string", + "type": { + "$ref": "829" + }, + "value": "$1 == $2" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6550", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6551", + "operationType": { + "$id": "6552", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Destination" + }, + "name": { + "$id": "6553", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6554", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "6555", + "endpointRef": { + "$id": "6556", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "adx-endpoint" + }, + "dataDestination": { + "$id": "6557", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "mytable" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "6558", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6559", + "name": { + "$id": "6560", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6561", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6562", + "response": { + "$ref": "6488" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6563", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "6564", + "properties": { + "$id": "6565", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "6566", + "mode": { + "$id": "6567", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6568", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "6569", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6570", + "operationType": { + "$id": "6571", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "6572", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6573", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "6574", + "endpointRef": { + "$id": "6575", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6576", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "6577", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6578", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6579", + "operationType": { + "$id": "6580", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6581", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "6582", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "6583", + "map": { + "$id": "6584", + "kind": "array", + "type": { + "$ref": "856" + }, + "value": [ + { + "$id": "6585", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6586", + "inputs": { + "$id": "6587", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6588", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6589", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "*" + } + } + }, + { + "$id": "6590", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6591", + "inputs": { + "$id": "6592", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6593", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "$context(quality).*" + } + ] + }, + "output": { + "$id": "6594", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "enriched.*" + } + } + } + ] + }, + "datasets": { + "$id": "6595", + "kind": "array", + "type": { + "$ref": "809" + }, + "value": [ + { + "$id": "6596", + "kind": "model", + "type": { + "$ref": "810" + }, + "value": { + "$id": "6597", + "key": { + "$id": "6598", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "quality" + }, + "inputs": { + "$id": "6599", + "kind": "array", + "type": { + "$ref": "824" + }, + "value": [ + { + "$id": "6600", + "kind": "string", + "type": { + "$ref": "825" + }, + "value": "$source.country" + }, + { + "$id": "6601", + "kind": "string", + "type": { + "$ref": "825" + }, + "value": "$context.country" + } + ] + }, + "expression": { + "$id": "6602", + "kind": "string", + "type": { + "$ref": "829" + }, + "value": "$1 == $2" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6603", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6604", + "operationType": { + "$id": "6605", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Destination" + }, + "name": { + "$id": "6606", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6607", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "6608", + "endpointRef": { + "$id": "6609", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "adx-endpoint" + }, + "dataDestination": { + "$id": "6610", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "mytable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "6611", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6612", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6613", + "name": { + "$id": "6614", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6615", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6616", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "6617", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "6618", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "6619", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "6620", + "createdBy": { + "$id": "6621", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6622", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "6623", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6624", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6625", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6626", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "6627", + "response": { + "$ref": "6489" + }, + "statusCode": 201, + "bodyValue": { + "$id": "6628", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "6629", + "properties": { + "$id": "6630", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "6631", + "mode": { + "$id": "6632", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6633", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "6634", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6635", + "operationType": { + "$id": "6636", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "6637", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6638", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "6639", + "endpointRef": { + "$id": "6640", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6641", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "6642", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6643", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6644", + "operationType": { + "$id": "6645", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6646", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "6647", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "6648", + "map": { + "$id": "6649", + "kind": "array", + "type": { + "$ref": "856" + }, + "value": [ + { + "$id": "6650", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6651", + "inputs": { + "$id": "6652", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6653", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6654", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "*" + } + } + }, + { + "$id": "6655", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6656", + "inputs": { + "$id": "6657", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6658", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "$context(quality).*" + } + ] + }, + "output": { + "$id": "6659", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "enriched.*" + } + } + } + ] + }, + "datasets": { + "$id": "6660", + "kind": "array", + "type": { + "$ref": "809" + }, + "value": [ + { + "$id": "6661", + "kind": "model", + "type": { + "$ref": "810" + }, + "value": { + "$id": "6662", + "key": { + "$id": "6663", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "quality" + }, + "inputs": { + "$id": "6664", + "kind": "array", + "type": { + "$ref": "824" + }, + "value": [ + { + "$id": "6665", + "kind": "string", + "type": { + "$ref": "825" + }, + "value": "$source.country" + }, + { + "$id": "6666", + "kind": "string", + "type": { + "$ref": "825" + }, + "value": "$context.country" + } + ] + }, + "expression": { + "$id": "6667", + "kind": "string", + "type": { + "$ref": "829" + }, + "value": "$1 == $2" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6668", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6669", + "operationType": { + "$id": "6670", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Destination" + }, + "name": { + "$id": "6671", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6672", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "6673", + "endpointRef": { + "$id": "6674", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "adx-endpoint" + }, + "dataDestination": { + "$id": "6675", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "mytable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "6676", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6677", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6678", + "name": { + "$id": "6679", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6680", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6681", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "6682", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "6683", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "6684", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "6685", + "createdBy": { + "$id": "6686", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6687", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "6688", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6689", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6690", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6691", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "6692", + "kind": "http", + "name": "Dataflow_CreateOrUpdate_ComplexEventHub", + "description": "Dataflow_CreateOrUpdate_ComplexEventHub", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_ComplexEventHub.json", + "parameters": [ + { + "$id": "6693", + "parameter": { + "$ref": "6466" + }, + "value": { + "$id": "6694", + "kind": "string", + "type": { + "$ref": "6467" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6695", + "parameter": { + "$ref": "6470" + }, + "value": { + "$id": "6696", + "kind": "string", + "type": { + "$ref": "6471" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6697", + "parameter": { + "$ref": "6473" + }, + "value": { + "$id": "6698", + "kind": "string", + "type": { + "$ref": "6474" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6699", + "parameter": { + "$ref": "6475" + }, + "value": { + "$id": "6700", + "kind": "string", + "type": { + "$ref": "6476" + }, + "value": "resource-name123" + } + }, + { + "$id": "6701", + "parameter": { + "$ref": "6477" + }, + "value": { + "$id": "6702", + "kind": "string", + "type": { + "$ref": "6478" + }, + "value": "resource-name123" + } + }, + { + "$id": "6703", + "parameter": { + "$ref": "6479" + }, + "value": { + "$id": "6704", + "kind": "string", + "type": { + "$ref": "6480" + }, + "value": "aio-to-event-hub-transformed" + } + }, + { + "$id": "6705", + "parameter": { + "$ref": "6487" + }, + "value": { + "$id": "6706", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "6707", + "properties": { + "$id": "6708", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "6709", + "mode": { + "$id": "6710", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6711", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "6712", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6713", + "operationType": { + "$id": "6714", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "6715", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6716", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "6717", + "endpointRef": { + "$id": "6718", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6719", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "6720", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6721", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6722", + "operationType": { + "$id": "6723", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "BuiltInTransformation" + }, + "builtInTransformationSettings": { + "$id": "6724", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "6725", + "filter": { + "$id": "6726", + "kind": "array", + "type": { + "$ref": "835" + }, + "value": [ + { + "$id": "6727", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "6728", + "inputs": { + "$id": "6729", + "kind": "array", + "type": { + "$ref": "845" + }, + "value": [ + { + "$id": "6730", + "kind": "string", + "type": { + "$ref": "846" + }, + "value": "temperature.Value" + }, + { + "$id": "6731", + "kind": "string", + "type": { + "$ref": "846" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "6732", + "kind": "string", + "type": { + "$ref": "850" + }, + "value": "$1 > 9000 && $2 >= 8000" + } + } + } + ] + }, + "map": { + "$id": "6733", + "kind": "array", + "type": { + "$ref": "856" + }, + "value": [ + { + "$id": "6734", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6735", + "inputs": { + "$id": "6736", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6737", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6738", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "*" + } + } + }, + { + "$id": "6739", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6740", + "inputs": { + "$id": "6741", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6742", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "temperature.Value" + }, + { + "$id": "6743", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "6744", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "($1+$2)/2" + }, + "output": { + "$id": "6745", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "AvgTemp.Value" + } + } + }, + { + "$id": "6746", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6747", + "inputs": { + "$id": "6748", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [] + }, + "expression": { + "$id": "6749", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "true" + }, + "output": { + "$id": "6750", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "dataflow-processed" + } + } + }, + { + "$id": "6751", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6752", + "inputs": { + "$id": "6753", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6754", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "temperature.SourceTimestamp" + } + ] + }, + "expression": { + "$id": "6755", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "" + }, + "output": { + "$id": "6756", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "" + } + } + }, + { + "$id": "6757", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6758", + "inputs": { + "$id": "6759", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6760", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "\"Tag 10\"" + } + ] + }, + "expression": { + "$id": "6761", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "" + }, + "output": { + "$id": "6762", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "pressure" + } + } + }, + { + "$id": "6763", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6764", + "inputs": { + "$id": "6765", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6766", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "temperature.Value" + } + ] + }, + "expression": { + "$id": "6767", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "cToF($1)" + }, + "output": { + "$id": "6768", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "temperatureF.Value" + } + } + }, + { + "$id": "6769", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6770", + "inputs": { + "$id": "6771", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6772", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "6773", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "scale ($1,0,10,0,100)" + }, + "output": { + "$id": "6774", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "\"Scale Tag 10\".Value" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6775", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6776", + "operationType": { + "$id": "6777", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Destination" + }, + "name": { + "$id": "6778", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6779", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "6780", + "endpointRef": { + "$id": "6781", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "event-hub-endpoint" + }, + "dataDestination": { + "$id": "6782", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "myuniqueeventhub" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "6783", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6784", + "name": { + "$id": "6785", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6786", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6787", + "response": { + "$ref": "6488" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6788", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "6789", + "properties": { + "$id": "6790", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "6791", + "mode": { + "$id": "6792", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6793", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "6794", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6795", + "operationType": { + "$id": "6796", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "6797", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6798", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "6799", + "endpointRef": { + "$id": "6800", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6801", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "6802", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6803", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6804", + "operationType": { + "$id": "6805", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6806", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "6807", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "6808", + "map": { + "$id": "6809", + "kind": "array", + "type": { + "$ref": "856" + }, + "value": [ + { + "$id": "6810", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6811", + "inputs": { + "$id": "6812", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6813", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6814", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "*" + } + } + }, + { + "$id": "6815", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6816", + "inputs": { + "$id": "6817", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6818", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "$context(quality).*" + } + ] + }, + "output": { + "$id": "6819", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "enriched.*" + } + } + } + ] + }, + "datasets": { + "$id": "6820", + "kind": "array", + "type": { + "$ref": "809" + }, + "value": [ + { + "$id": "6821", + "kind": "model", + "type": { + "$ref": "810" + }, + "value": { + "$id": "6822", + "key": { + "$id": "6823", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "quality" + }, + "inputs": { + "$id": "6824", + "kind": "array", + "type": { + "$ref": "824" + }, + "value": [ + { + "$id": "6825", + "kind": "string", + "type": { + "$ref": "825" + }, + "value": "$source.country" + }, + { + "$id": "6826", + "kind": "string", + "type": { + "$ref": "825" + }, + "value": "$context.country" + } + ] + }, + "expression": { + "$id": "6827", + "kind": "string", + "type": { + "$ref": "829" + }, + "value": "$1 == $2" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6828", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6829", + "operationType": { + "$id": "6830", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Destination" + }, + "name": { + "$id": "6831", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6832", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "6833", + "endpointRef": { + "$id": "6834", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "adx-endpoint" + }, + "dataDestination": { + "$id": "6835", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "mytable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "6836", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6837", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6838", + "name": { + "$id": "6839", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6840", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6841", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "6842", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "6843", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "6844", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "6845", + "createdBy": { + "$id": "6846", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6847", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "6848", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6849", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6850", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6851", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "6852", + "response": { + "$ref": "6489" + }, + "statusCode": 201, + "bodyValue": { + "$id": "6853", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "6854", + "properties": { + "$id": "6855", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "6856", + "mode": { + "$id": "6857", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6858", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "6859", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6860", + "operationType": { + "$id": "6861", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "6862", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6863", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "6864", + "endpointRef": { + "$id": "6865", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6866", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "6867", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6868", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6869", + "operationType": { + "$id": "6870", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6871", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "6872", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "6873", + "map": { + "$id": "6874", + "kind": "array", + "type": { + "$ref": "856" + }, + "value": [ + { + "$id": "6875", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6876", + "inputs": { + "$id": "6877", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6878", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6879", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "*" + } + } + }, + { + "$id": "6880", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6881", + "inputs": { + "$id": "6882", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6883", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "$context(quality).*" + } + ] + }, + "output": { + "$id": "6884", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "enriched.*" + } + } + } + ] + }, + "datasets": { + "$id": "6885", + "kind": "array", + "type": { + "$ref": "809" + }, + "value": [ + { + "$id": "6886", + "kind": "model", + "type": { + "$ref": "810" + }, + "value": { + "$id": "6887", + "key": { + "$id": "6888", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "quality" + }, + "inputs": { + "$id": "6889", + "kind": "array", + "type": { + "$ref": "824" + }, + "value": [ + { + "$id": "6890", + "kind": "string", + "type": { + "$ref": "825" + }, + "value": "$source.country" + }, + { + "$id": "6891", + "kind": "string", + "type": { + "$ref": "825" + }, + "value": "$context.country" + } + ] + }, + "expression": { + "$id": "6892", + "kind": "string", + "type": { + "$ref": "829" + }, + "value": "$1 == $2" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6893", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6894", + "operationType": { + "$id": "6895", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Destination" + }, + "name": { + "$id": "6896", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6897", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "6898", + "endpointRef": { + "$id": "6899", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "adx-endpoint" + }, + "dataDestination": { + "$id": "6900", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "mytable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "6901", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6902", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6903", + "name": { + "$id": "6904", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6905", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6906", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "6907", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "6908", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "6909", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "6910", + "createdBy": { + "$id": "6911", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6912", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "6913", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6914", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6915", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6916", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "6917", + "kind": "http", + "name": "Dataflow_CreateOrUpdate_FilterToTopic", + "description": "Dataflow_CreateOrUpdate_FilterToTopic", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_FilterToTopic.json", + "parameters": [ + { + "$id": "6918", + "parameter": { + "$ref": "6466" + }, + "value": { + "$id": "6919", + "kind": "string", + "type": { + "$ref": "6467" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6920", + "parameter": { + "$ref": "6470" + }, + "value": { + "$id": "6921", + "kind": "string", + "type": { + "$ref": "6471" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6922", + "parameter": { + "$ref": "6473" + }, + "value": { + "$id": "6923", + "kind": "string", + "type": { + "$ref": "6474" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6924", + "parameter": { + "$ref": "6475" + }, + "value": { + "$id": "6925", + "kind": "string", + "type": { + "$ref": "6476" + }, + "value": "resource-name123" + } + }, + { + "$id": "6926", + "parameter": { + "$ref": "6477" + }, + "value": { + "$id": "6927", + "kind": "string", + "type": { + "$ref": "6478" + }, + "value": "resource-name123" + } + }, + { + "$id": "6928", + "parameter": { + "$ref": "6479" + }, + "value": { + "$id": "6929", + "kind": "string", + "type": { + "$ref": "6480" + }, + "value": "mqtt-filter-to-topic" + } + }, + { + "$id": "6930", + "parameter": { + "$ref": "6487" + }, + "value": { + "$id": "6931", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "6932", + "properties": { + "$id": "6933", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "6934", + "mode": { + "$id": "6935", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6936", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "6937", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6938", + "operationType": { + "$id": "6939", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "6940", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6941", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "6942", + "endpointRef": { + "$id": "6943", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6944", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "6945", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6946", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6947", + "operationType": { + "$id": "6948", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6949", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "6950", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "6951", + "filter": { + "$id": "6952", + "kind": "array", + "type": { + "$ref": "835" + }, + "value": [ + { + "$id": "6953", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "6954", + "type": { + "$id": "6955", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Filter" + }, + "description": { + "$id": "6956", + "kind": "string", + "type": { + "$ref": "841" + }, + "value": "filter-datapoint" + }, + "inputs": { + "$id": "6957", + "kind": "array", + "type": { + "$ref": "845" + }, + "value": [ + { + "$id": "6958", + "kind": "string", + "type": { + "$ref": "846" + }, + "value": "temperature.Value" + }, + { + "$id": "6959", + "kind": "string", + "type": { + "$ref": "846" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "6960", + "kind": "string", + "type": { + "$ref": "850" + }, + "value": "$1 > 9000 && $2 >= 8000" + } + } + } + ] + }, + "map": { + "$id": "6961", + "kind": "array", + "type": { + "$ref": "856" + }, + "value": [ + { + "$id": "6962", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "6963", + "type": { + "$id": "6964", + "kind": "string", + "type": { + "$ref": "188" + }, + "value": "PassThrough" + }, + "inputs": { + "$id": "6965", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "6966", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6967", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "*" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6968", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6969", + "operationType": { + "$id": "6970", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Destination" + }, + "name": { + "$id": "6971", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6972", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "6973", + "endpointRef": { + "$id": "6974", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataDestination": { + "$id": "6975", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "data/filtered/thermostat" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "6976", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "6977", + "name": { + "$id": "6978", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6979", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6980", + "response": { + "$ref": "6488" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6981", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "6982", + "properties": { + "$id": "6983", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "6984", + "mode": { + "$id": "6985", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6986", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "6987", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6988", + "operationType": { + "$id": "6989", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "6990", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6991", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "6992", + "endpointRef": { + "$id": "6993", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6994", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "6995", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6996", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "6997", + "operationType": { + "$id": "6998", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6999", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "7000", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "7001", + "filter": { + "$id": "7002", + "kind": "array", + "type": { + "$ref": "835" + }, + "value": [ + { + "$id": "7003", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "7004", + "type": { + "$id": "7005", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Filter" + }, + "description": { + "$id": "7006", + "kind": "string", + "type": { + "$ref": "841" + }, + "value": "filter-datapoint" + }, + "inputs": { + "$id": "7007", + "kind": "array", + "type": { + "$ref": "845" + }, + "value": [ + { + "$id": "7008", + "kind": "string", + "type": { + "$ref": "846" + }, + "value": "temperature.Value" + }, + { + "$id": "7009", + "kind": "string", + "type": { + "$ref": "846" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "7010", + "kind": "string", + "type": { + "$ref": "850" + }, + "value": "$1 > 9000 && $2 >= 8000" + } + } + } + ] + }, + "map": { + "$id": "7011", + "kind": "array", + "type": { + "$ref": "856" + }, + "value": [ + { + "$id": "7012", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "7013", + "type": { + "$id": "7014", + "kind": "string", + "type": { + "$ref": "188" + }, + "value": "PassThrough" + }, + "inputs": { + "$id": "7015", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "7016", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "7017", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "*" + } + } + } + ] + } + } + } + } + }, + { + "$id": "7018", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7019", + "operationType": { + "$id": "7020", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Destination" + }, + "name": { + "$id": "7021", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7022", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "7023", + "endpointRef": { + "$id": "7024", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataDestination": { + "$id": "7025", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "data/filtered/thermostat" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7026", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7027", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "7028", + "name": { + "$id": "7029", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7030", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7031", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7032", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7033", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7034", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "7035", + "createdBy": { + "$id": "7036", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7037", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "7038", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7039", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7040", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7041", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "7042", + "response": { + "$ref": "6489" + }, + "statusCode": 201, + "bodyValue": { + "$id": "7043", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "7044", + "properties": { + "$id": "7045", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "7046", + "mode": { + "$id": "7047", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7048", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "7049", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7050", + "operationType": { + "$id": "7051", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "7052", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7053", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "7054", + "endpointRef": { + "$id": "7055", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7056", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "7057", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7058", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7059", + "operationType": { + "$id": "7060", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "7061", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "7062", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "7063", + "filter": { + "$id": "7064", + "kind": "array", + "type": { + "$ref": "835" + }, + "value": [ + { + "$id": "7065", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "7066", + "type": { + "$id": "7067", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Filter" + }, + "description": { + "$id": "7068", + "kind": "string", + "type": { + "$ref": "841" + }, + "value": "filter-datapoint" + }, + "inputs": { + "$id": "7069", + "kind": "array", + "type": { + "$ref": "845" + }, + "value": [ + { + "$id": "7070", + "kind": "string", + "type": { + "$ref": "846" + }, + "value": "temperature.Value" + }, + { + "$id": "7071", + "kind": "string", + "type": { + "$ref": "846" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "7072", + "kind": "string", + "type": { + "$ref": "850" + }, + "value": "$1 > 9000 && $2 >= 8000" + } + } + } + ] + }, + "map": { + "$id": "7073", + "kind": "array", + "type": { + "$ref": "856" + }, + "value": [ + { + "$id": "7074", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "7075", + "type": { + "$id": "7076", + "kind": "string", + "type": { + "$ref": "188" + }, + "value": "PassThrough" + }, + "inputs": { + "$id": "7077", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "7078", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "7079", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "*" + } + } + } + ] + } + } + } + } + }, + { + "$id": "7080", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7081", + "operationType": { + "$id": "7082", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Destination" + }, + "name": { + "$id": "7083", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7084", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "7085", + "endpointRef": { + "$id": "7086", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataDestination": { + "$id": "7087", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "data/filtered/thermostat" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7088", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7089", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "7090", + "name": { + "$id": "7091", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7092", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7093", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7094", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7095", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7096", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "7097", + "createdBy": { + "$id": "7098", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7099", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "7100", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7101", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7102", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7103", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "7104", + "kind": "http", + "name": "Dataflow_CreateOrUpdate", + "description": "Dataflow_CreateOrUpdate", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "7105", + "parameter": { + "$ref": "6466" + }, + "value": { + "$id": "7106", + "kind": "string", + "type": { + "$ref": "6467" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7107", + "parameter": { + "$ref": "6470" + }, + "value": { + "$id": "7108", + "kind": "string", + "type": { + "$ref": "6471" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7109", + "parameter": { + "$ref": "6473" + }, + "value": { + "$id": "7110", + "kind": "string", + "type": { + "$ref": "6474" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7111", + "parameter": { + "$ref": "6475" + }, + "value": { + "$id": "7112", + "kind": "string", + "type": { + "$ref": "6476" + }, + "value": "resource-name123" + } + }, + { + "$id": "7113", + "parameter": { + "$ref": "6477" + }, + "value": { + "$id": "7114", + "kind": "string", + "type": { + "$ref": "6478" + }, + "value": "resource-name123" + } + }, + { + "$id": "7115", + "parameter": { + "$ref": "6479" + }, + "value": { + "$id": "7116", + "kind": "string", + "type": { + "$ref": "6480" + }, + "value": "resource-name123" + } + }, + { + "$id": "7117", + "parameter": { + "$ref": "6487" + }, + "value": { + "$id": "7118", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "7119", + "properties": { + "$id": "7120", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "7121", + "mode": { + "$id": "7122", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7123", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "7124", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7125", + "operationType": { + "$id": "7126", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "7127", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "knnafvkwoeakm" + }, + "sourceSettings": { + "$id": "7128", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "7129", + "endpointRef": { + "$id": "7130", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "iixotodhvhkkfcfyrkoveslqig" + }, + "assetRef": { + "$id": "7131", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "zayyykwmckaocywdkohmu" + }, + "serializationFormat": { + "$id": "7132", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Json" + }, + "schemaRef": { + "$id": "7133", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "pknmdzqll" + }, + "dataSources": { + "$id": "7134", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "7135", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "chkkpymxhp" + } + ] + } + } + }, + "builtInTransformationSettings": { + "$id": "7136", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "7137", + "serializationFormat": { + "$id": "7138", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Delta" + }, + "schemaRef": { + "$id": "7139", + "kind": "string", + "type": { + "$ref": "805" + }, + "value": "mcdc" + }, + "datasets": { + "$id": "7140", + "kind": "array", + "type": { + "$ref": "809" + }, + "value": [ + { + "$id": "7141", + "kind": "model", + "type": { + "$ref": "810" + }, + "value": { + "$id": "7142", + "key": { + "$id": "7143", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "qsfqcgxaxnhfumrsdsokwyv" + }, + "description": { + "$id": "7144", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "schemaRef": { + "$id": "7145", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "n" + }, + "inputs": { + "$id": "7146", + "kind": "array", + "type": { + "$ref": "824" + }, + "value": [ + { + "$id": "7147", + "kind": "string", + "type": { + "$ref": "825" + }, + "value": "mosffpsslifkq" + } + ] + }, + "expression": { + "$id": "7148", + "kind": "string", + "type": { + "$ref": "829" + }, + "value": "aatbwomvflemsxialv" + } + } + } + ] + }, + "filter": { + "$id": "7149", + "kind": "array", + "type": { + "$ref": "835" + }, + "value": [ + { + "$id": "7150", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "7151", + "type": { + "$id": "7152", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Filter" + }, + "description": { + "$id": "7153", + "kind": "string", + "type": { + "$ref": "841" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7154", + "kind": "array", + "type": { + "$ref": "845" + }, + "value": [ + { + "$id": "7155", + "kind": "string", + "type": { + "$ref": "846" + }, + "value": "sxmjkbntgb" + } + ] + }, + "expression": { + "$id": "7156", + "kind": "string", + "type": { + "$ref": "850" + }, + "value": "n" + } + } + } + ] + }, + "map": { + "$id": "7157", + "kind": "array", + "type": { + "$ref": "856" + }, + "value": [ + { + "$id": "7158", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "7159", + "type": { + "$id": "7160", + "kind": "string", + "type": { + "$ref": "188" + }, + "value": "NewProperties" + }, + "description": { + "$id": "7161", + "kind": "string", + "type": { + "$ref": "862" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7162", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "7163", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "xsbxuk" + } + ] + }, + "expression": { + "$id": "7164", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "txoiltogsarwkzalsphvlmt" + }, + "output": { + "$id": "7165", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "nvgtmkfl" + } + } + } + ] + } + } + }, + "destinationSettings": { + "$id": "7166", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "7167", + "endpointRef": { + "$id": "7168", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "kybkchnzimerguekuvqlqiqdvvrt" + }, + "dataDestination": { + "$id": "7169", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "cbrh" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "7170", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "7171", + "name": { + "$id": "7172", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7173", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "7174", + "response": { + "$ref": "6488" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7175", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "7176", + "properties": { + "$id": "7177", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "7178", + "mode": { + "$id": "7179", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7180", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "7181", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7182", + "operationType": { + "$id": "7183", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "7184", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "knnafvkwoeakm" + }, + "sourceSettings": { + "$id": "7185", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "7186", + "endpointRef": { + "$id": "7187", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "iixotodhvhkkfcfyrkoveslqig" + }, + "assetRef": { + "$id": "7188", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "zayyykwmckaocywdkohmu" + }, + "serializationFormat": { + "$id": "7189", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Json" + }, + "schemaRef": { + "$id": "7190", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "pknmdzqll" + }, + "dataSources": { + "$id": "7191", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "7192", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "chkkpymxhp" + } + ] + } + } + }, + "builtInTransformationSettings": { + "$id": "7193", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "7194", + "serializationFormat": { + "$id": "7195", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Delta" + }, + "schemaRef": { + "$id": "7196", + "kind": "string", + "type": { + "$ref": "805" + }, + "value": "mcdc" + }, + "datasets": { + "$id": "7197", + "kind": "array", + "type": { + "$ref": "809" + }, + "value": [ + { + "$id": "7198", + "kind": "model", + "type": { + "$ref": "810" + }, + "value": { + "$id": "7199", + "key": { + "$id": "7200", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "qsfqcgxaxnhfumrsdsokwyv" + }, + "description": { + "$id": "7201", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "schemaRef": { + "$id": "7202", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "n" + }, + "inputs": { + "$id": "7203", + "kind": "array", + "type": { + "$ref": "824" + }, + "value": [ + { + "$id": "7204", + "kind": "string", + "type": { + "$ref": "825" + }, + "value": "mosffpsslifkq" + } + ] + }, + "expression": { + "$id": "7205", + "kind": "string", + "type": { + "$ref": "829" + }, + "value": "aatbwomvflemsxialv" + } + } + } + ] + }, + "filter": { + "$id": "7206", + "kind": "array", + "type": { + "$ref": "835" + }, + "value": [ + { + "$id": "7207", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "7208", + "type": { + "$id": "7209", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Filter" + }, + "description": { + "$id": "7210", + "kind": "string", + "type": { + "$ref": "841" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7211", + "kind": "array", + "type": { + "$ref": "845" + }, + "value": [ + { + "$id": "7212", + "kind": "string", + "type": { + "$ref": "846" + }, + "value": "sxmjkbntgb" + } + ] + }, + "expression": { + "$id": "7213", + "kind": "string", + "type": { + "$ref": "850" + }, + "value": "n" + } + } + } + ] + }, + "map": { + "$id": "7214", + "kind": "array", + "type": { + "$ref": "856" + }, + "value": [ + { + "$id": "7215", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "7216", + "type": { + "$id": "7217", + "kind": "string", + "type": { + "$ref": "188" + }, + "value": "NewProperties" + }, + "description": { + "$id": "7218", + "kind": "string", + "type": { + "$ref": "862" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7219", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "7220", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "xsbxuk" + } + ] + }, + "expression": { + "$id": "7221", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "txoiltogsarwkzalsphvlmt" + }, + "output": { + "$id": "7222", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "nvgtmkfl" + } + } + } + ] + } + } + }, + "destinationSettings": { + "$id": "7223", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "7224", + "endpointRef": { + "$id": "7225", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "kybkchnzimerguekuvqlqiqdvvrt" + }, + "dataDestination": { + "$id": "7226", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "cbrh" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7227", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7228", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "7229", + "name": { + "$id": "7230", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7231", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7232", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7233", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7234", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7235", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "7236", + "createdBy": { + "$id": "7237", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7238", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "7239", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7240", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7241", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7242", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "7243", + "response": { + "$ref": "6489" + }, + "statusCode": 201, + "bodyValue": { + "$id": "7244", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "7245", + "properties": { + "$id": "7246", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "7247", + "mode": { + "$id": "7248", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7249", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "7250", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7251", + "operationType": { + "$id": "7252", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "7253", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "knnafvkwoeakm" + }, + "sourceSettings": { + "$id": "7254", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "7255", + "endpointRef": { + "$id": "7256", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "iixotodhvhkkfcfyrkoveslqig" + }, + "assetRef": { + "$id": "7257", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "zayyykwmckaocywdkohmu" + }, + "serializationFormat": { + "$id": "7258", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Json" + }, + "schemaRef": { + "$id": "7259", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "pknmdzqll" + }, + "dataSources": { + "$id": "7260", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "7261", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "chkkpymxhp" + } + ] + } + } + }, + "builtInTransformationSettings": { + "$id": "7262", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "7263", + "serializationFormat": { + "$id": "7264", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Delta" + }, + "schemaRef": { + "$id": "7265", + "kind": "string", + "type": { + "$ref": "805" + }, + "value": "mcdc" + }, + "datasets": { + "$id": "7266", + "kind": "array", + "type": { + "$ref": "809" + }, + "value": [ + { + "$id": "7267", + "kind": "model", + "type": { + "$ref": "810" + }, + "value": { + "$id": "7268", + "key": { + "$id": "7269", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "qsfqcgxaxnhfumrsdsokwyv" + }, + "description": { + "$id": "7270", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "schemaRef": { + "$id": "7271", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "n" + }, + "inputs": { + "$id": "7272", + "kind": "array", + "type": { + "$ref": "824" + }, + "value": [ + { + "$id": "7273", + "kind": "string", + "type": { + "$ref": "825" + }, + "value": "mosffpsslifkq" + } + ] + }, + "expression": { + "$id": "7274", + "kind": "string", + "type": { + "$ref": "829" + }, + "value": "aatbwomvflemsxialv" + } + } + } + ] + }, + "filter": { + "$id": "7275", + "kind": "array", + "type": { + "$ref": "835" + }, + "value": [ + { + "$id": "7276", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "7277", + "type": { + "$id": "7278", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Filter" + }, + "description": { + "$id": "7279", + "kind": "string", + "type": { + "$ref": "841" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7280", + "kind": "array", + "type": { + "$ref": "845" + }, + "value": [ + { + "$id": "7281", + "kind": "string", + "type": { + "$ref": "846" + }, + "value": "sxmjkbntgb" + } + ] + }, + "expression": { + "$id": "7282", + "kind": "string", + "type": { + "$ref": "850" + }, + "value": "n" + } + } + } + ] + }, + "map": { + "$id": "7283", + "kind": "array", + "type": { + "$ref": "856" + }, + "value": [ + { + "$id": "7284", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "7285", + "type": { + "$id": "7286", + "kind": "string", + "type": { + "$ref": "188" + }, + "value": "NewProperties" + }, + "description": { + "$id": "7287", + "kind": "string", + "type": { + "$ref": "862" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7288", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "7289", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "xsbxuk" + } + ] + }, + "expression": { + "$id": "7290", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "txoiltogsarwkzalsphvlmt" + }, + "output": { + "$id": "7291", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "nvgtmkfl" + } + } + } + ] + } + } + }, + "destinationSettings": { + "$id": "7292", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "7293", + "endpointRef": { + "$id": "7294", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "kybkchnzimerguekuvqlqiqdvvrt" + }, + "dataDestination": { + "$id": "7295", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "cbrh" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7296", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7297", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "7298", + "name": { + "$id": "7299", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7300", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7301", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7302", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7303", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7304", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "7305", + "createdBy": { + "$id": "7306", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7307", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "7308", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7309", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7310", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7311", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "7312", + "kind": "http", + "name": "Dataflow_CreateOrUpdate_SimpleEventGrid", + "description": "Dataflow_CreateOrUpdate_SimpleEventGrid", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json", + "parameters": [ + { + "$id": "7313", + "parameter": { + "$ref": "6466" + }, + "value": { + "$id": "7314", + "kind": "string", + "type": { + "$ref": "6467" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7315", + "parameter": { + "$ref": "6470" + }, + "value": { + "$id": "7316", + "kind": "string", + "type": { + "$ref": "6471" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7317", + "parameter": { + "$ref": "6473" + }, + "value": { + "$id": "7318", + "kind": "string", + "type": { + "$ref": "6474" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7319", + "parameter": { + "$ref": "6475" + }, + "value": { + "$id": "7320", + "kind": "string", + "type": { + "$ref": "6476" + }, + "value": "resource-name123" + } + }, + { + "$id": "7321", + "parameter": { + "$ref": "6477" + }, + "value": { + "$id": "7322", + "kind": "string", + "type": { + "$ref": "6478" + }, + "value": "resource-name123" + } + }, + { + "$id": "7323", + "parameter": { + "$ref": "6479" + }, + "value": { + "$id": "7324", + "kind": "string", + "type": { + "$ref": "6480" + }, + "value": "aio-to-event-grid" + } + }, + { + "$id": "7325", + "parameter": { + "$ref": "6487" + }, + "value": { + "$id": "7326", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "7327", + "properties": { + "$id": "7328", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "7329", + "mode": { + "$id": "7330", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7331", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "7332", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7333", + "operationType": { + "$id": "7334", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "7335", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7336", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "7337", + "endpointRef": { + "$id": "7338", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7339", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "7340", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "thermostats/+/telemetry/temperature/#" + } + ] + } + } + } + } + }, + { + "$id": "7341", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7342", + "operationType": { + "$id": "7343", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Destination" + }, + "name": { + "$id": "7344", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7345", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "7346", + "endpointRef": { + "$id": "7347", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "event-grid-endpoint" + }, + "dataDestination": { + "$id": "7348", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "factory/telemetry" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "7349", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "7350", + "name": { + "$id": "7351", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7352", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "7353", + "response": { + "$ref": "6488" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7354", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "7355", + "properties": { + "$id": "7356", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "7357", + "mode": { + "$id": "7358", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7359", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "7360", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7361", + "operationType": { + "$id": "7362", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "7363", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7364", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "7365", + "endpointRef": { + "$id": "7366", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7367", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "7368", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "thermostats/+/telemetry/temperature/#" + } + ] + } + } + } + } + }, + { + "$id": "7369", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7370", + "operationType": { + "$id": "7371", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Destination" + }, + "name": { + "$id": "7372", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7373", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "7374", + "endpointRef": { + "$id": "7375", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "event-grid-endpoint" + }, + "dataDestination": { + "$id": "7376", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "factory/telemetry" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7377", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7378", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "7379", + "name": { + "$id": "7380", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7381", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7382", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7383", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7384", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7385", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "7386", + "createdBy": { + "$id": "7387", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7388", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "7389", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7390", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7391", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7392", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "7393", + "response": { + "$ref": "6489" + }, + "statusCode": 201, + "bodyValue": { + "$id": "7394", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "7395", + "properties": { + "$id": "7396", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "7397", + "mode": { + "$id": "7398", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7399", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "7400", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7401", + "operationType": { + "$id": "7402", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "7403", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7404", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "7405", + "endpointRef": { + "$id": "7406", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7407", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "7408", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "thermostats/+/telemetry/temperature/#" + } + ] + } + } + } + } + }, + { + "$id": "7409", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7410", + "operationType": { + "$id": "7411", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Destination" + }, + "name": { + "$id": "7412", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7413", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "7414", + "endpointRef": { + "$id": "7415", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "event-grid-endpoint" + }, + "dataDestination": { + "$id": "7416", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "factory/telemetry" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7417", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7418", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "7419", + "name": { + "$id": "7420", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7421", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7422", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7423", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7424", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7425", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "7426", + "createdBy": { + "$id": "7427", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7428", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "7429", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7430", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7431", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7432", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "7433", + "kind": "http", + "name": "Dataflow_CreateOrUpdate_SimpleFabric", + "description": "Dataflow_CreateOrUpdate_SimpleFabric", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_SimpleFabric.json", + "parameters": [ + { + "$id": "7434", + "parameter": { + "$ref": "6466" + }, + "value": { + "$id": "7435", + "kind": "string", + "type": { + "$ref": "6467" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7436", + "parameter": { + "$ref": "6470" + }, + "value": { + "$id": "7437", + "kind": "string", + "type": { + "$ref": "6471" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7438", + "parameter": { + "$ref": "6473" + }, + "value": { + "$id": "7439", + "kind": "string", + "type": { + "$ref": "6474" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7440", + "parameter": { + "$ref": "6475" + }, + "value": { + "$id": "7441", + "kind": "string", + "type": { + "$ref": "6476" + }, + "value": "resource-name123" + } + }, + { + "$id": "7442", + "parameter": { + "$ref": "6477" + }, + "value": { + "$id": "7443", + "kind": "string", + "type": { + "$ref": "6478" + }, + "value": "resource-name123" + } + }, + { + "$id": "7444", + "parameter": { + "$ref": "6479" + }, + "value": { + "$id": "7445", + "kind": "string", + "type": { + "$ref": "6480" + }, + "value": "aio-to-fabric" + } + }, + { + "$id": "7446", + "parameter": { + "$ref": "6487" + }, + "value": { + "$id": "7447", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "7448", + "properties": { + "$id": "7449", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "7450", + "mode": { + "$id": "7451", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7452", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "7453", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7454", + "operationType": { + "$id": "7455", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "7456", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7457", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "7458", + "endpointRef": { + "$id": "7459", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7460", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "7461", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7462", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7463", + "operationType": { + "$id": "7464", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "BuiltInTransformation" + }, + "builtInTransformationSettings": { + "$id": "7465", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "7466", + "serializationFormat": { + "$id": "7467", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Parquet" + }, + "schemaRef": { + "$id": "7468", + "kind": "string", + "type": { + "$ref": "805" + }, + "value": "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0" + } + } + } + } + }, + { + "$id": "7469", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7470", + "operationType": { + "$id": "7471", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Destination" + }, + "name": { + "$id": "7472", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7473", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "7474", + "endpointRef": { + "$id": "7475", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "fabric-endpoint" + }, + "dataDestination": { + "$id": "7476", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "telemetryTable" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "7477", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "7478", + "name": { + "$id": "7479", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7480", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "7481", + "response": { + "$ref": "6488" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7482", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "7483", + "properties": { + "$id": "7484", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "7485", + "mode": { + "$id": "7486", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7487", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "7488", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7489", + "operationType": { + "$id": "7490", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "7491", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7492", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "7493", + "endpointRef": { + "$id": "7494", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7495", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "7496", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7497", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7498", + "operationType": { + "$id": "7499", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "BuiltInTransformation" + }, + "builtInTransformationSettings": { + "$id": "7500", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "7501", + "serializationFormat": { + "$id": "7502", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Parquet" + }, + "schemaRef": { + "$id": "7503", + "kind": "string", + "type": { + "$ref": "805" + }, + "value": "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0" + } + } + } + } + }, + { + "$id": "7504", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7505", + "operationType": { + "$id": "7506", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Destination" + }, + "name": { + "$id": "7507", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7508", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "7509", + "endpointRef": { + "$id": "7510", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "fabric-endpoint" + }, + "dataDestination": { + "$id": "7511", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "telemetryTable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7512", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7513", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "7514", + "name": { + "$id": "7515", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7516", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7517", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7518", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7519", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7520", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "7521", + "createdBy": { + "$id": "7522", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7523", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "7524", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7525", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7526", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7527", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "7528", + "response": { + "$ref": "6489" + }, + "statusCode": 201, + "bodyValue": { + "$id": "7529", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "7530", + "properties": { + "$id": "7531", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "7532", + "mode": { + "$id": "7533", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7534", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "7535", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7536", + "operationType": { + "$id": "7537", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "7538", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7539", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "7540", + "endpointRef": { + "$id": "7541", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7542", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "7543", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7544", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7545", + "operationType": { + "$id": "7546", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "BuiltInTransformation" + }, + "builtInTransformationSettings": { + "$id": "7547", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "7548", + "serializationFormat": { + "$id": "7549", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Parquet" + }, + "schemaRef": { + "$id": "7550", + "kind": "string", + "type": { + "$ref": "805" + }, + "value": "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0" + } + } + } + } + }, + { + "$id": "7551", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7552", + "operationType": { + "$id": "7553", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Destination" + }, + "name": { + "$id": "7554", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7555", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "7556", + "endpointRef": { + "$id": "7557", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "fabric-endpoint" + }, + "dataDestination": { + "$id": "7558", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "telemetryTable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7559", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7560", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "7561", + "name": { + "$id": "7562", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7563", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7564", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7565", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7566", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7567", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "7568", + "createdBy": { + "$id": "7569", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7570", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "7571", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7572", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7573", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7574", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "7575", + "Name": "delete", + "ResourceName": "DataflowResource", + "Doc": "Delete a DataflowResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "7576", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "7577", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "7578", + "Type": { + "$id": "7579", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7580", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "7581", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "7582", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7583", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "7584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7585", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "7586", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7587", + "Name": "dataflowProfileName", + "NameInRequest": "dataflowProfileName", + "Doc": "Name of Instance dataflowProfile resource", + "Type": { + "$id": "7588", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7589", + "Name": "dataflowName", + "NameInRequest": "dataflowName", + "Doc": "Name of Instance dataflowProfile dataflow resource", + "Type": { + "$id": "7590", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7591", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "7592", + "kind": "constant", + "valueType": { + "$id": "7593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "7594", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "7595", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "7596", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "7597", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "7598", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "7599", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows/{dataflowName}", + "BufferResponse": true, + "LongRunning": { + "$id": "7600", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "7601", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow.delete", + "Decorators": [], + "Examples": [ + { + "$id": "7602", + "kind": "http", + "name": "Dataflow_Delete", + "description": "Dataflow_Delete", + "filePath": "2025-04-01/Dataflow_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "7603", + "parameter": { + "$ref": "7576" + }, + "value": { + "$id": "7604", + "kind": "string", + "type": { + "$ref": "7577" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7605", + "parameter": { + "$ref": "7580" + }, + "value": { + "$id": "7606", + "kind": "string", + "type": { + "$ref": "7581" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7607", + "parameter": { + "$ref": "7583" + }, + "value": { + "$id": "7608", + "kind": "string", + "type": { + "$ref": "7584" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7609", + "parameter": { + "$ref": "7585" + }, + "value": { + "$id": "7610", + "kind": "string", + "type": { + "$ref": "7586" + }, + "value": "resource-name123" + } + }, + { + "$id": "7611", + "parameter": { + "$ref": "7587" + }, + "value": { + "$id": "7612", + "kind": "string", + "type": { + "$ref": "7588" + }, + "value": "resource-name123" + } + }, + { + "$id": "7613", + "parameter": { + "$ref": "7589" + }, + "value": { + "$id": "7614", + "kind": "string", + "type": { + "$ref": "7590" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "7615", + "response": { + "$ref": "7594" + }, + "statusCode": 202 + }, + { + "$id": "7616", + "response": { + "$ref": "7599" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "7617", + "Name": "listByResourceGroup", + "ResourceName": "DataflowResource", + "Doc": "List DataflowResource resources by DataflowProfileResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "7618", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "7619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "7620", + "Type": { + "$id": "7621", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7622", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "7623", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "7624", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7625", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "7626", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7627", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "7628", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7629", + "Name": "dataflowProfileName", + "NameInRequest": "dataflowProfileName", + "Doc": "Name of Instance dataflowProfile resource", + "Type": { + "$id": "7630", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7631", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "7632", + "kind": "constant", + "valueType": { + "$id": "7633", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "7634", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "905" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows", + "BufferResponse": true, + "Paging": { + "$id": "7635", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "7636", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "7637", + "kind": "http", + "name": "Dataflow_ListByProfileResource", + "description": "Dataflow_ListByProfileResource", + "filePath": "2025-04-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "7638", + "parameter": { + "$ref": "7618" + }, + "value": { + "$id": "7639", + "kind": "string", + "type": { + "$ref": "7619" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7640", + "parameter": { + "$ref": "7622" + }, + "value": { + "$id": "7641", + "kind": "string", + "type": { + "$ref": "7623" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7642", + "parameter": { + "$ref": "7625" + }, + "value": { + "$id": "7643", + "kind": "string", + "type": { + "$ref": "7626" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7644", + "parameter": { + "$ref": "7627" + }, + "value": { + "$id": "7645", + "kind": "string", + "type": { + "$ref": "7628" + }, + "value": "resource-name123" + } + }, + { + "$id": "7646", + "parameter": { + "$ref": "7629" + }, + "value": { + "$id": "7647", + "kind": "string", + "type": { + "$ref": "7630" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "7648", + "response": { + "$ref": "7634" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7649", + "kind": "model", + "type": { + "$ref": "905" + }, + "value": { + "$id": "7650", + "value": { + "$id": "7651", + "kind": "array", + "type": { + "$ref": "907" + }, + "value": [ + { + "$id": "7652", + "kind": "model", + "type": { + "$ref": "758" + }, + "value": { + "$id": "7653", + "properties": { + "$id": "7654", + "kind": "model", + "type": { + "$ref": "760" + }, + "value": { + "$id": "7655", + "mode": { + "$id": "7656", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7657", + "kind": "array", + "type": { + "$ref": "765" + }, + "value": [ + { + "$id": "7658", + "kind": "model", + "type": { + "$ref": "766" + }, + "value": { + "$id": "7659", + "operationType": { + "$id": "7660", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Source" + }, + "name": { + "$id": "7661", + "kind": "string", + "type": { + "$ref": "771" + }, + "value": "knnafvkwoeakm" + }, + "sourceSettings": { + "$id": "7662", + "kind": "model", + "type": { + "$ref": "775" + }, + "value": { + "$id": "7663", + "endpointRef": { + "$id": "7664", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "iixotodhvhkkfcfyrkoveslqig" + }, + "assetRef": { + "$id": "7665", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "zayyykwmckaocywdkohmu" + }, + "serializationFormat": { + "$id": "7666", + "kind": "string", + "type": { + "$ref": "172" + }, + "value": "Json" + }, + "schemaRef": { + "$id": "7667", + "kind": "string", + "type": { + "$ref": "788" + }, + "value": "pknmdzqll" + }, + "dataSources": { + "$id": "7668", + "kind": "array", + "type": { + "$ref": "792" + }, + "value": [ + { + "$id": "7669", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "chkkpymxhp" + } + ] + } + } + }, + "builtInTransformationSettings": { + "$id": "7670", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "7671", + "serializationFormat": { + "$id": "7672", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Delta" + }, + "schemaRef": { + "$id": "7673", + "kind": "string", + "type": { + "$ref": "805" + }, + "value": "mcdc" + }, + "datasets": { + "$id": "7674", + "kind": "array", + "type": { + "$ref": "809" + }, + "value": [ + { + "$id": "7675", + "kind": "model", + "type": { + "$ref": "810" + }, + "value": { + "$id": "7676", + "key": { + "$id": "7677", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "qsfqcgxaxnhfumrsdsokwyv" + }, + "description": { + "$id": "7678", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "schemaRef": { + "$id": "7679", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "n" + }, + "inputs": { + "$id": "7680", + "kind": "array", + "type": { + "$ref": "824" + }, + "value": [ + { + "$id": "7681", + "kind": "string", + "type": { + "$ref": "825" + }, + "value": "mosffpsslifkq" + } + ] + }, + "expression": { + "$id": "7682", + "kind": "string", + "type": { + "$ref": "829" + }, + "value": "aatbwomvflemsxialv" + } + } + } + ] + }, + "filter": { + "$id": "7683", + "kind": "array", + "type": { + "$ref": "835" + }, + "value": [ + { + "$id": "7684", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "7685", + "type": { + "$id": "7686", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Filter" + }, + "description": { + "$id": "7687", + "kind": "string", + "type": { + "$ref": "841" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7688", + "kind": "array", + "type": { + "$ref": "845" + }, + "value": [ + { + "$id": "7689", + "kind": "string", + "type": { + "$ref": "846" + }, + "value": "sxmjkbntgb" + } + ] + }, + "expression": { + "$id": "7690", + "kind": "string", + "type": { + "$ref": "850" + }, + "value": "n" + } + } + } + ] + }, + "map": { + "$id": "7691", + "kind": "array", + "type": { + "$ref": "856" + }, + "value": [ + { + "$id": "7692", + "kind": "model", + "type": { + "$ref": "857" + }, + "value": { + "$id": "7693", + "type": { + "$id": "7694", + "kind": "string", + "type": { + "$ref": "188" + }, + "value": "NewProperties" + }, + "description": { + "$id": "7695", + "kind": "string", + "type": { + "$ref": "862" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7696", + "kind": "array", + "type": { + "$ref": "866" + }, + "value": [ + { + "$id": "7697", + "kind": "string", + "type": { + "$ref": "867" + }, + "value": "xsbxuk" + } + ] + }, + "expression": { + "$id": "7698", + "kind": "string", + "type": { + "$ref": "871" + }, + "value": "txoiltogsarwkzalsphvlmt" + }, + "output": { + "$id": "7699", + "kind": "string", + "type": { + "$ref": "875" + }, + "value": "nvgtmkfl" + } + } + } + ] + } + } + }, + "destinationSettings": { + "$id": "7700", + "kind": "model", + "type": { + "$ref": "883" + }, + "value": { + "$id": "7701", + "endpointRef": { + "$id": "7702", + "kind": "string", + "type": { + "$ref": "885" + }, + "value": "kybkchnzimerguekuvqlqiqdvvrt" + }, + "dataDestination": { + "$id": "7703", + "kind": "string", + "type": { + "$ref": "889" + }, + "value": "cbrh" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7704", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7705", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "7706", + "name": { + "$id": "7707", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7708", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7709", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7710", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7711", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7712", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "7713", + "createdBy": { + "$id": "7714", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7715", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "7716", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7717", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7718", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7719", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "7720", + "kind": "string", + "type": { + "$ref": "911" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "7721" + }, + "Parent": "IoTOperationsClient", + "Parameters": [ + { + "$id": "7722", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "7723", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "7724", + "Type": { + "$id": "7725", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow" + }, + { + "$id": "7726", + "Name": "DataflowEndpoint", + "Namespace": "Microsoft.IoTOperations", + "Operations": [ + { + "$id": "7727", + "Name": "get", + "ResourceName": "DataflowEndpointResource", + "Doc": "Get a DataflowEndpointResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "7728", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "7729", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "7730", + "Type": { + "$id": "7731", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7732", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "7733", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "7734", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7735", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "7736", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7737", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "7738", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7739", + "Name": "dataflowEndpointName", + "NameInRequest": "dataflowEndpointName", + "Doc": "Name of Instance dataflowEndpoint resource", + "Type": { + "$id": "7740", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7741", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "7742", + "kind": "constant", + "valueType": { + "$id": "7743", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "7744", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "336" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowEndpoints/{dataflowEndpointName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint.get", + "Decorators": [], + "Examples": [ + { + "$id": "7745", + "kind": "http", + "name": "DataflowEndpoint_Get", + "description": "DataflowEndpoint_Get", + "filePath": "2025-04-01/DataflowEndpoint_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "7746", + "parameter": { + "$ref": "7728" + }, + "value": { + "$id": "7747", + "kind": "string", + "type": { + "$ref": "7729" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7748", + "parameter": { + "$ref": "7732" + }, + "value": { + "$id": "7749", + "kind": "string", + "type": { + "$ref": "7733" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7750", + "parameter": { + "$ref": "7735" + }, + "value": { + "$id": "7751", + "kind": "string", + "type": { + "$ref": "7736" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7752", + "parameter": { + "$ref": "7737" + }, + "value": { + "$id": "7753", + "kind": "string", + "type": { + "$ref": "7738" + }, + "value": "resource-name123" + } + }, + { + "$id": "7754", + "parameter": { + "$ref": "7739" + }, + "value": { + "$id": "7755", + "kind": "string", + "type": { + "$ref": "7740" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "7756", + "response": { + "$ref": "7744" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7757", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "7758", + "properties": { + "$id": "7759", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "7760", + "endpointType": { + "$id": "7761", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "7762", + "kind": "model", + "type": { + "$ref": "387" + }, + "value": { + "$id": "7763", + "authentication": { + "$id": "7764", + "kind": "model", + "type": { + "$ref": "389" + }, + "value": { + "$id": "7765", + "method": { + "$id": "7766", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "7767", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "7768", + "audience": { + "$id": "7769", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "7770", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "7771", + "clientId": { + "$id": "7772", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "7773", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "7774", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "database": { + "$id": "7775", + "kind": "string", + "type": { + "$ref": "420" + }, + "value": "yqcdpjsifm" + }, + "host": { + "$id": "7776", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "..kusto.windows.net" + }, + "batching": { + "$id": "7777", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "7778", + "latencySeconds": { + "$id": "7779", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "7780", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 171 + } + } + } + } + }, + "dataLakeStorageSettings": { + "$id": "7781", + "kind": "model", + "type": { + "$ref": "442" + }, + "value": { + "$id": "7782", + "authentication": { + "$id": "7783", + "kind": "model", + "type": { + "$ref": "444" + }, + "value": { + "$id": "7784", + "method": { + "$id": "7785", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "SystemAssignedManagedIdentity" + }, + "accessTokenSettings": { + "$id": "7786", + "kind": "model", + "type": { + "$ref": "449" + }, + "value": { + "$id": "7787", + "secretRef": { + "$id": "7788", + "kind": "string", + "type": { + "$ref": "451" + }, + "value": "sevriyphcvnlrnfudqzejecwa" + } + } + }, + "systemAssignedManagedIdentitySettings": { + "$id": "7789", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "7790", + "audience": { + "$id": "7791", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "7792", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "7793", + "clientId": { + "$id": "7794", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "7795", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "7796", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "host": { + "$id": "7797", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": ".blob.core.windows.net" + }, + "batching": { + "$id": "7798", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "7799", + "latencySeconds": { + "$id": "7800", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "7801", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 171 + } + } + } + } + }, + "fabricOneLakeSettings": { + "$id": "7802", + "kind": "model", + "type": { + "$ref": "474" + }, + "value": { + "$id": "7803", + "authentication": { + "$id": "7804", + "kind": "model", + "type": { + "$ref": "476" + }, + "value": { + "$id": "7805", + "method": { + "$id": "7806", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "7807", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "7808", + "audience": { + "$id": "7809", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "7810", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "7811", + "clientId": { + "$id": "7812", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "7813", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "7814", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "names": { + "$id": "7815", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "7816", + "lakehouseName": { + "$id": "7817", + "kind": "string", + "type": { + "$ref": "491" + }, + "value": "wpeathi" + }, + "workspaceName": { + "$id": "7818", + "kind": "string", + "type": { + "$ref": "495" + }, + "value": "nwgmitkbljztgms" + } + } + }, + "oneLakePathType": { + "$id": "7819", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "Files" + }, + "host": { + "$id": "7820", + "kind": "string", + "type": { + "$ref": "504" + }, + "value": "https://.fabric.microsoft.com" + }, + "batching": { + "$id": "7821", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "7822", + "latencySeconds": { + "$id": "7823", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "7824", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 171 + } + } + } + } + }, + "kafkaSettings": { + "$id": "7825", + "kind": "model", + "type": { + "$ref": "513" + }, + "value": { + "$id": "7826", + "authentication": { + "$id": "7827", + "kind": "model", + "type": { + "$ref": "515" + }, + "value": { + "$id": "7828", + "method": { + "$id": "7829", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "7830", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "7831", + "audience": { + "$id": "7832", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "7833", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "7834", + "clientId": { + "$id": "7835", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "7836", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "7837", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "saslSettings": { + "$id": "7838", + "kind": "model", + "type": { + "$ref": "526" + }, + "value": { + "$id": "7839", + "saslType": { + "$id": "7840", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "7841", + "kind": "string", + "type": { + "$ref": "531" + }, + "value": "visyxoztqnylvbyokhtmpdkwes" + } + } + }, + "x509CertificateSettings": { + "$id": "7842", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "7843", + "secretRef": { + "$id": "7844", + "kind": "string", + "type": { + "$ref": "539" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "consumerGroupId": { + "$id": "7845", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "ukkzcjiyenhxokat" + }, + "host": { + "$id": "7846", + "kind": "string", + "type": { + "$ref": "551" + }, + "value": "pwcqfiqclcgneolpewnyavoulbip" + }, + "batching": { + "$id": "7847", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "7848", + "mode": { + "$id": "7849", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "7850", + "kind": "number", + "type": { + "$ref": "560" + }, + "value": 3679 + }, + "maxBytes": { + "$id": "7851", + "kind": "number", + "type": { + "$ref": "564" + }, + "value": 8887 + }, + "maxMessages": { + "$id": "7852", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 2174 + } + } + }, + "copyMqttProperties": { + "$id": "7853", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "compression": { + "$id": "7854", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "None" + }, + "kafkaAcks": { + "$id": "7855", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Zero" + }, + "partitionStrategy": { + "$id": "7856", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Default" + }, + "tls": { + "$id": "7857", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "7858", + "mode": { + "$id": "7859", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "7860", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "tectjjvukvelsreihwadh" + } + } + } + } + }, + "localStorageSettings": { + "$id": "7861", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "7862", + "persistentVolumeClaimRef": { + "$id": "7863", + "kind": "string", + "type": { + "$ref": "604" + }, + "value": "jjwqwvd" + } + } + }, + "mqttSettings": { + "$id": "7864", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "7865", + "authentication": { + "$id": "7866", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "7867", + "method": { + "$id": "7868", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "7869", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "7870", + "audience": { + "$id": "7871", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "7872", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "7873", + "clientId": { + "$id": "7874", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "7875", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "7876", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "serviceAccountTokenSettings": { + "$id": "7877", + "kind": "model", + "type": { + "$ref": "623" + }, + "value": { + "$id": "7878", + "audience": { + "$id": "7879", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "ejbklrbxgjaqleoycgpje" + } + } + }, + "x509CertificateSettings": { + "$id": "7880", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "7881", + "secretRef": { + "$id": "7882", + "kind": "string", + "type": { + "$ref": "539" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "clientIdPrefix": { + "$id": "7883", + "kind": "string", + "type": { + "$ref": "636" + }, + "value": "kkljsdxdirfhwxtkavldekeqhv" + }, + "host": { + "$id": "7884", + "kind": "string", + "type": { + "$ref": "640" + }, + "value": "nyhnxqnbspstctl" + }, + "protocol": { + "$id": "7885", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Mqtt" + }, + "keepAliveSeconds": { + "$id": "7886", + "kind": "number", + "type": { + "$ref": "647" + }, + "value": 0 + }, + "retain": { + "$id": "7887", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "Keep" + }, + "maxInflightMessages": { + "$id": "7888", + "kind": "number", + "type": { + "$ref": "654" + }, + "value": 0 + }, + "qos": { + "$id": "7889", + "kind": "number", + "type": { + "$ref": "658" + }, + "value": 1 + }, + "sessionExpirySeconds": { + "$id": "7890", + "kind": "number", + "type": { + "$ref": "662" + }, + "value": 0 + }, + "tls": { + "$id": "7891", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "7892", + "mode": { + "$id": "7893", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "7894", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "tectjjvukvelsreihwadh" + } + } + } + } + }, + "provisioningState": { + "$id": "7895", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7896", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "7897", + "name": { + "$id": "7898", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7899", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7900", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "7901", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "7902", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "7903", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "7904", + "createdBy": { + "$id": "7905", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7906", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "7907", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7908", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7909", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7910", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "7911", + "Name": "createOrUpdate", + "ResourceName": "DataflowEndpointResource", + "Doc": "Create a DataflowEndpointResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "7912", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "7913", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "7914", + "Type": { + "$id": "7915", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7916", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "7917", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "7918", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7919", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "7920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7921", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "7922", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7923", + "Name": "dataflowEndpointName", + "NameInRequest": "dataflowEndpointName", + "Doc": "Name of Instance dataflowEndpoint resource", + "Type": { + "$id": "7924", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7925", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "7926", + "kind": "constant", + "valueType": { + "$id": "7927", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7928", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "7929", + "kind": "constant", + "valueType": { + "$id": "7930", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "7931", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "336" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "7932", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "336" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "7933", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "336" + }, + "Headers": [ + { + "$id": "7934", + "Name": "azureAsyncOperation", + "NameInResponse": "Azure-AsyncOperation", + "Doc": "A link to the status monitor", + "Type": { + "$id": "7935", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "7936", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "7937", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowEndpoints/{dataflowEndpointName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "7938", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "7939", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "336" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint.createOrUpdate", + "Decorators": [], + "Examples": [ + { + "$id": "7940", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_ADLSv2", + "description": "DataflowEndpoint_CreateOrUpdate_ADLSv2", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json", + "parameters": [ + { + "$id": "7941", + "parameter": { + "$ref": "7912" + }, + "value": { + "$id": "7942", + "kind": "string", + "type": { + "$ref": "7913" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7943", + "parameter": { + "$ref": "7916" + }, + "value": { + "$id": "7944", + "kind": "string", + "type": { + "$ref": "7917" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7945", + "parameter": { + "$ref": "7919" + }, + "value": { + "$id": "7946", + "kind": "string", + "type": { + "$ref": "7920" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7947", + "parameter": { + "$ref": "7921" + }, + "value": { + "$id": "7948", + "kind": "string", + "type": { + "$ref": "7922" + }, + "value": "resource-name123" + } + }, + { + "$id": "7949", + "parameter": { + "$ref": "7923" + }, + "value": { + "$id": "7950", + "kind": "string", + "type": { + "$ref": "7924" + }, + "value": "adlsv2-endpoint" + } + }, + { + "$id": "7951", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "7952", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "7953", + "properties": { + "$id": "7954", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "7955", + "endpointType": { + "$id": "7956", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "DataLakeStorage" + }, + "dataLakeStorageSettings": { + "$id": "7957", + "kind": "model", + "type": { + "$ref": "442" + }, + "value": { + "$id": "7958", + "host": { + "$id": "7959", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": "example.blob.core.windows.net" + }, + "authentication": { + "$id": "7960", + "kind": "model", + "type": { + "$ref": "444" + }, + "value": { + "$id": "7961", + "method": { + "$id": "7962", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "AccessToken" + }, + "accessTokenSettings": { + "$id": "7963", + "kind": "model", + "type": { + "$ref": "449" + }, + "value": { + "$id": "7964", + "secretRef": { + "$id": "7965", + "kind": "string", + "type": { + "$ref": "451" + }, + "value": "my-secret" + } + } + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "7966", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "7967", + "name": { + "$id": "7968", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7969", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "7970", + "response": { + "$ref": "7932" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7971", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "7972", + "properties": { + "$id": "7973", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "7974", + "endpointType": { + "$id": "7975", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "DataLakeStorage" + }, + "dataLakeStorageSettings": { + "$id": "7976", + "kind": "model", + "type": { + "$ref": "442" + }, + "value": { + "$id": "7977", + "host": { + "$id": "7978", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": "example.blob.core.windows.net" + }, + "authentication": { + "$id": "7979", + "kind": "model", + "type": { + "$ref": "444" + }, + "value": { + "$id": "7980", + "method": { + "$id": "7981", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "AccessToken" + }, + "accessTokenSettings": { + "$id": "7982", + "kind": "model", + "type": { + "$ref": "449" + }, + "value": { + "$id": "7983", + "secretRef": { + "$id": "7984", + "kind": "string", + "type": { + "$ref": "451" + }, + "value": "my-secret" + } + } + } + } + } + } + }, + "provisioningState": { + "$id": "7985", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7986", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "7987", + "name": { + "$id": "7988", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7989", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7990", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "7991", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "7992", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "7993", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "7994", + "createdBy": { + "$id": "7995", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7996", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "7997", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7998", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7999", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8000", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8001", + "response": { + "$ref": "7933" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8002", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8003", + "properties": { + "$id": "8004", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8005", + "endpointType": { + "$id": "8006", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "DataLakeStorage" + }, + "dataLakeStorageSettings": { + "$id": "8007", + "kind": "model", + "type": { + "$ref": "442" + }, + "value": { + "$id": "8008", + "host": { + "$id": "8009", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": "example.blob.core.windows.net" + }, + "authentication": { + "$id": "8010", + "kind": "model", + "type": { + "$ref": "444" + }, + "value": { + "$id": "8011", + "method": { + "$id": "8012", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "AccessToken" + }, + "accessTokenSettings": { + "$id": "8013", + "kind": "model", + "type": { + "$ref": "449" + }, + "value": { + "$id": "8014", + "secretRef": { + "$id": "8015", + "kind": "string", + "type": { + "$ref": "451" + }, + "value": "my-secret" + } + } + } + } + } + } + }, + "provisioningState": { + "$id": "8016", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8017", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8018", + "name": { + "$id": "8019", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8020", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8021", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8022", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8023", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8024", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8025", + "createdBy": { + "$id": "8026", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8027", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8028", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8029", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8030", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8031", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8032", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_ADX", + "description": "DataflowEndpoint_CreateOrUpdate_ADX", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_ADX.json", + "parameters": [ + { + "$id": "8033", + "parameter": { + "$ref": "7912" + }, + "value": { + "$id": "8034", + "kind": "string", + "type": { + "$ref": "7913" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8035", + "parameter": { + "$ref": "7916" + }, + "value": { + "$id": "8036", + "kind": "string", + "type": { + "$ref": "7917" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8037", + "parameter": { + "$ref": "7919" + }, + "value": { + "$id": "8038", + "kind": "string", + "type": { + "$ref": "7920" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8039", + "parameter": { + "$ref": "7921" + }, + "value": { + "$id": "8040", + "kind": "string", + "type": { + "$ref": "7922" + }, + "value": "resource-name123" + } + }, + { + "$id": "8041", + "parameter": { + "$ref": "7923" + }, + "value": { + "$id": "8042", + "kind": "string", + "type": { + "$ref": "7924" + }, + "value": "adx-endpoint" + } + }, + { + "$id": "8043", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8044", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8045", + "properties": { + "$id": "8046", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8047", + "endpointType": { + "$id": "8048", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "8049", + "kind": "model", + "type": { + "$ref": "387" + }, + "value": { + "$id": "8050", + "host": { + "$id": "8051", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "example.westeurope.kusto.windows.net" + }, + "authentication": { + "$id": "8052", + "kind": "model", + "type": { + "$ref": "389" + }, + "value": { + "$id": "8053", + "method": { + "$id": "8054", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8055", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8056" + } + } + } + }, + "database": { + "$id": "8057", + "kind": "string", + "type": { + "$ref": "420" + }, + "value": "example-database" + }, + "batching": { + "$id": "8058", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "8059", + "latencySeconds": { + "$id": "8060", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "8061", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 9028 + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "8062", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8063", + "name": { + "$id": "8064", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8065", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8066", + "response": { + "$ref": "7932" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8067", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8068", + "properties": { + "$id": "8069", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8070", + "endpointType": { + "$id": "8071", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "8072", + "kind": "model", + "type": { + "$ref": "387" + }, + "value": { + "$id": "8073", + "host": { + "$id": "8074", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "example.westeurope.kusto.windows.net" + }, + "authentication": { + "$id": "8075", + "kind": "model", + "type": { + "$ref": "389" + }, + "value": { + "$id": "8076", + "method": { + "$id": "8077", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8078", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8079" + } + } + } + }, + "database": { + "$id": "8080", + "kind": "string", + "type": { + "$ref": "420" + }, + "value": "example-database" + }, + "batching": { + "$id": "8081", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "8082", + "latencySeconds": { + "$id": "8083", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "8084", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 9028 + } + } + } + } + }, + "provisioningState": { + "$id": "8085", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8086", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8087", + "name": { + "$id": "8088", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8089", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8090", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8091", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8092", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8093", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8094", + "createdBy": { + "$id": "8095", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8096", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8097", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8098", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8099", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8100", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8101", + "response": { + "$ref": "7933" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8102", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8103", + "properties": { + "$id": "8104", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8105", + "endpointType": { + "$id": "8106", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "8107", + "kind": "model", + "type": { + "$ref": "387" + }, + "value": { + "$id": "8108", + "host": { + "$id": "8109", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "example.westeurope.kusto.windows.net" + }, + "authentication": { + "$id": "8110", + "kind": "model", + "type": { + "$ref": "389" + }, + "value": { + "$id": "8111", + "method": { + "$id": "8112", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8113", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8114" + } + } + } + }, + "database": { + "$id": "8115", + "kind": "string", + "type": { + "$ref": "420" + }, + "value": "example-database" + }, + "batching": { + "$id": "8116", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "8117", + "latencySeconds": { + "$id": "8118", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "8119", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 9028 + } + } + } + } + }, + "provisioningState": { + "$id": "8120", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8121", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8122", + "name": { + "$id": "8123", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8124", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8125", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8126", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8127", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8128", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8129", + "createdBy": { + "$id": "8130", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8131", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8132", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8133", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8134", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8135", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8136", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_AIO", + "description": "DataflowEndpoint_CreateOrUpdate_AIO", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_AIO.json", + "parameters": [ + { + "$id": "8137", + "parameter": { + "$ref": "7912" + }, + "value": { + "$id": "8138", + "kind": "string", + "type": { + "$ref": "7913" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8139", + "parameter": { + "$ref": "7916" + }, + "value": { + "$id": "8140", + "kind": "string", + "type": { + "$ref": "7917" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8141", + "parameter": { + "$ref": "7919" + }, + "value": { + "$id": "8142", + "kind": "string", + "type": { + "$ref": "7920" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8143", + "parameter": { + "$ref": "7921" + }, + "value": { + "$id": "8144", + "kind": "string", + "type": { + "$ref": "7922" + }, + "value": "resource-name123" + } + }, + { + "$id": "8145", + "parameter": { + "$ref": "7923" + }, + "value": { + "$id": "8146", + "kind": "string", + "type": { + "$ref": "7924" + }, + "value": "aio-builtin-broker-endpoint" + } + }, + { + "$id": "8147", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8148", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8149", + "properties": { + "$id": "8150", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8151", + "endpointType": { + "$id": "8152", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8153", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "8154", + "host": { + "$id": "8155", + "kind": "string", + "type": { + "$ref": "640" + }, + "value": "aio-broker:18883" + }, + "authentication": { + "$id": "8156", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "8157", + "serviceAccountTokenSettings": { + "$id": "8158", + "kind": "model", + "type": { + "$ref": "623" + }, + "value": { + "$id": "8159", + "audience": { + "$id": "8160", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "aio-internal" + } + } + } + } + }, + "tls": { + "$id": "8161", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8162", + "mode": { + "$id": "8163", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8164", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "aio-ca-trust-bundle-test-only" + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "8165", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8166", + "name": { + "$id": "8167", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8168", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8169", + "response": { + "$ref": "7932" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8170", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8171", + "properties": { + "$id": "8172", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8173", + "endpointType": { + "$id": "8174", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8175", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "8176", + "host": { + "$id": "8177", + "kind": "string", + "type": { + "$ref": "640" + }, + "value": "aio-broker:18883" + }, + "authentication": { + "$id": "8178", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "8179", + "serviceAccountTokenSettings": { + "$id": "8180", + "kind": "model", + "type": { + "$ref": "623" + }, + "value": { + "$id": "8181", + "audience": { + "$id": "8182", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "aio-internal" + } + } + } + } + }, + "tls": { + "$id": "8183", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8184", + "mode": { + "$id": "8185", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8186", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "aio-ca-trust-bundle-test-only" + } + } + } + } + }, + "provisioningState": { + "$id": "8187", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8188", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8189", + "name": { + "$id": "8190", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8191", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8192", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8193", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8194", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8195", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8196", + "createdBy": { + "$id": "8197", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8198", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8199", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8200", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8201", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8202", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8203", + "response": { + "$ref": "7933" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8204", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8205", + "properties": { + "$id": "8206", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8207", + "endpointType": { + "$id": "8208", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8209", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "8210", + "host": { + "$id": "8211", + "kind": "string", + "type": { + "$ref": "640" + }, + "value": "aio-broker:18883" + }, + "authentication": { + "$id": "8212", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "8213", + "serviceAccountTokenSettings": { + "$id": "8214", + "kind": "model", + "type": { + "$ref": "623" + }, + "value": { + "$id": "8215", + "audience": { + "$id": "8216", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "aio-internal" + } + } + } + } + }, + "tls": { + "$id": "8217", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8218", + "mode": { + "$id": "8219", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8220", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "aio-ca-trust-bundle-test-only" + } + } + } + } + }, + "provisioningState": { + "$id": "8221", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8222", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8223", + "name": { + "$id": "8224", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8225", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8226", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8227", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8228", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8229", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8230", + "createdBy": { + "$id": "8231", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8232", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8233", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8234", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8235", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8236", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8237", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_EventGrid", + "description": "DataflowEndpoint_CreateOrUpdate_EventGrid", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_EventGrid.json", + "parameters": [ + { + "$id": "8238", + "parameter": { + "$ref": "7912" + }, + "value": { + "$id": "8239", + "kind": "string", + "type": { + "$ref": "7913" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8240", + "parameter": { + "$ref": "7916" + }, + "value": { + "$id": "8241", + "kind": "string", + "type": { + "$ref": "7917" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8242", + "parameter": { + "$ref": "7919" + }, + "value": { + "$id": "8243", + "kind": "string", + "type": { + "$ref": "7920" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8244", + "parameter": { + "$ref": "7921" + }, + "value": { + "$id": "8245", + "kind": "string", + "type": { + "$ref": "7922" + }, + "value": "resource-name123" + } + }, + { + "$id": "8246", + "parameter": { + "$ref": "7923" + }, + "value": { + "$id": "8247", + "kind": "string", + "type": { + "$ref": "7924" + }, + "value": "event-grid-endpoint" + } + }, + { + "$id": "8248", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8249", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8250", + "properties": { + "$id": "8251", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8252", + "endpointType": { + "$id": "8253", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8254", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "8255", + "host": { + "$id": "8256", + "kind": "string", + "type": { + "$ref": "640" + }, + "value": "example.westeurope-1.ts.eventgrid.azure.net:8883" + }, + "authentication": { + "$id": "8257", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "8258", + "method": { + "$id": "8259", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8260", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8261" + } + } + } + }, + "tls": { + "$id": "8262", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8263", + "mode": { + "$id": "8264", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "8265", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8266", + "name": { + "$id": "8267", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8268", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8269", + "response": { + "$ref": "7932" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8270", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8271", + "properties": { + "$id": "8272", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8273", + "endpointType": { + "$id": "8274", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8275", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "8276", + "host": { + "$id": "8277", + "kind": "string", + "type": { + "$ref": "640" + }, + "value": "example.westeurope-1.ts.eventgrid.azure.net:8883" + }, + "authentication": { + "$id": "8278", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "8279", + "method": { + "$id": "8280", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8281", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8282" + } + } + } + }, + "tls": { + "$id": "8283", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8284", + "mode": { + "$id": "8285", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + } + } + }, + "provisioningState": { + "$id": "8286", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8287", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8288", + "name": { + "$id": "8289", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8290", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8291", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8292", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8293", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8294", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8295", + "createdBy": { + "$id": "8296", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8297", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8298", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8299", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8300", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8301", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8302", + "response": { + "$ref": "7933" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8303", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8304", + "properties": { + "$id": "8305", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8306", + "endpointType": { + "$id": "8307", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8308", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "8309", + "host": { + "$id": "8310", + "kind": "string", + "type": { + "$ref": "640" + }, + "value": "example.westeurope-1.ts.eventgrid.azure.net:8883" + }, + "authentication": { + "$id": "8311", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "8312", + "method": { + "$id": "8313", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8314", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8315" + } + } + } + }, + "tls": { + "$id": "8316", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8317", + "mode": { + "$id": "8318", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + } + } + }, + "provisioningState": { + "$id": "8319", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8320", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8321", + "name": { + "$id": "8322", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8323", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8324", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8325", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8326", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8327", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8328", + "createdBy": { + "$id": "8329", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8330", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8331", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8332", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8333", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8334", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8335", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_EventHub", + "description": "DataflowEndpoint_CreateOrUpdate_EventHub", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_EventHub.json", + "parameters": [ + { + "$id": "8336", + "parameter": { + "$ref": "7912" + }, + "value": { + "$id": "8337", + "kind": "string", + "type": { + "$ref": "7913" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8338", + "parameter": { + "$ref": "7916" + }, + "value": { + "$id": "8339", + "kind": "string", + "type": { + "$ref": "7917" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8340", + "parameter": { + "$ref": "7919" + }, + "value": { + "$id": "8341", + "kind": "string", + "type": { + "$ref": "7920" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8342", + "parameter": { + "$ref": "7921" + }, + "value": { + "$id": "8343", + "kind": "string", + "type": { + "$ref": "7922" + }, + "value": "resource-name123" + } + }, + { + "$id": "8344", + "parameter": { + "$ref": "7923" + }, + "value": { + "$id": "8345", + "kind": "string", + "type": { + "$ref": "7924" + }, + "value": "event-hub-endpoint" + } + }, + { + "$id": "8346", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8347", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8348", + "properties": { + "$id": "8349", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8350", + "endpointType": { + "$id": "8351", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8352", + "kind": "model", + "type": { + "$ref": "513" + }, + "value": { + "$id": "8353", + "host": { + "$id": "8354", + "kind": "string", + "type": { + "$ref": "551" + }, + "value": "example.servicebus.windows.net:9093" + }, + "authentication": { + "$id": "8355", + "kind": "model", + "type": { + "$ref": "515" + }, + "value": { + "$id": "8356", + "method": { + "$id": "8357", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8358", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8359" + } + } + } + }, + "tls": { + "$id": "8360", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8361", + "mode": { + "$id": "8362", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "consumerGroupId": { + "$id": "8363", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "aiodataflows" + } + } + } + } + }, + "extendedLocation": { + "$id": "8364", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8365", + "name": { + "$id": "8366", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8367", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8368", + "response": { + "$ref": "7932" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8369", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8370", + "properties": { + "$id": "8371", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8372", + "endpointType": { + "$id": "8373", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8374", + "kind": "model", + "type": { + "$ref": "513" + }, + "value": { + "$id": "8375", + "host": { + "$id": "8376", + "kind": "string", + "type": { + "$ref": "551" + }, + "value": "example.servicebus.windows.net:9093" + }, + "authentication": { + "$id": "8377", + "kind": "model", + "type": { + "$ref": "515" + }, + "value": { + "$id": "8378", + "method": { + "$id": "8379", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8380", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8381" + } + } + } + }, + "tls": { + "$id": "8382", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8383", + "mode": { + "$id": "8384", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "consumerGroupId": { + "$id": "8385", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "aiodataflows" + } + } + }, + "provisioningState": { + "$id": "8386", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8387", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8388", + "name": { + "$id": "8389", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8390", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8391", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8392", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8393", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8394", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8395", + "createdBy": { + "$id": "8396", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8397", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8398", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8399", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8400", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8401", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8402", + "response": { + "$ref": "7933" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8403", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8404", + "properties": { + "$id": "8405", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8406", + "endpointType": { + "$id": "8407", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8408", + "kind": "model", + "type": { + "$ref": "513" + }, + "value": { + "$id": "8409", + "host": { + "$id": "8410", + "kind": "string", + "type": { + "$ref": "551" + }, + "value": "example.servicebus.windows.net:9093" + }, + "authentication": { + "$id": "8411", + "kind": "model", + "type": { + "$ref": "515" + }, + "value": { + "$id": "8412", + "method": { + "$id": "8413", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8414", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8415" + } + } + } + }, + "tls": { + "$id": "8416", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8417", + "mode": { + "$id": "8418", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + } + } + }, + "consumerGroupId": { + "$id": "8419", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "aiodataflows" + } + } + }, + "provisioningState": { + "$id": "8420", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8421", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8422", + "name": { + "$id": "8423", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8424", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8425", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8426", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8427", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8428", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8429", + "createdBy": { + "$id": "8430", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8431", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8432", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8433", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8434", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8435", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8436", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_Fabric", + "description": "DataflowEndpoint_CreateOrUpdate_Fabric", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_Fabric.json", + "parameters": [ + { + "$id": "8437", + "parameter": { + "$ref": "7912" + }, + "value": { + "$id": "8438", + "kind": "string", + "type": { + "$ref": "7913" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8439", + "parameter": { + "$ref": "7916" + }, + "value": { + "$id": "8440", + "kind": "string", + "type": { + "$ref": "7917" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8441", + "parameter": { + "$ref": "7919" + }, + "value": { + "$id": "8442", + "kind": "string", + "type": { + "$ref": "7920" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8443", + "parameter": { + "$ref": "7921" + }, + "value": { + "$id": "8444", + "kind": "string", + "type": { + "$ref": "7922" + }, + "value": "resource-name123" + } + }, + { + "$id": "8445", + "parameter": { + "$ref": "7923" + }, + "value": { + "$id": "8446", + "kind": "string", + "type": { + "$ref": "7924" + }, + "value": "fabric-endpoint" + } + }, + { + "$id": "8447", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8448", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8449", + "properties": { + "$id": "8450", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8451", + "endpointType": { + "$id": "8452", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "FabricOneLake" + }, + "fabricOneLakeSettings": { + "$id": "8453", + "kind": "model", + "type": { + "$ref": "474" + }, + "value": { + "$id": "8454", + "host": { + "$id": "8455", + "kind": "string", + "type": { + "$ref": "504" + }, + "value": "onelake.dfs.fabric.microsoft.com" + }, + "authentication": { + "$id": "8456", + "kind": "model", + "type": { + "$ref": "476" + }, + "value": { + "$id": "8457", + "method": { + "$id": "8458", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8459", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8460" + } + } + } + }, + "names": { + "$id": "8461", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "8462", + "workspaceName": { + "$id": "8463", + "kind": "string", + "type": { + "$ref": "495" + }, + "value": "example-workspace" + }, + "lakehouseName": { + "$id": "8464", + "kind": "string", + "type": { + "$ref": "491" + }, + "value": "example-lakehouse" + } + } + }, + "oneLakePathType": { + "$id": "8465", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "Tables" + } + } + } + } + }, + "extendedLocation": { + "$id": "8466", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8467", + "name": { + "$id": "8468", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8469", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8470", + "response": { + "$ref": "7932" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8471", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8472", + "properties": { + "$id": "8473", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8474", + "endpointType": { + "$id": "8475", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "FabricOneLake" + }, + "fabricOneLakeSettings": { + "$id": "8476", + "kind": "model", + "type": { + "$ref": "474" + }, + "value": { + "$id": "8477", + "host": { + "$id": "8478", + "kind": "string", + "type": { + "$ref": "504" + }, + "value": "onelake.dfs.fabric.microsoft.com" + }, + "authentication": { + "$id": "8479", + "kind": "model", + "type": { + "$ref": "476" + }, + "value": { + "$id": "8480", + "method": { + "$id": "8481", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8482", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8483" + } + } + } + }, + "names": { + "$id": "8484", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "8485", + "workspaceName": { + "$id": "8486", + "kind": "string", + "type": { + "$ref": "495" + }, + "value": "example-workspace" + }, + "lakehouseName": { + "$id": "8487", + "kind": "string", + "type": { + "$ref": "491" + }, + "value": "example-lakehouse" + } + } + }, + "oneLakePathType": { + "$id": "8488", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "Tables" + } + } + }, + "provisioningState": { + "$id": "8489", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8490", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8491", + "name": { + "$id": "8492", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8493", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8494", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8495", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8496", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8497", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8498", + "createdBy": { + "$id": "8499", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8500", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8501", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8502", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8503", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8504", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8505", + "response": { + "$ref": "7933" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8506", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8507", + "properties": { + "$id": "8508", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8509", + "endpointType": { + "$id": "8510", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "FabricOneLake" + }, + "fabricOneLakeSettings": { + "$id": "8511", + "kind": "model", + "type": { + "$ref": "474" + }, + "value": { + "$id": "8512", + "host": { + "$id": "8513", + "kind": "string", + "type": { + "$ref": "504" + }, + "value": "onelake.dfs.fabric.microsoft.com" + }, + "authentication": { + "$id": "8514", + "kind": "model", + "type": { + "$ref": "476" + }, + "value": { + "$id": "8515", + "method": { + "$id": "8516", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8517", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8518" + } + } + } + }, + "names": { + "$id": "8519", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "8520", + "workspaceName": { + "$id": "8521", + "kind": "string", + "type": { + "$ref": "495" + }, + "value": "example-workspace" + }, + "lakehouseName": { + "$id": "8522", + "kind": "string", + "type": { + "$ref": "491" + }, + "value": "example-lakehouse" + } + } + }, + "oneLakePathType": { + "$id": "8523", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "Tables" + } + } + }, + "provisioningState": { + "$id": "8524", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8525", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8526", + "name": { + "$id": "8527", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8528", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8529", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8530", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8531", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8532", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8533", + "createdBy": { + "$id": "8534", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8535", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8536", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8537", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8538", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8539", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8540", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_Kafka", + "description": "DataflowEndpoint_CreateOrUpdate_Kafka", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_Kafka.json", + "parameters": [ + { + "$id": "8541", + "parameter": { + "$ref": "7912" + }, + "value": { + "$id": "8542", + "kind": "string", + "type": { + "$ref": "7913" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8543", + "parameter": { + "$ref": "7916" + }, + "value": { + "$id": "8544", + "kind": "string", + "type": { + "$ref": "7917" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8545", + "parameter": { + "$ref": "7919" + }, + "value": { + "$id": "8546", + "kind": "string", + "type": { + "$ref": "7920" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8547", + "parameter": { + "$ref": "7921" + }, + "value": { + "$id": "8548", + "kind": "string", + "type": { + "$ref": "7922" + }, + "value": "resource-name123" + } + }, + { + "$id": "8549", + "parameter": { + "$ref": "7923" + }, + "value": { + "$id": "8550", + "kind": "string", + "type": { + "$ref": "7924" + }, + "value": "generic-kafka-endpoint" + } + }, + { + "$id": "8551", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8552", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8553", + "properties": { + "$id": "8554", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8555", + "endpointType": { + "$id": "8556", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8557", + "kind": "model", + "type": { + "$ref": "513" + }, + "value": { + "$id": "8558", + "host": { + "$id": "8559", + "kind": "string", + "type": { + "$ref": "551" + }, + "value": "example.kafka.local:9093" + }, + "authentication": { + "$id": "8560", + "kind": "model", + "type": { + "$ref": "515" + }, + "value": { + "$id": "8561", + "method": { + "$id": "8562", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "Sasl" + }, + "saslSettings": { + "$id": "8563", + "kind": "model", + "type": { + "$ref": "526" + }, + "value": { + "$id": "8564", + "saslType": { + "$id": "8565", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "8566", + "kind": "string", + "type": { + "$ref": "531" + }, + "value": "my-secret" + } + } + } + } + }, + "tls": { + "$id": "8567", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8568", + "mode": { + "$id": "8569", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8570", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "ca-certificates" + } + } + }, + "consumerGroupId": { + "$id": "8571", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "dataflows" + }, + "compression": { + "$id": "8572", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Gzip" + }, + "batching": { + "$id": "8573", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "8574", + "mode": { + "$id": "8575", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "8576", + "kind": "number", + "type": { + "$ref": "560" + }, + "value": 5 + }, + "maxBytes": { + "$id": "8577", + "kind": "number", + "type": { + "$ref": "564" + }, + "value": 1000000 + }, + "maxMessages": { + "$id": "8578", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 100000 + } + } + }, + "partitionStrategy": { + "$id": "8579", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Default" + }, + "kafkaAcks": { + "$id": "8580", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "All" + }, + "copyMqttProperties": { + "$id": "8581", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "cloudEventAttributes": { + "$id": "8582", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "Propagate" + } + } + } + } + }, + "extendedLocation": { + "$id": "8583", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8584", + "name": { + "$id": "8585", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8586", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8587", + "response": { + "$ref": "7932" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8588", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8589", + "properties": { + "$id": "8590", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8591", + "endpointType": { + "$id": "8592", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8593", + "kind": "model", + "type": { + "$ref": "513" + }, + "value": { + "$id": "8594", + "host": { + "$id": "8595", + "kind": "string", + "type": { + "$ref": "551" + }, + "value": "example.kafka.local:9093" + }, + "authentication": { + "$id": "8596", + "kind": "model", + "type": { + "$ref": "515" + }, + "value": { + "$id": "8597", + "method": { + "$id": "8598", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "Sasl" + }, + "saslSettings": { + "$id": "8599", + "kind": "model", + "type": { + "$ref": "526" + }, + "value": { + "$id": "8600", + "saslType": { + "$id": "8601", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "8602", + "kind": "string", + "type": { + "$ref": "531" + }, + "value": "my-secret" + } + } + } + } + }, + "tls": { + "$id": "8603", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8604", + "mode": { + "$id": "8605", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8606", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "ca-certificates" + } + } + }, + "consumerGroupId": { + "$id": "8607", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "dataflows" + }, + "compression": { + "$id": "8608", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Gzip" + }, + "batching": { + "$id": "8609", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "8610", + "mode": { + "$id": "8611", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "8612", + "kind": "number", + "type": { + "$ref": "560" + }, + "value": 5 + }, + "maxBytes": { + "$id": "8613", + "kind": "number", + "type": { + "$ref": "564" + }, + "value": 1000000 + }, + "maxMessages": { + "$id": "8614", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 100000 + } + } + }, + "partitionStrategy": { + "$id": "8615", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Default" + }, + "kafkaAcks": { + "$id": "8616", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "All" + }, + "copyMqttProperties": { + "$id": "8617", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "cloudEventAttributes": { + "$id": "8618", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "Propagate" + } + } + }, + "provisioningState": { + "$id": "8619", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8620", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8621", + "name": { + "$id": "8622", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8623", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8624", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8625", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8626", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8627", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8628", + "createdBy": { + "$id": "8629", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8630", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8631", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8632", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8633", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8634", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8635", + "response": { + "$ref": "7933" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8636", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8637", + "properties": { + "$id": "8638", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8639", + "endpointType": { + "$id": "8640", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8641", + "kind": "model", + "type": { + "$ref": "513" + }, + "value": { + "$id": "8642", + "host": { + "$id": "8643", + "kind": "string", + "type": { + "$ref": "551" + }, + "value": "example.kafka.local:9093" + }, + "authentication": { + "$id": "8644", + "kind": "model", + "type": { + "$ref": "515" + }, + "value": { + "$id": "8645", + "method": { + "$id": "8646", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "Sasl" + }, + "saslSettings": { + "$id": "8647", + "kind": "model", + "type": { + "$ref": "526" + }, + "value": { + "$id": "8648", + "saslType": { + "$id": "8649", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "8650", + "kind": "string", + "type": { + "$ref": "531" + }, + "value": "my-secret" + } + } + } + } + }, + "tls": { + "$id": "8651", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8652", + "mode": { + "$id": "8653", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8654", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "ca-certificates" + } + } + }, + "consumerGroupId": { + "$id": "8655", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "dataflows" + }, + "compression": { + "$id": "8656", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Gzip" + }, + "batching": { + "$id": "8657", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "8658", + "mode": { + "$id": "8659", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "8660", + "kind": "number", + "type": { + "$ref": "560" + }, + "value": 5 + }, + "maxBytes": { + "$id": "8661", + "kind": "number", + "type": { + "$ref": "564" + }, + "value": 1000000 + }, + "maxMessages": { + "$id": "8662", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 100000 + } + } + }, + "partitionStrategy": { + "$id": "8663", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Default" + }, + "kafkaAcks": { + "$id": "8664", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "All" + }, + "copyMqttProperties": { + "$id": "8665", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "cloudEventAttributes": { + "$id": "8666", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "Propagate" + } + } + }, + "provisioningState": { + "$id": "8667", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8668", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8669", + "name": { + "$id": "8670", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8671", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8672", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8673", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8674", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8675", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8676", + "createdBy": { + "$id": "8677", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8678", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8679", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8680", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8681", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8682", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8683", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_LocalStorage", + "description": "DataflowEndpoint_CreateOrUpdate_LocalStorage", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_LocalStorage.json", + "parameters": [ + { + "$id": "8684", + "parameter": { + "$ref": "7912" + }, + "value": { + "$id": "8685", + "kind": "string", + "type": { + "$ref": "7913" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8686", + "parameter": { + "$ref": "7916" + }, + "value": { + "$id": "8687", + "kind": "string", + "type": { + "$ref": "7917" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8688", + "parameter": { + "$ref": "7919" + }, + "value": { + "$id": "8689", + "kind": "string", + "type": { + "$ref": "7920" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8690", + "parameter": { + "$ref": "7921" + }, + "value": { + "$id": "8691", + "kind": "string", + "type": { + "$ref": "7922" + }, + "value": "resource-name123" + } + }, + { + "$id": "8692", + "parameter": { + "$ref": "7923" + }, + "value": { + "$id": "8693", + "kind": "string", + "type": { + "$ref": "7924" + }, + "value": "local-storage-endpoint" + } + }, + { + "$id": "8694", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8695", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8696", + "properties": { + "$id": "8697", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8698", + "endpointType": { + "$id": "8699", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "LocalStorage" + }, + "localStorageSettings": { + "$id": "8700", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "8701", + "persistentVolumeClaimRef": { + "$id": "8702", + "kind": "string", + "type": { + "$ref": "604" + }, + "value": "example-pvc" + } + } + } + } + }, + "extendedLocation": { + "$id": "8703", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8704", + "name": { + "$id": "8705", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8706", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8707", + "response": { + "$ref": "7932" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8708", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8709", + "properties": { + "$id": "8710", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8711", + "endpointType": { + "$id": "8712", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "LocalStorage" + }, + "localStorageSettings": { + "$id": "8713", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "8714", + "persistentVolumeClaimRef": { + "$id": "8715", + "kind": "string", + "type": { + "$ref": "604" + }, + "value": "example-pvc" + } + } + }, + "provisioningState": { + "$id": "8716", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8717", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8718", + "name": { + "$id": "8719", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8720", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8721", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8722", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8723", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8724", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8725", + "createdBy": { + "$id": "8726", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8727", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8728", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8729", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8730", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8731", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8732", + "response": { + "$ref": "7933" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8733", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8734", + "properties": { + "$id": "8735", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8736", + "endpointType": { + "$id": "8737", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "LocalStorage" + }, + "localStorageSettings": { + "$id": "8738", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "8739", + "persistentVolumeClaimRef": { + "$id": "8740", + "kind": "string", + "type": { + "$ref": "604" + }, + "value": "example-pvc" + } + } + }, + "provisioningState": { + "$id": "8741", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8742", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8743", + "name": { + "$id": "8744", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8745", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8746", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8747", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8748", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8749", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8750", + "createdBy": { + "$id": "8751", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8752", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8753", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8754", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8755", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8756", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8757", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_MQTT", + "description": "DataflowEndpoint_CreateOrUpdate_MQTT", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_MQTT.json", + "parameters": [ + { + "$id": "8758", + "parameter": { + "$ref": "7912" + }, + "value": { + "$id": "8759", + "kind": "string", + "type": { + "$ref": "7913" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8760", + "parameter": { + "$ref": "7916" + }, + "value": { + "$id": "8761", + "kind": "string", + "type": { + "$ref": "7917" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8762", + "parameter": { + "$ref": "7919" + }, + "value": { + "$id": "8763", + "kind": "string", + "type": { + "$ref": "7920" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8764", + "parameter": { + "$ref": "7921" + }, + "value": { + "$id": "8765", + "kind": "string", + "type": { + "$ref": "7922" + }, + "value": "resource-name123" + } + }, + { + "$id": "8766", + "parameter": { + "$ref": "7923" + }, + "value": { + "$id": "8767", + "kind": "string", + "type": { + "$ref": "7924" + }, + "value": "generic-mqtt-broker-endpoint" + } + }, + { + "$id": "8768", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8769", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8770", + "properties": { + "$id": "8771", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8772", + "endpointType": { + "$id": "8773", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8774", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "8775", + "host": { + "$id": "8776", + "kind": "string", + "type": { + "$ref": "640" + }, + "value": "example.broker.local:1883" + }, + "authentication": { + "$id": "8777", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "8778", + "method": { + "$id": "8779", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "X509Certificate" + }, + "x509CertificateSettings": { + "$id": "8780", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "8781", + "secretRef": { + "$id": "8782", + "kind": "string", + "type": { + "$ref": "539" + }, + "value": "example-secret" + } + } + } + } + }, + "tls": { + "$id": "8783", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8784", + "mode": { + "$id": "8785", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Disabled" + } + } + }, + "clientIdPrefix": { + "$id": "8786", + "kind": "string", + "type": { + "$ref": "636" + }, + "value": "factory-gateway" + }, + "retain": { + "$id": "8787", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "Keep" + }, + "sessionExpirySeconds": { + "$id": "8788", + "kind": "number", + "type": { + "$ref": "662" + }, + "value": 3600 + }, + "qos": { + "$id": "8789", + "kind": "number", + "type": { + "$ref": "658" + }, + "value": 1 + }, + "protocol": { + "$id": "8790", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "WebSockets" + }, + "maxInflightMessages": { + "$id": "8791", + "kind": "number", + "type": { + "$ref": "654" + }, + "value": 100 + }, + "keepAliveSeconds": { + "$id": "8792", + "kind": "number", + "type": { + "$ref": "647" + }, + "value": 60 + } + } + } + } + }, + "extendedLocation": { + "$id": "8793", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8794", + "name": { + "$id": "8795", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8796", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8797", + "response": { + "$ref": "7932" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8798", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8799", + "properties": { + "$id": "8800", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8801", + "endpointType": { + "$id": "8802", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8803", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "8804", + "host": { + "$id": "8805", + "kind": "string", + "type": { + "$ref": "640" + }, + "value": "example.broker.local:1883" + }, + "authentication": { + "$id": "8806", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "8807", + "method": { + "$id": "8808", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "X509Certificate" + }, + "x509CertificateSettings": { + "$id": "8809", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "8810", + "secretRef": { + "$id": "8811", + "kind": "string", + "type": { + "$ref": "539" + }, + "value": "example-secret" + } + } + } + } + }, + "tls": { + "$id": "8812", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8813", + "mode": { + "$id": "8814", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Disabled" + } + } + }, + "clientIdPrefix": { + "$id": "8815", + "kind": "string", + "type": { + "$ref": "636" + }, + "value": "factory-gateway" + }, + "retain": { + "$id": "8816", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "Keep" + }, + "sessionExpirySeconds": { + "$id": "8817", + "kind": "number", + "type": { + "$ref": "662" + }, + "value": 3600 + }, + "qos": { + "$id": "8818", + "kind": "number", + "type": { + "$ref": "658" + }, + "value": 1 + }, + "protocol": { + "$id": "8819", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "WebSockets" + }, + "maxInflightMessages": { + "$id": "8820", + "kind": "number", + "type": { + "$ref": "654" + }, + "value": 100 + }, + "keepAliveSeconds": { + "$id": "8821", + "kind": "number", + "type": { + "$ref": "647" + }, + "value": 60 + } + } + }, + "provisioningState": { + "$id": "8822", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8823", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8824", + "name": { + "$id": "8825", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8826", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8827", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8828", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8829", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8830", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8831", + "createdBy": { + "$id": "8832", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8833", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8834", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8835", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8836", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8837", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8838", + "response": { + "$ref": "7933" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8839", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8840", + "properties": { + "$id": "8841", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8842", + "endpointType": { + "$id": "8843", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8844", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "8845", + "host": { + "$id": "8846", + "kind": "string", + "type": { + "$ref": "640" + }, + "value": "example.broker.local:1883" + }, + "authentication": { + "$id": "8847", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "8848", + "method": { + "$id": "8849", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "X509Certificate" + }, + "x509CertificateSettings": { + "$id": "8850", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "8851", + "secretRef": { + "$id": "8852", + "kind": "string", + "type": { + "$ref": "539" + }, + "value": "example-secret" + } + } + } + } + }, + "tls": { + "$id": "8853", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8854", + "mode": { + "$id": "8855", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Disabled" + } + } + }, + "clientIdPrefix": { + "$id": "8856", + "kind": "string", + "type": { + "$ref": "636" + }, + "value": "factory-gateway" + }, + "retain": { + "$id": "8857", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "Keep" + }, + "sessionExpirySeconds": { + "$id": "8858", + "kind": "number", + "type": { + "$ref": "662" + }, + "value": 3600 + }, + "qos": { + "$id": "8859", + "kind": "number", + "type": { + "$ref": "658" + }, + "value": 1 + }, + "protocol": { + "$id": "8860", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "WebSockets" + }, + "maxInflightMessages": { + "$id": "8861", + "kind": "number", + "type": { + "$ref": "654" + }, + "value": 100 + }, + "keepAliveSeconds": { + "$id": "8862", + "kind": "number", + "type": { + "$ref": "647" + }, + "value": 60 + } + } + }, + "provisioningState": { + "$id": "8863", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8864", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "8865", + "name": { + "$id": "8866", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8867", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8868", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8869", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8870", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "8871", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "8872", + "createdBy": { + "$id": "8873", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8874", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "8875", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8876", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8877", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8878", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8879", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate", + "description": "DataflowEndpoint_CreateOrUpdate", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "8880", + "parameter": { + "$ref": "7912" + }, + "value": { + "$id": "8881", + "kind": "string", + "type": { + "$ref": "7913" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8882", + "parameter": { + "$ref": "7916" + }, + "value": { + "$id": "8883", + "kind": "string", + "type": { + "$ref": "7917" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8884", + "parameter": { + "$ref": "7919" + }, + "value": { + "$id": "8885", + "kind": "string", + "type": { + "$ref": "7920" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8886", + "parameter": { + "$ref": "7921" + }, + "value": { + "$id": "8887", + "kind": "string", + "type": { + "$ref": "7922" + }, + "value": "resource-name123" + } + }, + { + "$id": "8888", + "parameter": { + "$ref": "7923" + }, + "value": { + "$id": "8889", + "kind": "string", + "type": { + "$ref": "7924" + }, + "value": "resource-name123" + } + }, + { + "$id": "8890", + "parameter": { + "$ref": "7931" + }, + "value": { + "$id": "8891", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "8892", + "properties": { + "$id": "8893", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "8894", + "endpointType": { + "$id": "8895", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "8896", + "kind": "model", + "type": { + "$ref": "387" + }, + "value": { + "$id": "8897", + "authentication": { + "$id": "8898", + "kind": "model", + "type": { + "$ref": "389" + }, + "value": { + "$id": "8899", + "method": { + "$id": "8900", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8901", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8902", + "audience": { + "$id": "8903", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "8904", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "8905", + "clientId": { + "$id": "8906", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "8907", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "8908", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "database": { + "$id": "8909", + "kind": "string", + "type": { + "$ref": "420" + }, + "value": "yqcdpjsifm" + }, + "host": { + "$id": "8910", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "..kusto.windows.net" + }, + "batching": { + "$id": "8911", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "8912", + "latencySeconds": { + "$id": "8913", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "8914", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 9028 + } + } + } + } + }, + "dataLakeStorageSettings": { + "$id": "8915", + "kind": "model", + "type": { + "$ref": "442" + }, + "value": { + "$id": "8916", + "authentication": { + "$id": "8917", + "kind": "model", + "type": { + "$ref": "444" + }, + "value": { + "$id": "8918", + "method": { + "$id": "8919", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "SystemAssignedManagedIdentity" + }, + "accessTokenSettings": { + "$id": "8920", + "kind": "model", + "type": { + "$ref": "449" + }, + "value": { + "$id": "8921", + "secretRef": { + "$id": "8922", + "kind": "string", + "type": { + "$ref": "451" + }, + "value": "sevriyphcvnlrnfudqzejecwa" + } + } + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8923", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8924", + "audience": { + "$id": "8925", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "8926", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "8927", + "clientId": { + "$id": "8928", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "8929", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "8930", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "host": { + "$id": "8931", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": ".blob.core.windows.net" + }, + "batching": { + "$id": "8932", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "8933", + "latencySeconds": { + "$id": "8934", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "8935", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 9028 + } + } + } + } + }, + "fabricOneLakeSettings": { + "$id": "8936", + "kind": "model", + "type": { + "$ref": "474" + }, + "value": { + "$id": "8937", + "authentication": { + "$id": "8938", + "kind": "model", + "type": { + "$ref": "476" + }, + "value": { + "$id": "8939", + "method": { + "$id": "8940", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8941", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8942", + "audience": { + "$id": "8943", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "8944", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "8945", + "clientId": { + "$id": "8946", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "8947", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "8948", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "names": { + "$id": "8949", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "8950", + "lakehouseName": { + "$id": "8951", + "kind": "string", + "type": { + "$ref": "491" + }, + "value": "wpeathi" + }, + "workspaceName": { + "$id": "8952", + "kind": "string", + "type": { + "$ref": "495" + }, + "value": "nwgmitkbljztgms" + } + } + }, + "oneLakePathType": { + "$id": "8953", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "Files" + }, + "host": { + "$id": "8954", + "kind": "string", + "type": { + "$ref": "504" + }, + "value": "https://.fabric.microsoft.com" + }, + "batching": { + "$id": "8955", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "8956", + "latencySeconds": { + "$id": "8957", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "8958", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 9028 + } + } + } + } + }, + "kafkaSettings": { + "$id": "8959", + "kind": "model", + "type": { + "$ref": "513" + }, + "value": { + "$id": "8960", + "authentication": { + "$id": "8961", + "kind": "model", + "type": { + "$ref": "515" + }, + "value": { + "$id": "8962", + "method": { + "$id": "8963", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8964", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "8965", + "audience": { + "$id": "8966", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "8967", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "8968", + "clientId": { + "$id": "8969", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "8970", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "8971", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "saslSettings": { + "$id": "8972", + "kind": "model", + "type": { + "$ref": "526" + }, + "value": { + "$id": "8973", + "saslType": { + "$id": "8974", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "8975", + "kind": "string", + "type": { + "$ref": "531" + }, + "value": "visyxoztqnylvbyokhtmpdkwes" + } + } + }, + "x509CertificateSettings": { + "$id": "8976", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "8977", + "secretRef": { + "$id": "8978", + "kind": "string", + "type": { + "$ref": "539" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "consumerGroupId": { + "$id": "8979", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "ukkzcjiyenhxokat" + }, + "host": { + "$id": "8980", + "kind": "string", + "type": { + "$ref": "551" + }, + "value": "pwcqfiqclcgneolpewnyavoulbip" + }, + "batching": { + "$id": "8981", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "8982", + "mode": { + "$id": "8983", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "8984", + "kind": "number", + "type": { + "$ref": "560" + }, + "value": 3679 + }, + "maxBytes": { + "$id": "8985", + "kind": "number", + "type": { + "$ref": "564" + }, + "value": 8887 + }, + "maxMessages": { + "$id": "8986", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 2174 + } + } + }, + "copyMqttProperties": { + "$id": "8987", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "compression": { + "$id": "8988", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "None" + }, + "kafkaAcks": { + "$id": "8989", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Zero" + }, + "partitionStrategy": { + "$id": "8990", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Default" + }, + "tls": { + "$id": "8991", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "8992", + "mode": { + "$id": "8993", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8994", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "tectjjvukvelsreihwadh" + } + } + } + } + }, + "localStorageSettings": { + "$id": "8995", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "8996", + "persistentVolumeClaimRef": { + "$id": "8997", + "kind": "string", + "type": { + "$ref": "604" + }, + "value": "jjwqwvd" + } + } + }, + "mqttSettings": { + "$id": "8998", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "8999", + "authentication": { + "$id": "9000", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "9001", + "method": { + "$id": "9002", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9003", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9004", + "audience": { + "$id": "9005", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9006", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9007", + "clientId": { + "$id": "9008", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9009", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9010", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "serviceAccountTokenSettings": { + "$id": "9011", + "kind": "model", + "type": { + "$ref": "623" + }, + "value": { + "$id": "9012", + "audience": { + "$id": "9013", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "ejbklrbxgjaqleoycgpje" + } + } + }, + "x509CertificateSettings": { + "$id": "9014", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "9015", + "secretRef": { + "$id": "9016", + "kind": "string", + "type": { + "$ref": "539" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "clientIdPrefix": { + "$id": "9017", + "kind": "string", + "type": { + "$ref": "636" + }, + "value": "kkljsdxdirfhwxtkavldekeqhv" + }, + "host": { + "$id": "9018", + "kind": "string", + "type": { + "$ref": "640" + }, + "value": "nyhnxqnbspstctl" + }, + "protocol": { + "$id": "9019", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Mqtt" + }, + "keepAliveSeconds": { + "$id": "9020", + "kind": "number", + "type": { + "$ref": "647" + }, + "value": 0 + }, + "retain": { + "$id": "9021", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "Keep" + }, + "maxInflightMessages": { + "$id": "9022", + "kind": "number", + "type": { + "$ref": "654" + }, + "value": 0 + }, + "qos": { + "$id": "9023", + "kind": "number", + "type": { + "$ref": "658" + }, + "value": 1 + }, + "sessionExpirySeconds": { + "$id": "9024", + "kind": "number", + "type": { + "$ref": "662" + }, + "value": 0 + }, + "tls": { + "$id": "9025", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "9026", + "mode": { + "$id": "9027", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9028", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "tectjjvukvelsreihwadh" + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "9029", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "9030", + "name": { + "$id": "9031", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9032", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "9033", + "response": { + "$ref": "7932" + }, + "statusCode": 200, + "bodyValue": { + "$id": "9034", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "9035", + "properties": { + "$id": "9036", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "9037", + "endpointType": { + "$id": "9038", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "9039", + "kind": "model", + "type": { + "$ref": "387" + }, + "value": { + "$id": "9040", + "authentication": { + "$id": "9041", + "kind": "model", + "type": { + "$ref": "389" + }, + "value": { + "$id": "9042", + "method": { + "$id": "9043", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9044", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9045", + "audience": { + "$id": "9046", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9047", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9048", + "clientId": { + "$id": "9049", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9050", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9051", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "database": { + "$id": "9052", + "kind": "string", + "type": { + "$ref": "420" + }, + "value": "yqcdpjsifm" + }, + "host": { + "$id": "9053", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "..kusto.windows.net" + }, + "batching": { + "$id": "9054", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "9055", + "latencySeconds": { + "$id": "9056", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9057", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 171 + } + } + } + } + }, + "dataLakeStorageSettings": { + "$id": "9058", + "kind": "model", + "type": { + "$ref": "442" + }, + "value": { + "$id": "9059", + "authentication": { + "$id": "9060", + "kind": "model", + "type": { + "$ref": "444" + }, + "value": { + "$id": "9061", + "method": { + "$id": "9062", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "SystemAssignedManagedIdentity" + }, + "accessTokenSettings": { + "$id": "9063", + "kind": "model", + "type": { + "$ref": "449" + }, + "value": { + "$id": "9064", + "secretRef": { + "$id": "9065", + "kind": "string", + "type": { + "$ref": "451" + }, + "value": "sevriyphcvnlrnfudqzejecwa" + } + } + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9066", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9067", + "audience": { + "$id": "9068", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9069", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9070", + "clientId": { + "$id": "9071", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9072", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9073", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "host": { + "$id": "9074", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": ".blob.core.windows.net" + }, + "batching": { + "$id": "9075", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "9076", + "latencySeconds": { + "$id": "9077", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9078", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 171 + } + } + } + } + }, + "fabricOneLakeSettings": { + "$id": "9079", + "kind": "model", + "type": { + "$ref": "474" + }, + "value": { + "$id": "9080", + "authentication": { + "$id": "9081", + "kind": "model", + "type": { + "$ref": "476" + }, + "value": { + "$id": "9082", + "method": { + "$id": "9083", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9084", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9085", + "audience": { + "$id": "9086", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9087", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9088", + "clientId": { + "$id": "9089", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9090", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9091", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "names": { + "$id": "9092", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "9093", + "lakehouseName": { + "$id": "9094", + "kind": "string", + "type": { + "$ref": "491" + }, + "value": "wpeathi" + }, + "workspaceName": { + "$id": "9095", + "kind": "string", + "type": { + "$ref": "495" + }, + "value": "nwgmitkbljztgms" + } + } + }, + "oneLakePathType": { + "$id": "9096", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "Files" + }, + "host": { + "$id": "9097", + "kind": "string", + "type": { + "$ref": "504" + }, + "value": "https://.fabric.microsoft.com" + }, + "batching": { + "$id": "9098", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "9099", + "latencySeconds": { + "$id": "9100", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9101", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 171 + } + } + } + } + }, + "kafkaSettings": { + "$id": "9102", + "kind": "model", + "type": { + "$ref": "513" + }, + "value": { + "$id": "9103", + "authentication": { + "$id": "9104", + "kind": "model", + "type": { + "$ref": "515" + }, + "value": { + "$id": "9105", + "method": { + "$id": "9106", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9107", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9108", + "audience": { + "$id": "9109", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9110", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9111", + "clientId": { + "$id": "9112", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9113", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9114", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "saslSettings": { + "$id": "9115", + "kind": "model", + "type": { + "$ref": "526" + }, + "value": { + "$id": "9116", + "saslType": { + "$id": "9117", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "9118", + "kind": "string", + "type": { + "$ref": "531" + }, + "value": "visyxoztqnylvbyokhtmpdkwes" + } + } + }, + "x509CertificateSettings": { + "$id": "9119", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "9120", + "secretRef": { + "$id": "9121", + "kind": "string", + "type": { + "$ref": "539" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "consumerGroupId": { + "$id": "9122", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "ukkzcjiyenhxokat" + }, + "host": { + "$id": "9123", + "kind": "string", + "type": { + "$ref": "551" + }, + "value": "pwcqfiqclcgneolpewnyavoulbip" + }, + "batching": { + "$id": "9124", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "9125", + "mode": { + "$id": "9126", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "9127", + "kind": "number", + "type": { + "$ref": "560" + }, + "value": 3679 + }, + "maxBytes": { + "$id": "9128", + "kind": "number", + "type": { + "$ref": "564" + }, + "value": 8887 + }, + "maxMessages": { + "$id": "9129", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 2174 + } + } + }, + "copyMqttProperties": { + "$id": "9130", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "compression": { + "$id": "9131", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "None" + }, + "kafkaAcks": { + "$id": "9132", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Zero" + }, + "partitionStrategy": { + "$id": "9133", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Default" + }, + "tls": { + "$id": "9134", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "9135", + "mode": { + "$id": "9136", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9137", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "tectjjvukvelsreihwadh" + } + } + } + } + }, + "localStorageSettings": { + "$id": "9138", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "9139", + "persistentVolumeClaimRef": { + "$id": "9140", + "kind": "string", + "type": { + "$ref": "604" + }, + "value": "jjwqwvd" + } + } + }, + "mqttSettings": { + "$id": "9141", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "9142", + "authentication": { + "$id": "9143", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "9144", + "method": { + "$id": "9145", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9146", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9147", + "audience": { + "$id": "9148", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9149", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9150", + "clientId": { + "$id": "9151", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9152", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9153", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "serviceAccountTokenSettings": { + "$id": "9154", + "kind": "model", + "type": { + "$ref": "623" + }, + "value": { + "$id": "9155", + "audience": { + "$id": "9156", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "ejbklrbxgjaqleoycgpje" + } + } + }, + "x509CertificateSettings": { + "$id": "9157", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "9158", + "secretRef": { + "$id": "9159", + "kind": "string", + "type": { + "$ref": "539" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "clientIdPrefix": { + "$id": "9160", + "kind": "string", + "type": { + "$ref": "636" + }, + "value": "kkljsdxdirfhwxtkavldekeqhv" + }, + "host": { + "$id": "9161", + "kind": "string", + "type": { + "$ref": "640" + }, + "value": "nyhnxqnbspstctl" + }, + "protocol": { + "$id": "9162", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Mqtt" + }, + "keepAliveSeconds": { + "$id": "9163", + "kind": "number", + "type": { + "$ref": "647" + }, + "value": 0 + }, + "retain": { + "$id": "9164", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "Keep" + }, + "maxInflightMessages": { + "$id": "9165", + "kind": "number", + "type": { + "$ref": "654" + }, + "value": 0 + }, + "qos": { + "$id": "9166", + "kind": "number", + "type": { + "$ref": "658" + }, + "value": 1 + }, + "sessionExpirySeconds": { + "$id": "9167", + "kind": "number", + "type": { + "$ref": "662" + }, + "value": 0 + }, + "tls": { + "$id": "9168", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "9169", + "mode": { + "$id": "9170", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9171", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "tectjjvukvelsreihwadh" + } + } + } + } + }, + "provisioningState": { + "$id": "9172", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "9173", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "9174", + "name": { + "$id": "9175", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9176", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "9177", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "9178", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "9179", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "9180", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "9181", + "createdBy": { + "$id": "9182", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "9183", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "9184", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "9185", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "9186", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "9187", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "9188", + "response": { + "$ref": "7933" + }, + "statusCode": 201, + "bodyValue": { + "$id": "9189", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "9190", + "properties": { + "$id": "9191", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "9192", + "endpointType": { + "$id": "9193", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "9194", + "kind": "model", + "type": { + "$ref": "387" + }, + "value": { + "$id": "9195", + "authentication": { + "$id": "9196", + "kind": "model", + "type": { + "$ref": "389" + }, + "value": { + "$id": "9197", + "method": { + "$id": "9198", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9199", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9200", + "audience": { + "$id": "9201", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9202", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9203", + "clientId": { + "$id": "9204", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9205", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9206", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "database": { + "$id": "9207", + "kind": "string", + "type": { + "$ref": "420" + }, + "value": "yqcdpjsifm" + }, + "host": { + "$id": "9208", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "..kusto.windows.net" + }, + "batching": { + "$id": "9209", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "9210", + "latencySeconds": { + "$id": "9211", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9212", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 171 + } + } + } + } + }, + "dataLakeStorageSettings": { + "$id": "9213", + "kind": "model", + "type": { + "$ref": "442" + }, + "value": { + "$id": "9214", + "authentication": { + "$id": "9215", + "kind": "model", + "type": { + "$ref": "444" + }, + "value": { + "$id": "9216", + "method": { + "$id": "9217", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "SystemAssignedManagedIdentity" + }, + "accessTokenSettings": { + "$id": "9218", + "kind": "model", + "type": { + "$ref": "449" + }, + "value": { + "$id": "9219", + "secretRef": { + "$id": "9220", + "kind": "string", + "type": { + "$ref": "451" + }, + "value": "sevriyphcvnlrnfudqzejecwa" + } + } + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9221", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9222", + "audience": { + "$id": "9223", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9224", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9225", + "clientId": { + "$id": "9226", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9227", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9228", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "host": { + "$id": "9229", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": ".blob.core.windows.net" + }, + "batching": { + "$id": "9230", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "9231", + "latencySeconds": { + "$id": "9232", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9233", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 171 + } + } + } + } + }, + "fabricOneLakeSettings": { + "$id": "9234", + "kind": "model", + "type": { + "$ref": "474" + }, + "value": { + "$id": "9235", + "authentication": { + "$id": "9236", + "kind": "model", + "type": { + "$ref": "476" + }, + "value": { + "$id": "9237", + "method": { + "$id": "9238", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9239", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9240", + "audience": { + "$id": "9241", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9242", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9243", + "clientId": { + "$id": "9244", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9245", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9246", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "names": { + "$id": "9247", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "9248", + "lakehouseName": { + "$id": "9249", + "kind": "string", + "type": { + "$ref": "491" + }, + "value": "wpeathi" + }, + "workspaceName": { + "$id": "9250", + "kind": "string", + "type": { + "$ref": "495" + }, + "value": "nwgmitkbljztgms" + } + } + }, + "oneLakePathType": { + "$id": "9251", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "Files" + }, + "host": { + "$id": "9252", + "kind": "string", + "type": { + "$ref": "504" + }, + "value": "https://.fabric.microsoft.com" + }, + "batching": { + "$id": "9253", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "9254", + "latencySeconds": { + "$id": "9255", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9256", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 171 + } + } + } + } + }, + "kafkaSettings": { + "$id": "9257", + "kind": "model", + "type": { + "$ref": "513" + }, + "value": { + "$id": "9258", + "authentication": { + "$id": "9259", + "kind": "model", + "type": { + "$ref": "515" + }, + "value": { + "$id": "9260", + "method": { + "$id": "9261", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9262", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9263", + "audience": { + "$id": "9264", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9265", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9266", + "clientId": { + "$id": "9267", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9268", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9269", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "saslSettings": { + "$id": "9270", + "kind": "model", + "type": { + "$ref": "526" + }, + "value": { + "$id": "9271", + "saslType": { + "$id": "9272", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "9273", + "kind": "string", + "type": { + "$ref": "531" + }, + "value": "visyxoztqnylvbyokhtmpdkwes" + } + } + }, + "x509CertificateSettings": { + "$id": "9274", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "9275", + "secretRef": { + "$id": "9276", + "kind": "string", + "type": { + "$ref": "539" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "consumerGroupId": { + "$id": "9277", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "ukkzcjiyenhxokat" + }, + "host": { + "$id": "9278", + "kind": "string", + "type": { + "$ref": "551" + }, + "value": "pwcqfiqclcgneolpewnyavoulbip" + }, + "batching": { + "$id": "9279", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "9280", + "mode": { + "$id": "9281", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "9282", + "kind": "number", + "type": { + "$ref": "560" + }, + "value": 3679 + }, + "maxBytes": { + "$id": "9283", + "kind": "number", + "type": { + "$ref": "564" + }, + "value": 8887 + }, + "maxMessages": { + "$id": "9284", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 2174 + } + } + }, + "copyMqttProperties": { + "$id": "9285", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "compression": { + "$id": "9286", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "None" + }, + "kafkaAcks": { + "$id": "9287", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Zero" + }, + "partitionStrategy": { + "$id": "9288", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Default" + }, + "tls": { + "$id": "9289", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "9290", + "mode": { + "$id": "9291", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9292", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "tectjjvukvelsreihwadh" + } + } + } + } + }, + "localStorageSettings": { + "$id": "9293", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "9294", + "persistentVolumeClaimRef": { + "$id": "9295", + "kind": "string", + "type": { + "$ref": "604" + }, + "value": "jjwqwvd" + } + } + }, + "mqttSettings": { + "$id": "9296", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "9297", + "authentication": { + "$id": "9298", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "9299", + "method": { + "$id": "9300", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9301", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9302", + "audience": { + "$id": "9303", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9304", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9305", + "clientId": { + "$id": "9306", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9307", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9308", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "serviceAccountTokenSettings": { + "$id": "9309", + "kind": "model", + "type": { + "$ref": "623" + }, + "value": { + "$id": "9310", + "audience": { + "$id": "9311", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "ejbklrbxgjaqleoycgpje" + } + } + }, + "x509CertificateSettings": { + "$id": "9312", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "9313", + "secretRef": { + "$id": "9314", + "kind": "string", + "type": { + "$ref": "539" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "clientIdPrefix": { + "$id": "9315", + "kind": "string", + "type": { + "$ref": "636" + }, + "value": "kkljsdxdirfhwxtkavldekeqhv" + }, + "host": { + "$id": "9316", + "kind": "string", + "type": { + "$ref": "640" + }, + "value": "nyhnxqnbspstctl" + }, + "protocol": { + "$id": "9317", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Mqtt" + }, + "keepAliveSeconds": { + "$id": "9318", + "kind": "number", + "type": { + "$ref": "647" + }, + "value": 0 + }, + "retain": { + "$id": "9319", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "Keep" + }, + "maxInflightMessages": { + "$id": "9320", + "kind": "number", + "type": { + "$ref": "654" + }, + "value": 0 + }, + "qos": { + "$id": "9321", + "kind": "number", + "type": { + "$ref": "658" + }, + "value": 1 + }, + "sessionExpirySeconds": { + "$id": "9322", + "kind": "number", + "type": { + "$ref": "662" + }, + "value": 0 + }, + "tls": { + "$id": "9323", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "9324", + "mode": { + "$id": "9325", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9326", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "tectjjvukvelsreihwadh" + } + } + } + } + }, + "provisioningState": { + "$id": "9327", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "9328", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "9329", + "name": { + "$id": "9330", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9331", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "9332", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "9333", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "9334", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "9335", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "9336", + "createdBy": { + "$id": "9337", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "9338", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "9339", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "9340", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "9341", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "9342", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "9343", + "Name": "delete", + "ResourceName": "DataflowEndpointResource", + "Doc": "Delete a DataflowEndpointResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "9344", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "9345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "9346", + "Type": { + "$id": "9347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "9348", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "9349", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "9350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "9351", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "9352", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "9353", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "9354", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "9355", + "Name": "dataflowEndpointName", + "NameInRequest": "dataflowEndpointName", + "Doc": "Name of Instance dataflowEndpoint resource", + "Type": { + "$id": "9356", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "9357", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "9358", + "kind": "constant", + "valueType": { + "$id": "9359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "9360", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "9361", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "9362", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "9363", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "9364", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "9365", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowEndpoints/{dataflowEndpointName}", + "BufferResponse": true, + "LongRunning": { + "$id": "9366", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "9367", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint.delete", + "Decorators": [], + "Examples": [ + { + "$id": "9368", + "kind": "http", + "name": "DataflowEndpoint_Delete", + "description": "DataflowEndpoint_Delete", + "filePath": "2025-04-01/DataflowEndpoint_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "9369", + "parameter": { + "$ref": "9344" + }, + "value": { + "$id": "9370", + "kind": "string", + "type": { + "$ref": "9345" + }, + "value": "2025-04-01" + } + }, + { + "$id": "9371", + "parameter": { + "$ref": "9348" + }, + "value": { + "$id": "9372", + "kind": "string", + "type": { + "$ref": "9349" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "9373", + "parameter": { + "$ref": "9351" + }, + "value": { + "$id": "9374", + "kind": "string", + "type": { + "$ref": "9352" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "9375", + "parameter": { + "$ref": "9353" + }, + "value": { + "$id": "9376", + "kind": "string", + "type": { + "$ref": "9354" + }, + "value": "resource-name123" + } + }, + { + "$id": "9377", + "parameter": { + "$ref": "9355" + }, + "value": { + "$id": "9378", + "kind": "string", + "type": { + "$ref": "9356" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "9379", + "response": { + "$ref": "9360" + }, + "statusCode": 202 + }, + { + "$id": "9380", + "response": { + "$ref": "9365" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "9381", + "Name": "listByResourceGroup", + "ResourceName": "DataflowEndpointResource", + "Doc": "List DataflowEndpointResource resources by InstanceResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "9382", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "9383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "9384", + "Type": { + "$id": "9385", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-04-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "9386", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "9387", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "9388", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "9389", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "9390", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "9391", + "Name": "instanceName", + "NameInRequest": "instanceName", + "Doc": "Name of instance.", + "Type": { + "$id": "9392", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "9393", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "9394", + "kind": "constant", + "valueType": { + "$id": "9395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "9396", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "748" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowEndpoints", + "BufferResponse": true, + "Paging": { + "$id": "9397", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "9398", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "9399", + "kind": "http", + "name": "DataflowEndpoint_ListByResourceGroup", + "description": "DataflowEndpoint_ListByResourceGroup", + "filePath": "2025-04-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "9400", + "parameter": { + "$ref": "9382" + }, + "value": { + "$id": "9401", + "kind": "string", + "type": { + "$ref": "9383" + }, + "value": "2025-04-01" + } + }, + { + "$id": "9402", + "parameter": { + "$ref": "9386" + }, + "value": { + "$id": "9403", + "kind": "string", + "type": { + "$ref": "9387" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "9404", + "parameter": { + "$ref": "9389" + }, + "value": { + "$id": "9405", + "kind": "string", + "type": { + "$ref": "9390" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "9406", + "parameter": { + "$ref": "9391" + }, + "value": { + "$id": "9407", + "kind": "string", + "type": { + "$ref": "9392" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "9408", + "response": { + "$ref": "9396" + }, + "statusCode": 200, + "bodyValue": { + "$id": "9409", + "kind": "model", + "type": { + "$ref": "748" + }, + "value": { + "$id": "9410", + "value": { + "$id": "9411", + "kind": "array", + "type": { + "$ref": "750" + }, + "value": [ + { + "$id": "9412", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "9413", + "properties": { + "$id": "9414", + "kind": "model", + "type": { + "$ref": "382" + }, + "value": { + "$id": "9415", + "endpointType": { + "$id": "9416", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "9417", + "kind": "model", + "type": { + "$ref": "387" + }, + "value": { + "$id": "9418", + "authentication": { + "$id": "9419", + "kind": "model", + "type": { + "$ref": "389" + }, + "value": { + "$id": "9420", + "method": { + "$id": "9421", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9422", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9423", + "audience": { + "$id": "9424", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9425", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9426", + "clientId": { + "$id": "9427", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9428", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9429", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "database": { + "$id": "9430", + "kind": "string", + "type": { + "$ref": "420" + }, + "value": "yqcdpjsifm" + }, + "host": { + "$id": "9431", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "..kusto.windows.net" + }, + "batching": { + "$id": "9432", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "9433", + "latencySeconds": { + "$id": "9434", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9435", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 171 + } + } + } + } + }, + "dataLakeStorageSettings": { + "$id": "9436", + "kind": "model", + "type": { + "$ref": "442" + }, + "value": { + "$id": "9437", + "authentication": { + "$id": "9438", + "kind": "model", + "type": { + "$ref": "444" + }, + "value": { + "$id": "9439", + "method": { + "$id": "9440", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "SystemAssignedManagedIdentity" + }, + "accessTokenSettings": { + "$id": "9441", + "kind": "model", + "type": { + "$ref": "449" + }, + "value": { + "$id": "9442", + "secretRef": { + "$id": "9443", + "kind": "string", + "type": { + "$ref": "451" + }, + "value": "sevriyphcvnlrnfudqzejecwa" + } + } + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9444", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9445", + "audience": { + "$id": "9446", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9447", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9448", + "clientId": { + "$id": "9449", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9450", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9451", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "host": { + "$id": "9452", + "kind": "string", + "type": { + "$ref": "465" + }, + "value": ".blob.core.windows.net" + }, + "batching": { + "$id": "9453", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "9454", + "latencySeconds": { + "$id": "9455", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9456", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 171 + } + } + } + } + }, + "fabricOneLakeSettings": { + "$id": "9457", + "kind": "model", + "type": { + "$ref": "474" + }, + "value": { + "$id": "9458", + "authentication": { + "$id": "9459", + "kind": "model", + "type": { + "$ref": "476" + }, + "value": { + "$id": "9460", + "method": { + "$id": "9461", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9462", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9463", + "audience": { + "$id": "9464", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9465", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9466", + "clientId": { + "$id": "9467", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9468", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9469", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "names": { + "$id": "9470", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "9471", + "lakehouseName": { + "$id": "9472", + "kind": "string", + "type": { + "$ref": "491" + }, + "value": "wpeathi" + }, + "workspaceName": { + "$id": "9473", + "kind": "string", + "type": { + "$ref": "495" + }, + "value": "nwgmitkbljztgms" + } + } + }, + "oneLakePathType": { + "$id": "9474", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "Files" + }, + "host": { + "$id": "9475", + "kind": "string", + "type": { + "$ref": "504" + }, + "value": "https://.fabric.microsoft.com" + }, + "batching": { + "$id": "9476", + "kind": "model", + "type": { + "$ref": "428" + }, + "value": { + "$id": "9477", + "latencySeconds": { + "$id": "9478", + "kind": "number", + "type": { + "$ref": "430" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9479", + "kind": "number", + "type": { + "$ref": "434" + }, + "value": 171 + } + } + } + } + }, + "kafkaSettings": { + "$id": "9480", + "kind": "model", + "type": { + "$ref": "513" + }, + "value": { + "$id": "9481", + "authentication": { + "$id": "9482", + "kind": "model", + "type": { + "$ref": "515" + }, + "value": { + "$id": "9483", + "method": { + "$id": "9484", + "kind": "string", + "type": { + "$ref": "42" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9485", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9486", + "audience": { + "$id": "9487", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9488", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9489", + "clientId": { + "$id": "9490", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9491", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9492", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "saslSettings": { + "$id": "9493", + "kind": "model", + "type": { + "$ref": "526" + }, + "value": { + "$id": "9494", + "saslType": { + "$id": "9495", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "9496", + "kind": "string", + "type": { + "$ref": "531" + }, + "value": "visyxoztqnylvbyokhtmpdkwes" + } + } + }, + "x509CertificateSettings": { + "$id": "9497", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "9498", + "secretRef": { + "$id": "9499", + "kind": "string", + "type": { + "$ref": "539" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "consumerGroupId": { + "$id": "9500", + "kind": "string", + "type": { + "$ref": "547" + }, + "value": "ukkzcjiyenhxokat" + }, + "host": { + "$id": "9501", + "kind": "string", + "type": { + "$ref": "551" + }, + "value": "pwcqfiqclcgneolpewnyavoulbip" + }, + "batching": { + "$id": "9502", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "9503", + "mode": { + "$id": "9504", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "9505", + "kind": "number", + "type": { + "$ref": "560" + }, + "value": 3679 + }, + "maxBytes": { + "$id": "9506", + "kind": "number", + "type": { + "$ref": "564" + }, + "value": 8887 + }, + "maxMessages": { + "$id": "9507", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 2174 + } + } + }, + "copyMqttProperties": { + "$id": "9508", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "compression": { + "$id": "9509", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "None" + }, + "kafkaAcks": { + "$id": "9510", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Zero" + }, + "partitionStrategy": { + "$id": "9511", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "Default" + }, + "tls": { + "$id": "9512", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "9513", + "mode": { + "$id": "9514", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9515", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "tectjjvukvelsreihwadh" + } + } + } + } + }, + "localStorageSettings": { + "$id": "9516", + "kind": "model", + "type": { + "$ref": "602" + }, + "value": { + "$id": "9517", + "persistentVolumeClaimRef": { + "$id": "9518", + "kind": "string", + "type": { + "$ref": "604" + }, + "value": "jjwqwvd" + } + } + }, + "mqttSettings": { + "$id": "9519", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "9520", + "authentication": { + "$id": "9521", + "kind": "model", + "type": { + "$ref": "612" + }, + "value": { + "$id": "9522", + "method": { + "$id": "9523", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9524", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "9525", + "audience": { + "$id": "9526", + "kind": "string", + "type": { + "$ref": "396" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9527", + "kind": "model", + "type": { + "$ref": "402" + }, + "value": { + "$id": "9528", + "clientId": { + "$id": "9529", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9530", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9531", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "serviceAccountTokenSettings": { + "$id": "9532", + "kind": "model", + "type": { + "$ref": "623" + }, + "value": { + "$id": "9533", + "audience": { + "$id": "9534", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "ejbklrbxgjaqleoycgpje" + } + } + }, + "x509CertificateSettings": { + "$id": "9535", + "kind": "model", + "type": { + "$ref": "537" + }, + "value": { + "$id": "9536", + "secretRef": { + "$id": "9537", + "kind": "string", + "type": { + "$ref": "539" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "clientIdPrefix": { + "$id": "9538", + "kind": "string", + "type": { + "$ref": "636" + }, + "value": "kkljsdxdirfhwxtkavldekeqhv" + }, + "host": { + "$id": "9539", + "kind": "string", + "type": { + "$ref": "640" + }, + "value": "nyhnxqnbspstctl" + }, + "protocol": { + "$id": "9540", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Mqtt" + }, + "keepAliveSeconds": { + "$id": "9541", + "kind": "number", + "type": { + "$ref": "647" + }, + "value": 0 + }, + "retain": { + "$id": "9542", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "Keep" + }, + "maxInflightMessages": { + "$id": "9543", + "kind": "number", + "type": { + "$ref": "654" + }, + "value": 0 + }, + "qos": { + "$id": "9544", + "kind": "number", + "type": { + "$ref": "658" + }, + "value": 1 + }, + "sessionExpirySeconds": { + "$id": "9545", + "kind": "number", + "type": { + "$ref": "662" + }, + "value": 0 + }, + "tls": { + "$id": "9546", + "kind": "model", + "type": { + "$ref": "586" + }, + "value": { + "$id": "9547", + "mode": { + "$id": "9548", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9549", + "kind": "string", + "type": { + "$ref": "591" + }, + "value": "tectjjvukvelsreihwadh" + } + } + } + } + }, + "provisioningState": { + "$id": "9550", + "kind": "string", + "type": { + "$ref": "126" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "9551", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "9552", + "name": { + "$id": "9553", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9554", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "9555", + "kind": "string", + "type": { + "$ref": "340" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "9556", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "9557", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "iay" + }, + "systemData": { + "$id": "9558", + "kind": "model", + "type": { + "$ref": "354" + }, + "value": { + "$id": "9559", + "createdBy": { + "$id": "9560", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "9561", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "createdAt": { + "$id": "9562", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "9563", + "kind": "string", + "type": { + "$ref": "368" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "9564", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "9565", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "9566", + "kind": "string", + "type": { + "$ref": "754" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "9567" + }, + "Parent": "IoTOperationsClient", + "Parameters": [ + { + "$id": "9568", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "9569", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "9570", + "Type": { + "$id": "9571", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint" + } + ], + "Auth": { + "$id": "9572", + "OAuth2": { + "$id": "9573", + "Scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.net8.0.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.net8.0.cs index be41ef5b289c..61a91910b891 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.net8.0.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.net8.0.cs @@ -215,12 +215,30 @@ public static partial class ArmMongoClusterModelFactory public static Azure.ResourceManager.MongoCluster.MongoClusterPrivateEndpointConnectionResourceData MongoClusterPrivateEndpointConnectionResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateEndpointConnectionProperties properties = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkResourceData MongoClusterPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkResourceProperties properties = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkResourceProperties MongoClusterPrivateLinkResourceProperties(string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } - public static Azure.ResourceManager.MongoCluster.Models.MongoClusterProperties MongoClusterProperties(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode? createMode = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode?), Azure.ResourceManager.MongoCluster.Models.MongoClusterRestoreContent restoreParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicaContent replicaParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterAdministratorProperties administrator = null, string serverVersion = null, string connectionString = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState? provisioningState = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState?), Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus? clusterStatus = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus?), Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess?), Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? highAvailabilityTargetMode = default(Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode?), long? storageSizeGb = default(long?), int? shardingShardCount = default(int?), string computeTier = null, string backupEarliestRestoreTime = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable previewFeatures = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationProperties replica = null, string infrastructureVersion = null) { throw null; } + public static Azure.ResourceManager.MongoCluster.Models.MongoClusterProperties MongoClusterProperties(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode? createMode = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode?), Azure.ResourceManager.MongoCluster.Models.MongoClusterRestoreContent restoreParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicaContent replicaParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterAdministratorProperties administrator = null, string serverVersion = null, string connectionString = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState? provisioningState = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState?), Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus? clusterStatus = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus?), Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess?), Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? highAvailabilityTargetMode = default(Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode?), long? storageSizeGb = default(long?), int? shardingShardCount = default(int?), string computeTier = null, string backupEarliestRestoreTime = null, Azure.ResourceManager.MongoCluster.Models.DataApiMode? dataApiMode = default(Azure.ResourceManager.MongoCluster.Models.DataApiMode?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable previewFeatures = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationProperties replica = null, string infrastructureVersion = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterReplica MongoClusterReplica(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterProperties properties = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationProperties MongoClusterReplicationProperties(Azure.Core.ResourceIdentifier sourceResourceId = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationRole? role = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationRole?), Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationState? replicationState = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationState?)) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.PromoteReplicaContent PromoteReplicaContent(Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteOption promoteOption = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteOption), Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteMode? mode = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteMode?)) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataApiMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataApiMode(string value) { throw null; } + public static Azure.ResourceManager.MongoCluster.Models.DataApiMode Disabled { get { throw null; } } + public static Azure.ResourceManager.MongoCluster.Models.DataApiMode Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MongoCluster.Models.DataApiMode 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.MongoCluster.Models.DataApiMode left, Azure.ResourceManager.MongoCluster.Models.DataApiMode right) { throw null; } + public static implicit operator Azure.ResourceManager.MongoCluster.Models.DataApiMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MongoCluster.Models.DataApiMode left, Azure.ResourceManager.MongoCluster.Models.DataApiMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct HighAvailabilityMode : System.IEquatable { private readonly object _dummy; @@ -524,6 +542,7 @@ public MongoClusterProperties() { } public string ComputeTier { get { throw null; } set { } } public string ConnectionString { get { throw null; } } public Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode? CreateMode { get { throw null; } set { } } + public Azure.ResourceManager.MongoCluster.Models.DataApiMode? DataApiMode { get { throw null; } set { } } public Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? HighAvailabilityTargetMode { get { throw null; } set { } } public string InfrastructureVersion { get { throw null; } } public System.Collections.Generic.IList PreviewFeatures { get { throw null; } } @@ -701,6 +720,7 @@ public MongoClusterUpdateProperties() { } public Azure.ResourceManager.MongoCluster.Models.MongoClusterAdministratorProperties Administrator { get { throw null; } set { } } public string BackupEarliestRestoreTime { get { throw null; } } public string ComputeTier { get { throw null; } set { } } + public Azure.ResourceManager.MongoCluster.Models.DataApiMode? DataApiMode { get { throw null; } set { } } public Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? HighAvailabilityTargetMode { get { throw null; } set { } } public System.Collections.Generic.IList PreviewFeatures { get { throw null; } } public Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.netstandard2.0.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.netstandard2.0.cs index be41ef5b289c..61a91910b891 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.netstandard2.0.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/api/Azure.ResourceManager.MongoCluster.netstandard2.0.cs @@ -215,12 +215,30 @@ public static partial class ArmMongoClusterModelFactory public static Azure.ResourceManager.MongoCluster.MongoClusterPrivateEndpointConnectionResourceData MongoClusterPrivateEndpointConnectionResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateEndpointConnectionProperties properties = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkResourceData MongoClusterPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkResourceProperties properties = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterPrivateLinkResourceProperties MongoClusterPrivateLinkResourceProperties(string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } - public static Azure.ResourceManager.MongoCluster.Models.MongoClusterProperties MongoClusterProperties(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode? createMode = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode?), Azure.ResourceManager.MongoCluster.Models.MongoClusterRestoreContent restoreParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicaContent replicaParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterAdministratorProperties administrator = null, string serverVersion = null, string connectionString = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState? provisioningState = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState?), Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus? clusterStatus = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus?), Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess?), Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? highAvailabilityTargetMode = default(Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode?), long? storageSizeGb = default(long?), int? shardingShardCount = default(int?), string computeTier = null, string backupEarliestRestoreTime = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable previewFeatures = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationProperties replica = null, string infrastructureVersion = null) { throw null; } + public static Azure.ResourceManager.MongoCluster.Models.MongoClusterProperties MongoClusterProperties(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode? createMode = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode?), Azure.ResourceManager.MongoCluster.Models.MongoClusterRestoreContent restoreParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicaContent replicaParameters = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterAdministratorProperties administrator = null, string serverVersion = null, string connectionString = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState? provisioningState = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterProvisioningState?), Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus? clusterStatus = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterStatus?), Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess?), Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? highAvailabilityTargetMode = default(Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode?), long? storageSizeGb = default(long?), int? shardingShardCount = default(int?), string computeTier = null, string backupEarliestRestoreTime = null, Azure.ResourceManager.MongoCluster.Models.DataApiMode? dataApiMode = default(Azure.ResourceManager.MongoCluster.Models.DataApiMode?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable previewFeatures = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationProperties replica = null, string infrastructureVersion = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterReplica MongoClusterReplica(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterProperties properties = null) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationProperties MongoClusterReplicationProperties(Azure.Core.ResourceIdentifier sourceResourceId = null, Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationRole? role = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationRole?), Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationState? replicationState = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterReplicationState?)) { throw null; } public static Azure.ResourceManager.MongoCluster.Models.PromoteReplicaContent PromoteReplicaContent(Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteOption promoteOption = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteOption), Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteMode? mode = default(Azure.ResourceManager.MongoCluster.Models.MongoClusterPromoteMode?)) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataApiMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataApiMode(string value) { throw null; } + public static Azure.ResourceManager.MongoCluster.Models.DataApiMode Disabled { get { throw null; } } + public static Azure.ResourceManager.MongoCluster.Models.DataApiMode Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MongoCluster.Models.DataApiMode 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.MongoCluster.Models.DataApiMode left, Azure.ResourceManager.MongoCluster.Models.DataApiMode right) { throw null; } + public static implicit operator Azure.ResourceManager.MongoCluster.Models.DataApiMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MongoCluster.Models.DataApiMode left, Azure.ResourceManager.MongoCluster.Models.DataApiMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct HighAvailabilityMode : System.IEquatable { private readonly object _dummy; @@ -524,6 +542,7 @@ public MongoClusterProperties() { } public string ComputeTier { get { throw null; } set { } } public string ConnectionString { get { throw null; } } public Azure.ResourceManager.MongoCluster.Models.MongoClusterCreateMode? CreateMode { get { throw null; } set { } } + public Azure.ResourceManager.MongoCluster.Models.DataApiMode? DataApiMode { get { throw null; } set { } } public Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? HighAvailabilityTargetMode { get { throw null; } set { } } public string InfrastructureVersion { get { throw null; } } public System.Collections.Generic.IList PreviewFeatures { get { throw null; } } @@ -701,6 +720,7 @@ public MongoClusterUpdateProperties() { } public Azure.ResourceManager.MongoCluster.Models.MongoClusterAdministratorProperties Administrator { get { throw null; } set { } } public string BackupEarliestRestoreTime { get { throw null; } } public string ComputeTier { get { throw null; } set { } } + public Azure.ResourceManager.MongoCluster.Models.DataApiMode? DataApiMode { get { throw null; } set { } } public Azure.ResourceManager.MongoCluster.Models.HighAvailabilityMode? HighAvailabilityTargetMode { get { throw null; } set { } } public System.Collections.Generic.IList PreviewFeatures { get { throw null; } } public Azure.ResourceManager.MongoCluster.Models.MongoClusterPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs index 3a1dea587e91..ec076fb08bcb 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_MongoClusterCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesANewMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_Create.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_Create.json // this example is just showing the usage of "MongoCluster_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -71,7 +71,7 @@ public async Task CreateOrUpdate_CreatesANewMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesAReplicaMongoClusterResourceFromASourceResource() { - // Generated from example definition: 2024-07-01/MongoClusters_CreateGeoReplica.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_CreateGeoReplica.json // this example is just showing the usage of "MongoCluster_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -113,7 +113,7 @@ public async Task CreateOrUpdate_CreatesAReplicaMongoClusterResourceFromASourceR [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesAMongoClusterResourceFromAPointInTimeRestore() { - // Generated from example definition: 2024-07-01/MongoClusters_CreatePITR.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_CreatePITR.json // this example is just showing the usage of "MongoCluster_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -159,7 +159,7 @@ public async Task CreateOrUpdate_CreatesAMongoClusterResourceFromAPointInTimeRes [Ignore("Only validating compilation of examples")] public async Task Get_GetsAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_Get.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_Get.json // this example is just showing the usage of "MongoCluster_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -192,7 +192,7 @@ public async Task Get_GetsAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListsTheMongoClusterResourcesInAResourceGroup() { - // Generated from example definition: 2024-07-01/MongoClusters_ListByResourceGroup.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_ListByResourceGroup.json // this example is just showing the usage of "MongoCluster_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -227,7 +227,7 @@ public async Task GetAll_ListsTheMongoClusterResourcesInAResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_Get.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_Get.json // this example is just showing the usage of "MongoCluster_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -256,7 +256,7 @@ public async Task Exists_GetsAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_Get.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_Get.json // this example is just showing the usage of "MongoCluster_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs index f95bd4dccd14..1fd66ec01117 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MongoClusterFirewallRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesAFirewallRuleOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleCreate.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleCreate.json // this example is just showing the usage of "FirewallRule_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_CreatesAFirewallRuleOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task Get_GetsAFirewallRuleOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleGet.json // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetsAFirewallRuleOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListTheFirewallRulesOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleList.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleList.json // this example is just showing the usage of "FirewallRule_ListByMongoCluster" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetAll_ListTheFirewallRulesOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAFirewallRuleOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleGet.json // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -159,7 +159,7 @@ public async Task Exists_GetsAFirewallRuleOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAFirewallRuleOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleGet.json // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs index d4aa354b7aaf..c56bc9192467 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterFirewallRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MongoClusterFirewallRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAFirewallRuleOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleGet.json // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetsAFirewallRuleOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesAFirewallRuleOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleDelete.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleDelete.json // this example is just showing the usage of "FirewallRule_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_DeletesAFirewallRuleOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task Update_CreatesAFirewallRuleOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_FirewallRuleCreate.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_FirewallRuleCreate.json // this example is just showing the usage of "FirewallRule_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs index b613f615940e..5c8ec07c0c79 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MongoClusterPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAPrivateEndpointConnectionOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnectionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetAPrivateEndpointConnectionOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAPrivateEndpointConnectionOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionDelete.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json // this example is just showing the usage of "PrivateEndpointConnectionResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_DeleteAPrivateEndpointConnectionOnAMongoClusterResource [Ignore("Only validating compilation of examples")] public async Task Update_ApprovesAPrivateEndpointConnectionOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionPut.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionPut.json // this example is just showing the usage of "PrivateEndpointConnectionResource_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs index f0480e5f2648..4b57ad591764 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterPrivateEndpointConnectionResourceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MongoClusterPrivateEndpointConnectionResourceCollect [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApprovesAPrivateEndpointConnectionOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionPut.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionPut.json // this example is just showing the usage of "PrivateEndpointConnectionResource_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_ApprovesAPrivateEndpointConnectionOnAMongoClust [Ignore("Only validating compilation of examples")] public async Task Get_GetAPrivateEndpointConnectionOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnectionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task Get_GetAPrivateEndpointConnectionOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListsThePrivateEndpointConnectionResourcesOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionList.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionList.json // this example is just showing the usage of "PrivateEndpointConnectionResource_ListByMongoCluster" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task GetAll_ListsThePrivateEndpointConnectionResourcesOnAMongoClust [Ignore("Only validating compilation of examples")] public async Task Exists_GetAPrivateEndpointConnectionOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnectionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_GetAPrivateEndpointConnectionOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAPrivateEndpointConnectionOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnectionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs index 89dc0e9ea8fe..a256b8b856f5 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_MongoClusterResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MongoClusterResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_Get.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_Get.json // this example is just showing the usage of "MongoCluster_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetsAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_Delete.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_Delete.json // this example is just showing the usage of "MongoCluster_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,11 +72,49 @@ public async Task Delete_DeletesAMongoClusterResource() Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_EnablesDataAPIOnAMongoClusterResource() + { + // Generated from example definition: 2024-10-01-preview/MongoClusters_PatchDataApi.json + // this example is just showing the usage of "MongoCluster_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoClusterResource created on azure + // for more information of creating MongoClusterResource, please refer to the document of MongoClusterResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestResourceGroup"; + string mongoClusterName = "myMongoCluster"; + ResourceIdentifier mongoClusterResourceId = MongoClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mongoClusterName); + MongoClusterResource mongoCluster = client.GetMongoClusterResource(mongoClusterResourceId); + + // invoke the operation + MongoClusterPatch patch = new MongoClusterPatch + { + Properties = new MongoClusterUpdateProperties + { + DataApiMode = DataApiMode.Enabled, + }, + }; + ArmOperation lro = await mongoCluster.UpdateAsync(WaitUntil.Completed, patch); + MongoClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MongoClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesTheDiskSizeOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PatchDiskSize.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PatchDiskSize.json // this example is just showing the usage of "MongoCluster_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +152,7 @@ public async Task Update_UpdatesTheDiskSizeOnAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task Update_DisablesPublicNetworkAccessOnAMongoClusterResourceWithAPrivateEndpointConnection() { - // Generated from example definition: 2024-07-01/MongoClusters_PatchPrivateNetworkAccess.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PatchPrivateNetworkAccess.json // this example is just showing the usage of "MongoCluster_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +190,7 @@ public async Task Update_DisablesPublicNetworkAccessOnAMongoClusterResourceWithA [Ignore("Only validating compilation of examples")] public async Task Update_ResetsTheAdministratorLoginPassword() { - // Generated from example definition: 2024-07-01/MongoClusters_ResetPassword.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_ResetPassword.json // this example is just showing the usage of "MongoCluster_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -194,7 +232,7 @@ public async Task Update_ResetsTheAdministratorLoginPassword() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_Update.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_Update.json // this example is just showing the usage of "MongoCluster_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -242,7 +280,7 @@ public async Task Update_UpdatesAMongoClusterResource() [Ignore("Only validating compilation of examples")] public async Task GetConnectionStrings_ListTheAvailableConnectionStringsForTheMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_ListConnectionStrings.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_ListConnectionStrings.json // this example is just showing the usage of "MongoClusters_ListConnectionStrings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -268,7 +306,7 @@ public async Task GetConnectionStrings_ListTheAvailableConnectionStringsForTheMo [Ignore("Only validating compilation of examples")] public async Task Promote_PromotesAReplicaMongoClusterResourceToAPrimaryRole() { - // Generated from example definition: 2024-07-01/MongoClusters_ForcePromoteReplica.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_ForcePromoteReplica.json // this example is just showing the usage of "MongoClusters_Promote" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -298,7 +336,7 @@ public async Task Promote_PromotesAReplicaMongoClusterResourceToAPrimaryRole() [Ignore("Only validating compilation of examples")] public async Task GetPrivateLinks_ListsThePrivateLinkResourcesAvailableOnAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_PrivateLinkResourceList.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_PrivateLinkResourceList.json // this example is just showing the usage of "PrivateLinkResource_ListByMongoCluster" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -327,7 +365,7 @@ public async Task GetPrivateLinks_ListsThePrivateLinkResourcesAvailableOnAMongoC [Ignore("Only validating compilation of examples")] public async Task GetReplicasByParent_ListTheReplicasLinkedToAMongoClusterResource() { - // Generated from example definition: 2024-07-01/MongoClusters_ReplicaList.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_ReplicaList.json // this example is just showing the usage of "Replica_ListByParent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 30d2c455dea6..b1a0920f2f00 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetMongoClusters_ListsTheMongoClusterResourcesInASubscription() { - // Generated from example definition: 2024-07-01/MongoClusters_List.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_List.json // this example is just showing the usage of "MongoCluster_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task GetMongoClusters_ListsTheMongoClusterResourcesInASubscription( [Ignore("Only validating compilation of examples")] public async Task CheckMongoClusterNameAvailability_ChecksAndConfirmsTheMongoClusterNameIsAvailabilityForUse() { - // Generated from example definition: 2024-07-01/MongoClusters_NameAvailability.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_NameAvailability.json // this example is just showing the usage of "MongoClusters_CheckMongoClusterNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task CheckMongoClusterNameAvailability_ChecksAndConfirmsTheMongoClu [Ignore("Only validating compilation of examples")] public async Task CheckMongoClusterNameAvailability_ChecksAndReturnsThatTheMongoClusterNameIsAlreadyInUse() { - // Generated from example definition: 2024-07-01/MongoClusters_NameAvailability_AlreadyExists.json + // Generated from example definition: 2024-10-01-preview/MongoClusters_NameAvailability_AlreadyExists.json // this example is just showing the usage of "MongoClusters_CheckMongoClusterNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/ArmMongoClusterModelFactory.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/ArmMongoClusterModelFactory.cs index c34be115aacd..efe73ca88d92 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/ArmMongoClusterModelFactory.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/ArmMongoClusterModelFactory.cs @@ -49,12 +49,13 @@ public static MongoClusterReplica MongoClusterReplica(ResourceIdentifier id = nu /// The sharding properties of the mongo cluster. /// The compute properties of the mongo cluster. /// The backup properties of the mongo cluster. + /// The Data API properties of the mongo cluster. /// List of private endpoint connections. /// List of private endpoint connections. /// The replication properties for the mongo cluster. /// The infrastructure version the cluster is provisioned on. /// A new instance for mocking. - public static MongoClusterProperties MongoClusterProperties(MongoClusterCreateMode? createMode = null, MongoClusterRestoreContent restoreParameters = null, MongoClusterReplicaContent replicaParameters = null, MongoClusterAdministratorProperties administrator = null, string serverVersion = null, string connectionString = null, MongoClusterProvisioningState? provisioningState = null, MongoClusterStatus? clusterStatus = null, MongoClusterPublicNetworkAccess? publicNetworkAccess = null, HighAvailabilityMode? highAvailabilityTargetMode = null, long? storageSizeGb = null, int? shardingShardCount = null, string computeTier = null, string backupEarliestRestoreTime = null, IEnumerable privateEndpointConnections = null, IEnumerable previewFeatures = null, MongoClusterReplicationProperties replica = null, string infrastructureVersion = null) + public static MongoClusterProperties MongoClusterProperties(MongoClusterCreateMode? createMode = null, MongoClusterRestoreContent restoreParameters = null, MongoClusterReplicaContent replicaParameters = null, MongoClusterAdministratorProperties administrator = null, string serverVersion = null, string connectionString = null, MongoClusterProvisioningState? provisioningState = null, MongoClusterStatus? clusterStatus = null, MongoClusterPublicNetworkAccess? publicNetworkAccess = null, HighAvailabilityMode? highAvailabilityTargetMode = null, long? storageSizeGb = null, int? shardingShardCount = null, string computeTier = null, string backupEarliestRestoreTime = null, DataApiMode? dataApiMode = null, IEnumerable privateEndpointConnections = null, IEnumerable previewFeatures = null, MongoClusterReplicationProperties replica = null, string infrastructureVersion = null) { privateEndpointConnections ??= new List(); previewFeatures ??= new List(); @@ -74,6 +75,7 @@ public static MongoClusterProperties MongoClusterProperties(MongoClusterCreateMo shardingShardCount != null ? new ShardingProperties(shardingShardCount, serializedAdditionalRawData: null) : null, computeTier != null ? new ComputeProperties(computeTier, serializedAdditionalRawData: null) : null, backupEarliestRestoreTime != null ? new BackupProperties(backupEarliestRestoreTime, serializedAdditionalRawData: null) : null, + dataApiMode != null ? new DataApiProperties(dataApiMode, serializedAdditionalRawData: null) : null, privateEndpointConnections?.ToList(), previewFeatures?.ToList(), replica, diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterResourceGroupResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterResourceGroupResource.cs index 87e8ad903dcb..44026ea2aba3 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterResourceGroupResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual MongoClusterCollection GetMongoClusters() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetMongoClusterAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterSubscriptionResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterSubscriptionResource.cs index bcba1d0d3f84..f39a86ce17b1 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterSubscriptionResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MockableMongoClusterSubscriptionResource.cs @@ -55,7 +55,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -85,7 +85,7 @@ public virtual AsyncPageable GetMongoClustersAsync(Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual Pageable GetMongoClusters(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual async Task> CheckMon /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MongoClusterExtensions.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MongoClusterExtensions.cs index ee4d0e4ffd35..5553f5d5064c 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MongoClusterExtensions.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Extensions/MongoClusterExtensions.cs @@ -120,7 +120,7 @@ public static MongoClusterCollection GetMongoClusters(this ResourceGroupResource /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public static async Task> GetMongoClusterAsync(th /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -196,7 +196,7 @@ public static Response GetMongoCluster(this ResourceGroupR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -232,7 +232,7 @@ public static AsyncPageable GetMongoClustersAsync(this Sub /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -268,7 +268,7 @@ public static Pageable GetMongoClusters(this SubscriptionR /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public static async Task> CheckMong /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiMode.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiMode.cs new file mode 100644 index 000000000000..72ce8ed51f95 --- /dev/null +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiMode.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.MongoCluster.Models +{ + /// The mode to apply to the Mongo Data API. + public readonly partial struct DataApiMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataApiMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Mongo Data API is enabled for the cluster. + public static DataApiMode Enabled { get; } = new DataApiMode(EnabledValue); + /// Mongo Data API is disabled for the cluster. + public static DataApiMode Disabled { get; } = new DataApiMode(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(DataApiMode left, DataApiMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataApiMode left, DataApiMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataApiMode(string value) => new DataApiMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataApiMode other && Equals(other); + /// + public bool Equals(DataApiMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiProperties.Serialization.cs new file mode 100644 index 000000000000..6c3490ccc23e --- /dev/null +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MongoCluster.Models +{ + internal partial class DataApiProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataApiProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataApiProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataApiProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataApiProperties(document.RootElement, options); + } + + internal static DataApiProperties DeserializeDataApiProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataApiMode? mode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new DataApiMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataApiProperties(mode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataApiProperties)} does not support writing '{options.Format}' format."); + } + } + + DataApiProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataApiProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataApiProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiProperties.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiProperties.cs new file mode 100644 index 000000000000..5eccac330a35 --- /dev/null +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/DataApiProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MongoCluster.Models +{ + /// Data API properties. + internal partial class DataApiProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataApiProperties() + { + } + + /// Initializes a new instance of . + /// The mode to indicate whether the Mongo Data API is enabled for a cluster. + /// Keeps track of any properties unknown to the library. + internal DataApiProperties(DataApiMode? mode, IDictionary serializedAdditionalRawData) + { + Mode = mode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The mode to indicate whether the Mongo Data API is enabled for a cluster. + public DataApiMode? Mode { get; set; } + } +} diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.Serialization.cs index 50859044b270..192e76cb4c2d 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.Serialization.cs @@ -104,6 +104,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("backup"u8); writer.WriteObjectValue(Backup, options); } + if (Optional.IsDefined(DataApi)) + { + writer.WritePropertyName("dataApi"u8); + writer.WriteObjectValue(DataApi, options); + } if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) { writer.WritePropertyName("privateEndpointConnections"u8); @@ -185,6 +190,7 @@ internal static MongoClusterProperties DeserializeMongoClusterProperties(JsonEle ShardingProperties sharding = default; ComputeProperties compute = default; BackupProperties backup = default; + DataApiProperties dataApi = default; IReadOnlyList privateEndpointConnections = default; IList previewFeatures = default; MongoClusterReplicationProperties replica = default; @@ -311,6 +317,15 @@ internal static MongoClusterProperties DeserializeMongoClusterProperties(JsonEle backup = BackupProperties.DeserializeBackupProperties(property.Value, options); continue; } + if (property.NameEquals("dataApi"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataApi = DataApiProperties.DeserializeDataApiProperties(property.Value, options); + continue; + } if (property.NameEquals("privateEndpointConnections"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -374,6 +389,7 @@ internal static MongoClusterProperties DeserializeMongoClusterProperties(JsonEle sharding, compute, backup, + dataApi, privateEndpointConnections ?? new ChangeTrackingList(), previewFeatures ?? new ChangeTrackingList(), replica, diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.cs index 34981443c068..fbd8073d21cd 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterProperties.cs @@ -67,12 +67,13 @@ public MongoClusterProperties() /// The sharding properties of the mongo cluster. /// The compute properties of the mongo cluster. /// The backup properties of the mongo cluster. + /// The Data API properties of the mongo cluster. /// List of private endpoint connections. /// List of private endpoint connections. /// The replication properties for the mongo cluster. /// The infrastructure version the cluster is provisioned on. /// Keeps track of any properties unknown to the library. - internal MongoClusterProperties(MongoClusterCreateMode? createMode, MongoClusterRestoreContent restoreParameters, MongoClusterReplicaContent replicaParameters, MongoClusterAdministratorProperties administrator, string serverVersion, string connectionString, MongoClusterProvisioningState? provisioningState, MongoClusterStatus? clusterStatus, MongoClusterPublicNetworkAccess? publicNetworkAccess, HighAvailabilityProperties highAvailability, StorageProperties storage, ShardingProperties sharding, ComputeProperties compute, BackupProperties backup, IReadOnlyList privateEndpointConnections, IList previewFeatures, MongoClusterReplicationProperties replica, string infrastructureVersion, IDictionary serializedAdditionalRawData) + internal MongoClusterProperties(MongoClusterCreateMode? createMode, MongoClusterRestoreContent restoreParameters, MongoClusterReplicaContent replicaParameters, MongoClusterAdministratorProperties administrator, string serverVersion, string connectionString, MongoClusterProvisioningState? provisioningState, MongoClusterStatus? clusterStatus, MongoClusterPublicNetworkAccess? publicNetworkAccess, HighAvailabilityProperties highAvailability, StorageProperties storage, ShardingProperties sharding, ComputeProperties compute, BackupProperties backup, DataApiProperties dataApi, IReadOnlyList privateEndpointConnections, IList previewFeatures, MongoClusterReplicationProperties replica, string infrastructureVersion, IDictionary serializedAdditionalRawData) { CreateMode = createMode; RestoreParameters = restoreParameters; @@ -88,6 +89,7 @@ internal MongoClusterProperties(MongoClusterCreateMode? createMode, MongoCluster Sharding = sharding; Compute = compute; Backup = backup; + DataApi = dataApi; PrivateEndpointConnections = privateEndpointConnections; PreviewFeatures = previewFeatures; Replica = replica; @@ -177,6 +179,20 @@ public string BackupEarliestRestoreTime get => Backup is null ? default : Backup.EarliestRestoreTime; } + /// The Data API properties of the mongo cluster. + internal DataApiProperties DataApi { get; set; } + /// The mode to indicate whether the Mongo Data API is enabled for a cluster. + public DataApiMode? DataApiMode + { + get => DataApi is null ? default : DataApi.Mode; + set + { + if (DataApi is null) + DataApi = new DataApiProperties(); + DataApi.Mode = value; + } + } + /// List of private endpoint connections. public IReadOnlyList PrivateEndpointConnections { get; } /// List of private endpoint connections. diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.Serialization.cs index 2ec12a14f6ac..5bd7b3fdd706 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.Serialization.cs @@ -74,6 +74,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("backup"u8); writer.WriteObjectValue(Backup, options); } + if (Optional.IsDefined(DataApi)) + { + writer.WritePropertyName("dataApi"u8); + writer.WriteObjectValue(DataApi, options); + } if (Optional.IsCollectionDefined(PreviewFeatures)) { writer.WritePropertyName("previewFeatures"u8); @@ -129,6 +134,7 @@ internal static MongoClusterUpdateProperties DeserializeMongoClusterUpdateProper ShardingProperties sharding = default; ComputeProperties compute = default; BackupProperties backup = default; + DataApiProperties dataApi = default; IList previewFeatures = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -202,6 +208,15 @@ internal static MongoClusterUpdateProperties DeserializeMongoClusterUpdateProper backup = BackupProperties.DeserializeBackupProperties(property.Value, options); continue; } + if (property.NameEquals("dataApi"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataApi = DataApiProperties.DeserializeDataApiProperties(property.Value, options); + continue; + } if (property.NameEquals("previewFeatures"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -231,6 +246,7 @@ internal static MongoClusterUpdateProperties DeserializeMongoClusterUpdateProper sharding, compute, backup, + dataApi, previewFeatures ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.cs index 182cdb763b42..6a5064ab3b83 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/Models/MongoClusterUpdateProperties.cs @@ -60,9 +60,10 @@ public MongoClusterUpdateProperties() /// The sharding properties of the mongo cluster. /// The compute properties of the mongo cluster. /// The backup properties of the mongo cluster. + /// The Data API properties of the mongo cluster. /// List of private endpoint connections. /// Keeps track of any properties unknown to the library. - internal MongoClusterUpdateProperties(MongoClusterAdministratorProperties administrator, string serverVersion, MongoClusterPublicNetworkAccess? publicNetworkAccess, HighAvailabilityProperties highAvailability, StorageProperties storage, ShardingProperties sharding, ComputeProperties compute, BackupProperties backup, IList previewFeatures, IDictionary serializedAdditionalRawData) + internal MongoClusterUpdateProperties(MongoClusterAdministratorProperties administrator, string serverVersion, MongoClusterPublicNetworkAccess? publicNetworkAccess, HighAvailabilityProperties highAvailability, StorageProperties storage, ShardingProperties sharding, ComputeProperties compute, BackupProperties backup, DataApiProperties dataApi, IList previewFeatures, IDictionary serializedAdditionalRawData) { Administrator = administrator; ServerVersion = serverVersion; @@ -72,6 +73,7 @@ internal MongoClusterUpdateProperties(MongoClusterAdministratorProperties admini Sharding = sharding; Compute = compute; Backup = backup; + DataApi = dataApi; PreviewFeatures = previewFeatures; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -146,6 +148,20 @@ public string BackupEarliestRestoreTime get => Backup is null ? default : Backup.EarliestRestoreTime; } + /// The Data API properties of the mongo cluster. + internal DataApiProperties DataApi { get; set; } + /// The mode to indicate whether the Mongo Data API is enabled for a cluster. + public DataApiMode? DataApiMode + { + get => DataApi is null ? default : DataApi.Mode; + set + { + if (DataApi is null) + DataApi = new DataApiProperties(); + DataApi.Mode = value; + } + } + /// List of private endpoint connections. public IList PreviewFeatures { get; } } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterCollection.cs index c8d9efdce71d..fa42720d1dca 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string mongoC /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string mongoClusterName, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string mongoClusterName, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string mongoClusterName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleCollection.cs index 941f285a6a0f..339303e8b618 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string firewallRul /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string firewallRuleName, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string firewallRuleName, CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.cs index fd29a6f95f8d..54451a15a37b 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.cs index 07c1a1c07d42..03d574d3fe68 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceCollection.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceCollection.cs index 8136ff74d1d0..d6f6245505b1 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceCollection.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResourceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation Creat /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(strin /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetA /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Ca /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.cs index 6804c462bb87..fe2df69ff779 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.cs @@ -119,7 +119,7 @@ public virtual MongoClusterFirewallRuleCollection GetMongoClusterFirewallRules() /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -150,7 +150,7 @@ public virtual async Task> GetMongoCl /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -188,7 +188,7 @@ public virtual MongoClusterPrivateEndpointConnectionResourceCollection GetMongoC /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -219,7 +219,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response GetMongoC /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -290,7 +290,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -330,7 +330,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -372,7 +372,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -414,7 +414,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -460,7 +460,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -506,7 +506,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Mo /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -544,7 +544,7 @@ public virtual async Task> GetConn /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -582,7 +582,7 @@ public virtual Response GetConnectionString /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -628,7 +628,7 @@ public virtual async Task PromoteAsync(WaitUntil waitUntil, Promot /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -674,7 +674,7 @@ public virtual ArmOperation Promote(WaitUntil waitUntil, PromoteReplicaContent c /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// @@ -700,7 +700,7 @@ public virtual AsyncPageable GetPrivateLink /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// @@ -726,7 +726,7 @@ public virtual Pageable GetPrivateLinks(Can /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// @@ -752,7 +752,7 @@ public virtual AsyncPageable GetReplicasByParentAsync(Cance /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// @@ -778,7 +778,7 @@ public virtual Pageable GetReplicasByParent(CancellationTok /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -840,7 +840,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -902,7 +902,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -959,7 +959,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -1016,7 +1016,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource @@ -1076,7 +1076,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2024-07-01 + /// 2024-10-01-preview /// /// /// Resource diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/FirewallRulesRestOperations.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/FirewallRulesRestOperations.cs index 4d0d6ac3ecd6..419ec8029a09 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/FirewallRulesRestOperations.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/FirewallRulesRestOperations.cs @@ -32,7 +32,7 @@ public FirewallRulesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/MongoClustersRestOperations.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/MongoClustersRestOperations.cs index 159287b991d5..6c1eaaa5ac4b 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/MongoClustersRestOperations.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/MongoClustersRestOperations.cs @@ -32,7 +32,7 @@ public MongoClustersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index a25fc00275c0..d14984b59776 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateLinksRestOperations.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateLinksRestOperations.cs index 04d9d0daf17a..f0b69726b397 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateLinksRestOperations.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/PrivateLinksRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinksRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/ReplicasRestOperations.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/ReplicasRestOperations.cs index c99a3c0e0d27..05ea7ed0de1b 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/ReplicasRestOperations.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/RestOperations/ReplicasRestOperations.cs @@ -32,7 +32,7 @@ public ReplicasRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01"; + _apiVersion = apiVersion ?? "2024-10-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tsp-location.yaml b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tsp-location.yaml index 95a1e28c447e..a64185e3dcf9 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tsp-location.yaml +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/tsp-location.yaml @@ -1,3 +1,4 @@ -directory: specification\mongocluster\DocumentDB.MongoCluster.Management -commit: 9ce76c4f113368361dac4de5d0a71eb058602756 -repo: Azure/azure-rest-api-specs \ No newline at end of file +directory: specification/mongocluster/DocumentDB.MongoCluster.Management +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml index 112c72e1daaf..828c275fc6ee 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/liftrneon/Neon.Postgres.Management -commit: 297c3a012316e290e6a6ab737ec8944611554542 +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/Azure.ResourceManager.PineconeVectorDb.sln b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/Azure.ResourceManager.PineconeVectorDb.sln new file mode 100644 index 000000000000..285465759ba0 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/Azure.ResourceManager.PineconeVectorDb.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.PineconeVectorDb.Samples", "samples\Azure.ResourceManager.PineconeVectorDb.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.PineconeVectorDb", "src\Azure.ResourceManager.PineconeVectorDb.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.PineconeVectorDb.Tests", "tests\Azure.ResourceManager.PineconeVectorDb.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/CHANGELOG.md b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/Directory.Build.props b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/README.md b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/README.md new file mode 100644 index 000000000000..8436555201ab --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure PineconeVectorDb management client library for .NET + +**[Describe the service briefly first.]** + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - 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. + +## Getting started + +### Install the package + +Install the Microsoft Azure PineconeVectorDb management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.PineconeVectorDb --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET 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/dev/mgmt_quickstart.md). +- [API References](https://learn.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://aka.ms/azuresdk-net-mgmt-samples) + +## 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 about Microsoft Azure SDK, see [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 +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action 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 other 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/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/api/Azure.ResourceManager.PineconeVectorDb.net8.0.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/api/Azure.ResourceManager.PineconeVectorDb.net8.0.cs new file mode 100644 index 000000000000..bf02201a31b9 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/api/Azure.ResourceManager.PineconeVectorDb.net8.0.cs @@ -0,0 +1,258 @@ +namespace Azure.ResourceManager.PineconeVectorDb +{ + public partial class OrganizationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected OrganizationResource() { } + public virtual Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData 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 organizationname) { 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 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; } + Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.PineconeVectorDb.Models.OrganizationResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.PineconeVectorDb.Models.OrganizationResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class OrganizationResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected OrganizationResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string organizationname, Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string organizationname, Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string organizationname, 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 organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string organizationname, 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 OrganizationResourceData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrganizationResourceData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.PineconeVectorDb.Models.OrganizationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public static partial class PineconeVectorDbExtensions + { + public static Azure.ResourceManager.PineconeVectorDb.OrganizationResource GetOrganizationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetOrganizationResource(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetOrganizationResourceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.PineconeVectorDb.OrganizationResourceCollection GetOrganizationResources(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetOrganizationResources(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetOrganizationResourcesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.PineconeVectorDb.Mocking +{ + public partial class MockablePineconeVectorDbArmClient : Azure.ResourceManager.ArmResource + { + protected MockablePineconeVectorDbArmClient() { } + public virtual Azure.ResourceManager.PineconeVectorDb.OrganizationResource GetOrganizationResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockablePineconeVectorDbResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockablePineconeVectorDbResourceGroupResource() { } + public virtual Azure.Response GetOrganizationResource(string organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetOrganizationResourceAsync(string organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PineconeVectorDb.OrganizationResourceCollection GetOrganizationResources() { throw null; } + } + public partial class MockablePineconeVectorDbSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockablePineconeVectorDbSubscriptionResource() { } + public virtual Azure.Pageable GetOrganizationResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetOrganizationResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + public static partial class ArmPineconeVectorDbModelFactory + { + public static Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceDetails MarketplaceDetails(string subscriptionId = null, Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus? subscriptionStatus = default(Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus?), Azure.ResourceManager.PineconeVectorDb.Models.OfferDetails offerDetails = null) { throw null; } + public static Azure.ResourceManager.PineconeVectorDb.Models.OrganizationProperties OrganizationProperties(Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceDetails marketplace = null, Azure.ResourceManager.PineconeVectorDb.Models.UserDetails user = null, Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState?), string partnerDisplayName = null, Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnPropertiesV2 singleSignOnProperties = null) { throw null; } + public static Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData OrganizationResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.PineconeVectorDb.Models.OrganizationProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + } + public partial class MarketplaceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MarketplaceDetails(Azure.ResourceManager.PineconeVectorDb.Models.OfferDetails offerDetails) { } + public Azure.ResourceManager.PineconeVectorDb.Models.OfferDetails OfferDetails { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } + public Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus? SubscriptionStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MarketplaceSubscriptionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MarketplaceSubscriptionStatus(string value) { throw null; } + public static Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus PendingFulfillmentStart { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus Subscribed { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus Suspended { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus Unsubscribed { get { throw null; } } + public bool Equals(Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus 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.PineconeVectorDb.Models.MarketplaceSubscriptionStatus left, Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus left, Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class OfferDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OfferDetails(string publisherId, string offerId, string planId) { } + public string OfferId { get { throw null; } set { } } + public string PlanId { get { throw null; } set { } } + public string PlanName { get { throw null; } set { } } + public string PublisherId { get { throw null; } set { } } + public string TermId { get { throw null; } set { } } + public string TermUnit { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.OfferDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.OfferDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrganizationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrganizationProperties(Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceDetails marketplace, Azure.ResourceManager.PineconeVectorDb.Models.UserDetails user) { } + public Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceDetails Marketplace { get { throw null; } set { } } + public string PartnerDisplayName { get { throw null; } set { } } + public Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnPropertiesV2 SingleSignOnProperties { get { throw null; } set { } } + public Azure.ResourceManager.PineconeVectorDb.Models.UserDetails User { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.OrganizationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.OrganizationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrganizationResourcePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrganizationResourcePatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.OrganizationResourcePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.OrganizationResourcePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState 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.PineconeVectorDb.Models.ResourceProvisioningState left, Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState left, Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SingleSignOnPropertiesV2 : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SingleSignOnPropertiesV2(Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType type) { } + public System.Collections.Generic.IList AadDomains { get { throw null; } } + public string EnterpriseAppId { get { throw null; } set { } } + public Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState? State { get { throw null; } set { } } + public Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType Type { get { throw null; } set { } } + public string Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnPropertiesV2 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnPropertiesV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SingleSignOnState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SingleSignOnState(string value) { throw null; } + public static Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState Disable { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState Enable { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState Initial { get { throw null; } } + public bool Equals(Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState 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.PineconeVectorDb.Models.SingleSignOnState left, Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState right) { throw null; } + public static implicit operator Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState left, Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SingleSignOnType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SingleSignOnType(string value) { throw null; } + public static Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType OpenId { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType Saml { get { throw null; } } + public bool Equals(Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType 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.PineconeVectorDb.Models.SingleSignOnType left, Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType right) { throw null; } + public static implicit operator Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType left, Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UserDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UserDetails() { } + public string EmailAddress { get { throw null; } set { } } + public string FirstName { get { throw null; } set { } } + public string LastName { get { throw null; } set { } } + public string PhoneNumber { get { throw null; } set { } } + public string Upn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.UserDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.UserDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/api/Azure.ResourceManager.PineconeVectorDb.netstandard2.0.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/api/Azure.ResourceManager.PineconeVectorDb.netstandard2.0.cs new file mode 100644 index 000000000000..bf02201a31b9 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/api/Azure.ResourceManager.PineconeVectorDb.netstandard2.0.cs @@ -0,0 +1,258 @@ +namespace Azure.ResourceManager.PineconeVectorDb +{ + public partial class OrganizationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected OrganizationResource() { } + public virtual Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData 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 organizationname) { 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 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; } + Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.PineconeVectorDb.Models.OrganizationResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.PineconeVectorDb.Models.OrganizationResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class OrganizationResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected OrganizationResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string organizationname, Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string organizationname, Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string organizationname, 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 organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string organizationname, 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 OrganizationResourceData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrganizationResourceData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.PineconeVectorDb.Models.OrganizationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public static partial class PineconeVectorDbExtensions + { + public static Azure.ResourceManager.PineconeVectorDb.OrganizationResource GetOrganizationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetOrganizationResource(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetOrganizationResourceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.PineconeVectorDb.OrganizationResourceCollection GetOrganizationResources(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetOrganizationResources(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetOrganizationResourcesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.PineconeVectorDb.Mocking +{ + public partial class MockablePineconeVectorDbArmClient : Azure.ResourceManager.ArmResource + { + protected MockablePineconeVectorDbArmClient() { } + public virtual Azure.ResourceManager.PineconeVectorDb.OrganizationResource GetOrganizationResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockablePineconeVectorDbResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockablePineconeVectorDbResourceGroupResource() { } + public virtual Azure.Response GetOrganizationResource(string organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetOrganizationResourceAsync(string organizationname, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PineconeVectorDb.OrganizationResourceCollection GetOrganizationResources() { throw null; } + } + public partial class MockablePineconeVectorDbSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockablePineconeVectorDbSubscriptionResource() { } + public virtual Azure.Pageable GetOrganizationResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetOrganizationResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + public static partial class ArmPineconeVectorDbModelFactory + { + public static Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceDetails MarketplaceDetails(string subscriptionId = null, Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus? subscriptionStatus = default(Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus?), Azure.ResourceManager.PineconeVectorDb.Models.OfferDetails offerDetails = null) { throw null; } + public static Azure.ResourceManager.PineconeVectorDb.Models.OrganizationProperties OrganizationProperties(Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceDetails marketplace = null, Azure.ResourceManager.PineconeVectorDb.Models.UserDetails user = null, Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState?), string partnerDisplayName = null, Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnPropertiesV2 singleSignOnProperties = null) { throw null; } + public static Azure.ResourceManager.PineconeVectorDb.OrganizationResourceData OrganizationResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.PineconeVectorDb.Models.OrganizationProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + } + public partial class MarketplaceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MarketplaceDetails(Azure.ResourceManager.PineconeVectorDb.Models.OfferDetails offerDetails) { } + public Azure.ResourceManager.PineconeVectorDb.Models.OfferDetails OfferDetails { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } + public Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus? SubscriptionStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MarketplaceSubscriptionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MarketplaceSubscriptionStatus(string value) { throw null; } + public static Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus PendingFulfillmentStart { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus Subscribed { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus Suspended { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus Unsubscribed { get { throw null; } } + public bool Equals(Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus 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.PineconeVectorDb.Models.MarketplaceSubscriptionStatus left, Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus left, Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceSubscriptionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class OfferDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OfferDetails(string publisherId, string offerId, string planId) { } + public string OfferId { get { throw null; } set { } } + public string PlanId { get { throw null; } set { } } + public string PlanName { get { throw null; } set { } } + public string PublisherId { get { throw null; } set { } } + public string TermId { get { throw null; } set { } } + public string TermUnit { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.OfferDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.OfferDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrganizationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrganizationProperties(Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceDetails marketplace, Azure.ResourceManager.PineconeVectorDb.Models.UserDetails user) { } + public Azure.ResourceManager.PineconeVectorDb.Models.MarketplaceDetails Marketplace { get { throw null; } set { } } + public string PartnerDisplayName { get { throw null; } set { } } + public Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnPropertiesV2 SingleSignOnProperties { get { throw null; } set { } } + public Azure.ResourceManager.PineconeVectorDb.Models.UserDetails User { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.OrganizationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.OrganizationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrganizationResourcePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrganizationResourcePatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.OrganizationResourcePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.OrganizationResourcePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState 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.PineconeVectorDb.Models.ResourceProvisioningState left, Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState left, Azure.ResourceManager.PineconeVectorDb.Models.ResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SingleSignOnPropertiesV2 : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SingleSignOnPropertiesV2(Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType type) { } + public System.Collections.Generic.IList AadDomains { get { throw null; } } + public string EnterpriseAppId { get { throw null; } set { } } + public Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState? State { get { throw null; } set { } } + public Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType Type { get { throw null; } set { } } + public string Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnPropertiesV2 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnPropertiesV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SingleSignOnState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SingleSignOnState(string value) { throw null; } + public static Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState Disable { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState Enable { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState Initial { get { throw null; } } + public bool Equals(Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState 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.PineconeVectorDb.Models.SingleSignOnState left, Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState right) { throw null; } + public static implicit operator Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState left, Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SingleSignOnType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SingleSignOnType(string value) { throw null; } + public static Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType OpenId { get { throw null; } } + public static Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType Saml { get { throw null; } } + public bool Equals(Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType 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.PineconeVectorDb.Models.SingleSignOnType left, Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType right) { throw null; } + public static implicit operator Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType left, Azure.ResourceManager.PineconeVectorDb.Models.SingleSignOnType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UserDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UserDetails() { } + public string EmailAddress { get { throw null; } set { } } + public string FirstName { get { throw null; } set { } } + public string LastName { get { throw null; } set { } } + public string PhoneNumber { get { throw null; } set { } } + public string Upn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.UserDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PineconeVectorDb.Models.UserDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/assets.json b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/assets.json new file mode 100644 index 000000000000..a665a993f4f7 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/pineconevectordb/Azure.ResourceManager.PineconeVectorDb", + "Tag": "" +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Azure.ResourceManager.PineconeVectorDb.Samples.csproj b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Azure.ResourceManager.PineconeVectorDb.Samples.csproj new file mode 100644 index 000000000000..3200a8b511c5 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Azure.ResourceManager.PineconeVectorDb.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Generated/Samples/Sample_OrganizationResource.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Generated/Samples/Sample_OrganizationResource.cs new file mode 100644 index 000000000000..1a11c367a692 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Generated/Samples/Sample_OrganizationResource.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.PineconeVectorDb.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.PineconeVectorDb.Samples +{ + public partial class Sample_OrganizationResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_OrganizationsGetMaximumSet() + { + // Generated from example definition: 2024-10-22-preview/Organizations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this OrganizationResource created on azure + // for more information of creating OrganizationResource, please refer to the document of OrganizationResource + string subscriptionId = "76a38ef6-c8c1-4f0d-bfe0-00ec782c8077"; + string resourceGroupName = "rgopenapi"; + string organizationname = "example-organization-name"; + ResourceIdentifier organizationResourceId = OrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationname); + OrganizationResource organizationResource = client.GetOrganizationResource(organizationResourceId); + + // invoke the operation + OrganizationResource result = await organizationResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + OrganizationResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_OrganizationsDeleteMaximumSet() + { + // Generated from example definition: 2024-10-22-preview/Organizations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this OrganizationResource created on azure + // for more information of creating OrganizationResource, please refer to the document of OrganizationResource + string subscriptionId = "76a38ef6-c8c1-4f0d-bfe0-00ec782c8077"; + string resourceGroupName = "rgopenapi"; + string organizationname = "example-organization-name"; + ResourceIdentifier organizationResourceId = OrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationname); + OrganizationResource organizationResource = client.GetOrganizationResource(organizationResourceId); + + // invoke the operation + await organizationResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_OrganizationsUpdateMaximumSet() + { + // Generated from example definition: 2024-10-22-preview/Organizations_Update_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this OrganizationResource created on azure + // for more information of creating OrganizationResource, please refer to the document of OrganizationResource + string subscriptionId = "76a38ef6-c8c1-4f0d-bfe0-00ec782c8077"; + string resourceGroupName = "rgopenapi"; + string organizationname = "example-organization-name"; + ResourceIdentifier organizationResourceId = OrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationname); + OrganizationResource organizationResource = client.GetOrganizationResource(organizationResourceId); + + // invoke the operation + OrganizationResourcePatch patch = new OrganizationResourcePatch + { + Tags = +{ +["new-tag"] = "new.tag.value" +}, + Identity = new ManagedServiceIdentity("None") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("ident573739201")] = new UserAssignedIdentity() +}, + }, + }; + OrganizationResource result = await organizationResource.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + OrganizationResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Generated/Samples/Sample_OrganizationResourceCollection.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Generated/Samples/Sample_OrganizationResourceCollection.cs new file mode 100644 index 000000000000..f95f12e80051 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Generated/Samples/Sample_OrganizationResourceCollection.cs @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.PineconeVectorDb.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.PineconeVectorDb.Samples +{ + public partial class Sample_OrganizationResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_OrganizationsCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2024-10-22-preview/Organizations_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "76a38ef6-c8c1-4f0d-bfe0-00ec782c8077"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this OrganizationResource + OrganizationResourceCollection collection = resourceGroupResource.GetOrganizationResources(); + + // invoke the operation + string organizationname = "example-organization-name"; + OrganizationResourceData data = new OrganizationResourceData(new AzureLocation("us-east")) + { + Properties = new OrganizationProperties(new MarketplaceDetails(new OfferDetails("4d194daf-fa20-46a8-bfb4-5b7d96cae009", "013124d0-bf05-4eab-a6bb-01fa83870642", "62dda065-5acd-4ac5-b418-8610beed92a2") + { + PlanName = "Freemium", + TermUnit = "der", + TermId = "a2b7ce01-f06d-4874-9f77-6ea4a4875c16", + }) + { + SubscriptionId = "76a38ef6-c8c1-4f0d-bfe0-00ec782c8077", + }, new UserDetails + { + FirstName = "Jimmy", + LastName = "McExample", + EmailAddress = "example.user@example.com", + Upn = "example.user@example.com", + PhoneNumber = "555-555-5555", + }) + { + PartnerDisplayName = "My Example Organization", + SingleSignOnProperties = new SingleSignOnPropertiesV2(SingleSignOnType.Saml) + { + State = SingleSignOnState.Initial, + EnterpriseAppId = "44d3fb26-d8d5-41ff-9b9a-769737f22f13", + Uri = "https://login.pinecone.io/?sso=true&connection=dfwgsqzkbrjqrglcsa", + AadDomains = { "exampledomain" }, + }, + }, + Identity = new ManagedServiceIdentity("None") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("ident904655400")] = new UserAssignedIdentity() +}, + }, + Tags = +{ +["my-tag"] = "tag.value" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, organizationname, data); + OrganizationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + OrganizationResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_OrganizationsGetMaximumSet() + { + // Generated from example definition: 2024-10-22-preview/Organizations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "76a38ef6-c8c1-4f0d-bfe0-00ec782c8077"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this OrganizationResource + OrganizationResourceCollection collection = resourceGroupResource.GetOrganizationResources(); + + // invoke the operation + string organizationname = "example-organization-name"; + OrganizationResource result = await collection.GetAsync(organizationname); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + OrganizationResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_OrganizationsListByResourceGroupMaximumSet() + { + // Generated from example definition: 2024-10-22-preview/Organizations_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "76a38ef6-c8c1-4f0d-bfe0-00ec782c8077"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this OrganizationResource + OrganizationResourceCollection collection = resourceGroupResource.GetOrganizationResources(); + + // invoke the operation and iterate over the result + await foreach (OrganizationResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + OrganizationResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_OrganizationsGetMaximumSet() + { + // Generated from example definition: 2024-10-22-preview/Organizations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "76a38ef6-c8c1-4f0d-bfe0-00ec782c8077"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this OrganizationResource + OrganizationResourceCollection collection = resourceGroupResource.GetOrganizationResources(); + + // invoke the operation + string organizationname = "example-organization-name"; + bool result = await collection.ExistsAsync(organizationname); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_OrganizationsGetMaximumSet() + { + // Generated from example definition: 2024-10-22-preview/Organizations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "76a38ef6-c8c1-4f0d-bfe0-00ec782c8077"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this OrganizationResource + OrganizationResourceCollection collection = resourceGroupResource.GetOrganizationResources(); + + // invoke the operation + string organizationname = "example-organization-name"; + NullableResponse response = await collection.GetIfExistsAsync(organizationname); + OrganizationResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + OrganizationResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..7a6410864777 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.PineconeVectorDb.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetOrganizationResources_OrganizationsListBySubscriptionMaximumSet() + { + // Generated from example definition: 2024-10-22-preview/Organizations_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "76a38ef6-c8c1-4f0d-bfe0-00ec782c8077"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (OrganizationResource item in subscriptionResource.GetOrganizationResourcesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + OrganizationResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Azure.ResourceManager.PineconeVectorDb.csproj b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Azure.ResourceManager.PineconeVectorDb.csproj new file mode 100644 index 000000000000..03cff95759cf --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Azure.ResourceManager.PineconeVectorDb.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider PineconeVectorDb. + 1.0.0-beta.1 + azure;management;arm;resource manager;pineconevectordb + Azure.ResourceManager.PineconeVectorDb + + diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/ArmPineconeVectorDbModelFactory.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/ArmPineconeVectorDbModelFactory.cs new file mode 100644 index 000000000000..562b6b580bf5 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/ArmPineconeVectorDbModelFactory.cs @@ -0,0 +1,73 @@ +// 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; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + /// Model factory for models. + public static partial class ArmPineconeVectorDbModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// A new instance for mocking. + public static OrganizationResourceData OrganizationResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, OrganizationProperties properties = null, ManagedServiceIdentity identity = null) + { + tags ??= new Dictionary(); + + return new OrganizationResourceData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + identity, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Marketplace details of the resource. + /// Details of the user. + /// Provisioning state of the resource. + /// partner properties. + /// Single sign-on properties. + /// A new instance for mocking. + public static OrganizationProperties OrganizationProperties(MarketplaceDetails marketplace = null, UserDetails user = null, ResourceProvisioningState? provisioningState = null, string partnerDisplayName = null, SingleSignOnPropertiesV2 singleSignOnProperties = null) + { + return new OrganizationProperties( + marketplace, + user, + provisioningState, + partnerDisplayName != null ? new PartnerProperties(partnerDisplayName, serializedAdditionalRawData: null) : null, + singleSignOnProperties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Azure subscription id for the the marketplace offer is purchased from. + /// Marketplace subscription status. + /// Offer details for the marketplace that is selected by the user. + /// A new instance for mocking. + public static MarketplaceDetails MarketplaceDetails(string subscriptionId = null, MarketplaceSubscriptionStatus? subscriptionStatus = null, OfferDetails offerDetails = null) + { + return new MarketplaceDetails(subscriptionId, subscriptionStatus, offerDetails, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/MockablePineconeVectorDbArmClient.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/MockablePineconeVectorDbArmClient.cs new file mode 100644 index 000000000000..f928ff90e73d --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/MockablePineconeVectorDbArmClient.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.PineconeVectorDb.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockablePineconeVectorDbArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockablePineconeVectorDbArmClient() + { + } + + /// 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 MockablePineconeVectorDbArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockablePineconeVectorDbArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual OrganizationResource GetOrganizationResource(ResourceIdentifier id) + { + OrganizationResource.ValidateResourceId(id); + return new OrganizationResource(Client, id); + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/MockablePineconeVectorDbResourceGroupResource.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/MockablePineconeVectorDbResourceGroupResource.cs new file mode 100644 index 000000000000..25a802941b29 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/MockablePineconeVectorDbResourceGroupResource.cs @@ -0,0 +1,105 @@ +// 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.Core; + +namespace Azure.ResourceManager.PineconeVectorDb.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockablePineconeVectorDbResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockablePineconeVectorDbResourceGroupResource() + { + } + + /// 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 MockablePineconeVectorDbResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of OrganizationResources in the ResourceGroupResource. + /// An object representing collection of OrganizationResources and their operations over a OrganizationResource. + public virtual OrganizationResourceCollection GetOrganizationResources() + { + return GetCachedClient(client => new OrganizationResourceCollection(client, Id)); + } + + /// + /// Get a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetOrganizationResourceAsync(string organizationname, CancellationToken cancellationToken = default) + { + return await GetOrganizationResources().GetAsync(organizationname, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetOrganizationResource(string organizationname, CancellationToken cancellationToken = default) + { + return GetOrganizationResources().Get(organizationname, cancellationToken); + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/MockablePineconeVectorDbSubscriptionResource.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/MockablePineconeVectorDbSubscriptionResource.cs new file mode 100644 index 000000000000..f3175a6971ea --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/MockablePineconeVectorDbSubscriptionResource.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.PineconeVectorDb.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockablePineconeVectorDbSubscriptionResource : ArmResource + { + private ClientDiagnostics _organizationResourceOrganizationsClientDiagnostics; + private OrganizationsRestOperations _organizationResourceOrganizationsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockablePineconeVectorDbSubscriptionResource() + { + } + + /// 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 MockablePineconeVectorDbSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics OrganizationResourceOrganizationsClientDiagnostics => _organizationResourceOrganizationsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.PineconeVectorDb", OrganizationResource.ResourceType.Namespace, Diagnostics); + private OrganizationsRestOperations OrganizationResourceOrganizationsRestClient => _organizationResourceOrganizationsRestClient ??= new OrganizationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(OrganizationResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List OrganizationResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Pinecone.VectorDb/organizations + /// + /// + /// Operation Id + /// OrganizationResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetOrganizationResourcesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => OrganizationResourceOrganizationsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OrganizationResourceOrganizationsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new OrganizationResource(Client, OrganizationResourceData.DeserializeOrganizationResourceData(e)), OrganizationResourceOrganizationsClientDiagnostics, Pipeline, "MockablePineconeVectorDbSubscriptionResource.GetOrganizationResources", "value", "nextLink", cancellationToken); + } + + /// + /// List OrganizationResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Pinecone.VectorDb/organizations + /// + /// + /// Operation Id + /// OrganizationResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetOrganizationResources(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => OrganizationResourceOrganizationsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OrganizationResourceOrganizationsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new OrganizationResource(Client, OrganizationResourceData.DeserializeOrganizationResourceData(e)), OrganizationResourceOrganizationsClientDiagnostics, Pipeline, "MockablePineconeVectorDbSubscriptionResource.GetOrganizationResources", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/PineconeVectorDbExtensions.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/PineconeVectorDbExtensions.cs new file mode 100644 index 000000000000..783311fc97d0 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Extensions/PineconeVectorDbExtensions.cs @@ -0,0 +1,219 @@ +// 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.Core; +using Azure.ResourceManager.PineconeVectorDb.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.PineconeVectorDb +{ + /// A class to add extension methods to Azure.ResourceManager.PineconeVectorDb. + public static partial class PineconeVectorDbExtensions + { + private static MockablePineconeVectorDbArmClient GetMockablePineconeVectorDbArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockablePineconeVectorDbArmClient(client0)); + } + + private static MockablePineconeVectorDbResourceGroupResource GetMockablePineconeVectorDbResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockablePineconeVectorDbResourceGroupResource(client, resource.Id)); + } + + private static MockablePineconeVectorDbSubscriptionResource GetMockablePineconeVectorDbSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockablePineconeVectorDbSubscriptionResource(client, resource.Id)); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static OrganizationResource GetOrganizationResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockablePineconeVectorDbArmClient(client).GetOrganizationResource(id); + } + + /// + /// Gets a collection of OrganizationResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of OrganizationResources and their operations over a OrganizationResource. + public static OrganizationResourceCollection GetOrganizationResources(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockablePineconeVectorDbResourceGroupResource(resourceGroupResource).GetOrganizationResources(); + } + + /// + /// Get a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the Organization resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetOrganizationResourceAsync(this ResourceGroupResource resourceGroupResource, string organizationname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockablePineconeVectorDbResourceGroupResource(resourceGroupResource).GetOrganizationResourceAsync(organizationname, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the Organization resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetOrganizationResource(this ResourceGroupResource resourceGroupResource, string organizationname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockablePineconeVectorDbResourceGroupResource(resourceGroupResource).GetOrganizationResource(organizationname, cancellationToken); + } + + /// + /// List OrganizationResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Pinecone.VectorDb/organizations + /// + /// + /// Operation Id + /// OrganizationResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetOrganizationResourcesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockablePineconeVectorDbSubscriptionResource(subscriptionResource).GetOrganizationResourcesAsync(cancellationToken); + } + + /// + /// List OrganizationResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Pinecone.VectorDb/organizations + /// + /// + /// Operation Id + /// OrganizationResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetOrganizationResources(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockablePineconeVectorDbSubscriptionResource(subscriptionResource).GetOrganizationResources(cancellationToken); + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/Argument.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..18bb21f25071 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.PineconeVectorDb +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..34ea921ffbb0 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.PineconeVectorDb +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/ChangeTrackingList.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..64f9daba0cca --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// 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.Linq; + +namespace Azure.ResourceManager.PineconeVectorDb +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..cedf6df60863 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.PineconeVectorDb +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/Optional.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..bf0cad081aad --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/Optional.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; + +namespace Azure.ResourceManager.PineconeVectorDb +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..ab8a515fe8e1 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.PineconeVectorDb +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/LongRunningOperation/OrganizationResourceOperationSource.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/LongRunningOperation/OrganizationResourceOperationSource.cs new file mode 100644 index 000000000000..ea9807d2b238 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/LongRunningOperation/OrganizationResourceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.PineconeVectorDb +{ + internal class OrganizationResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal OrganizationResourceOperationSource(ArmClient client) + { + _client = client; + } + + OrganizationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new OrganizationResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new OrganizationResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/LongRunningOperation/PineconeVectorDbArmOperation.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/LongRunningOperation/PineconeVectorDbArmOperation.cs new file mode 100644 index 000000000000..37236b8da8c9 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/LongRunningOperation/PineconeVectorDbArmOperation.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.PineconeVectorDb +{ +#pragma warning disable SA1649 // File name should match first type name + internal class PineconeVectorDbArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of PineconeVectorDbArmOperation for mocking. + protected PineconeVectorDbArmOperation() + { + } + + internal PineconeVectorDbArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal PineconeVectorDbArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "PineconeVectorDbArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + 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/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/LongRunningOperation/PineconeVectorDbArmOperationOfT.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/LongRunningOperation/PineconeVectorDbArmOperationOfT.cs new file mode 100644 index 000000000000..43aaa4f9a4c8 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/LongRunningOperation/PineconeVectorDbArmOperationOfT.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.PineconeVectorDb +{ +#pragma warning disable SA1649 // File name should match first type name + internal class PineconeVectorDbArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of PineconeVectorDbArmOperation for mocking. + protected PineconeVectorDbArmOperation() + { + } + + internal PineconeVectorDbArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal PineconeVectorDbArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "PineconeVectorDbArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + 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/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/MarketplaceDetails.Serialization.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/MarketplaceDetails.Serialization.cs new file mode 100644 index 000000000000..479ccbfef4a7 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/MarketplaceDetails.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + public partial class MarketplaceDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MarketplaceDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SubscriptionId)) + { + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + } + if (options.Format != "W" && Optional.IsDefined(SubscriptionStatus)) + { + writer.WritePropertyName("subscriptionStatus"u8); + writer.WriteStringValue(SubscriptionStatus.Value.ToString()); + } + writer.WritePropertyName("offerDetails"u8); + writer.WriteObjectValue(OfferDetails, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MarketplaceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MarketplaceDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMarketplaceDetails(document.RootElement, options); + } + + internal static MarketplaceDetails DeserializeMarketplaceDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subscriptionId = default; + MarketplaceSubscriptionStatus? subscriptionStatus = default; + OfferDetails offerDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subscriptionId"u8)) + { + subscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subscriptionStatus = new MarketplaceSubscriptionStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("offerDetails"u8)) + { + offerDetails = OfferDetails.DeserializeOfferDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MarketplaceDetails(subscriptionId, subscriptionStatus, offerDetails, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MarketplaceDetails)} does not support writing '{options.Format}' format."); + } + } + + MarketplaceDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMarketplaceDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MarketplaceDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/MarketplaceDetails.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/MarketplaceDetails.cs new file mode 100644 index 000000000000..395f57c45c72 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/MarketplaceDetails.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + /// Marketplace details for an organization. + public partial class MarketplaceDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Offer details for the marketplace that is selected by the user. + /// is null. + public MarketplaceDetails(OfferDetails offerDetails) + { + Argument.AssertNotNull(offerDetails, nameof(offerDetails)); + + OfferDetails = offerDetails; + } + + /// Initializes a new instance of . + /// Azure subscription id for the the marketplace offer is purchased from. + /// Marketplace subscription status. + /// Offer details for the marketplace that is selected by the user. + /// Keeps track of any properties unknown to the library. + internal MarketplaceDetails(string subscriptionId, MarketplaceSubscriptionStatus? subscriptionStatus, OfferDetails offerDetails, IDictionary serializedAdditionalRawData) + { + SubscriptionId = subscriptionId; + SubscriptionStatus = subscriptionStatus; + OfferDetails = offerDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MarketplaceDetails() + { + } + + /// Azure subscription id for the the marketplace offer is purchased from. + public string SubscriptionId { get; set; } + /// Marketplace subscription status. + public MarketplaceSubscriptionStatus? SubscriptionStatus { get; } + /// Offer details for the marketplace that is selected by the user. + public OfferDetails OfferDetails { get; set; } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/MarketplaceSubscriptionStatus.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/MarketplaceSubscriptionStatus.cs new file mode 100644 index 000000000000..fac00a104b21 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/MarketplaceSubscriptionStatus.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.PineconeVectorDb.Models +{ + /// Marketplace subscription status of a resource. + public readonly partial struct MarketplaceSubscriptionStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MarketplaceSubscriptionStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PendingFulfillmentStartValue = "PendingFulfillmentStart"; + private const string SubscribedValue = "Subscribed"; + private const string SuspendedValue = "Suspended"; + private const string UnsubscribedValue = "Unsubscribed"; + + /// Purchased but not yet activated. + public static MarketplaceSubscriptionStatus PendingFulfillmentStart { get; } = new MarketplaceSubscriptionStatus(PendingFulfillmentStartValue); + /// Marketplace subscription is activated. + public static MarketplaceSubscriptionStatus Subscribed { get; } = new MarketplaceSubscriptionStatus(SubscribedValue); + /// This state indicates that a customer's payment for the Marketplace service was not received. + public static MarketplaceSubscriptionStatus Suspended { get; } = new MarketplaceSubscriptionStatus(SuspendedValue); + /// Customer has cancelled the subscription. + public static MarketplaceSubscriptionStatus Unsubscribed { get; } = new MarketplaceSubscriptionStatus(UnsubscribedValue); + /// Determines if two values are the same. + public static bool operator ==(MarketplaceSubscriptionStatus left, MarketplaceSubscriptionStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MarketplaceSubscriptionStatus left, MarketplaceSubscriptionStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MarketplaceSubscriptionStatus(string value) => new MarketplaceSubscriptionStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MarketplaceSubscriptionStatus other && Equals(other); + /// + public bool Equals(MarketplaceSubscriptionStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OfferDetails.Serialization.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OfferDetails.Serialization.cs new file mode 100644 index 000000000000..cc0669c385d8 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OfferDetails.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + public partial class OfferDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OfferDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("publisherId"u8); + writer.WriteStringValue(PublisherId); + writer.WritePropertyName("offerId"u8); + writer.WriteStringValue(OfferId); + writer.WritePropertyName("planId"u8); + writer.WriteStringValue(PlanId); + if (Optional.IsDefined(PlanName)) + { + writer.WritePropertyName("planName"u8); + writer.WriteStringValue(PlanName); + } + if (Optional.IsDefined(TermUnit)) + { + writer.WritePropertyName("termUnit"u8); + writer.WriteStringValue(TermUnit); + } + if (Optional.IsDefined(TermId)) + { + writer.WritePropertyName("termId"u8); + writer.WriteStringValue(TermId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OfferDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OfferDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOfferDetails(document.RootElement, options); + } + + internal static OfferDetails DeserializeOfferDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string publisherId = default; + string offerId = default; + string planId = default; + string planName = default; + string termUnit = default; + string termId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publisherId"u8)) + { + publisherId = property.Value.GetString(); + continue; + } + if (property.NameEquals("offerId"u8)) + { + offerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("planId"u8)) + { + planId = property.Value.GetString(); + continue; + } + if (property.NameEquals("planName"u8)) + { + planName = property.Value.GetString(); + continue; + } + if (property.NameEquals("termUnit"u8)) + { + termUnit = property.Value.GetString(); + continue; + } + if (property.NameEquals("termId"u8)) + { + termId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OfferDetails( + publisherId, + offerId, + planId, + planName, + termUnit, + termId, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OfferDetails)} does not support writing '{options.Format}' format."); + } + } + + OfferDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOfferDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OfferDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OfferDetails.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OfferDetails.cs new file mode 100644 index 000000000000..719189eb95cb --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OfferDetails.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + /// Offer details for the marketplace that is selected by the user. + public partial class OfferDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Publisher Id for the marketplace offer. + /// Offer Id for the marketplace offer. + /// Plan Id for the marketplace offer. + /// , or is null. + public OfferDetails(string publisherId, string offerId, string planId) + { + Argument.AssertNotNull(publisherId, nameof(publisherId)); + Argument.AssertNotNull(offerId, nameof(offerId)); + Argument.AssertNotNull(planId, nameof(planId)); + + PublisherId = publisherId; + OfferId = offerId; + PlanId = planId; + } + + /// Initializes a new instance of . + /// Publisher Id for the marketplace offer. + /// Offer Id for the marketplace offer. + /// Plan Id for the marketplace offer. + /// Plan Name for the marketplace offer. + /// Plan Display Name for the marketplace offer. + /// Plan Display Name for the marketplace offer. + /// Keeps track of any properties unknown to the library. + internal OfferDetails(string publisherId, string offerId, string planId, string planName, string termUnit, string termId, IDictionary serializedAdditionalRawData) + { + PublisherId = publisherId; + OfferId = offerId; + PlanId = planId; + PlanName = planName; + TermUnit = termUnit; + TermId = termId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OfferDetails() + { + } + + /// Publisher Id for the marketplace offer. + public string PublisherId { get; set; } + /// Offer Id for the marketplace offer. + public string OfferId { get; set; } + /// Plan Id for the marketplace offer. + public string PlanId { get; set; } + /// Plan Name for the marketplace offer. + public string PlanName { get; set; } + /// Plan Display Name for the marketplace offer. + public string TermUnit { get; set; } + /// Plan Display Name for the marketplace offer. + public string TermId { get; set; } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationProperties.Serialization.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationProperties.Serialization.cs new file mode 100644 index 000000000000..dd14053aa4c9 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationProperties.Serialization.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + public partial class OrganizationProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrganizationProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("marketplace"u8); + writer.WriteObjectValue(Marketplace, options); + writer.WritePropertyName("user"u8); + writer.WriteObjectValue(User, options); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(PartnerProperties)) + { + writer.WritePropertyName("partnerProperties"u8); + writer.WriteObjectValue(PartnerProperties, options); + } + if (Optional.IsDefined(SingleSignOnProperties)) + { + writer.WritePropertyName("singleSignOnProperties"u8); + writer.WriteObjectValue(SingleSignOnProperties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OrganizationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrganizationProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOrganizationProperties(document.RootElement, options); + } + + internal static OrganizationProperties DeserializeOrganizationProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MarketplaceDetails marketplace = default; + UserDetails user = default; + ResourceProvisioningState? provisioningState = default; + PartnerProperties partnerProperties = default; + SingleSignOnPropertiesV2 singleSignOnProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("marketplace"u8)) + { + marketplace = MarketplaceDetails.DeserializeMarketplaceDetails(property.Value, options); + continue; + } + if (property.NameEquals("user"u8)) + { + user = UserDetails.DeserializeUserDetails(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("partnerProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partnerProperties = PartnerProperties.DeserializePartnerProperties(property.Value, options); + continue; + } + if (property.NameEquals("singleSignOnProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + singleSignOnProperties = SingleSignOnPropertiesV2.DeserializeSingleSignOnPropertiesV2(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OrganizationProperties( + marketplace, + user, + provisioningState, + partnerProperties, + singleSignOnProperties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OrganizationProperties)} does not support writing '{options.Format}' format."); + } + } + + OrganizationProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOrganizationProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OrganizationProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationProperties.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationProperties.cs new file mode 100644 index 000000000000..a63d7cb21a6c --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationProperties.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + /// Properties specific to Organization. + public partial class OrganizationProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Marketplace details of the resource. + /// Details of the user. + /// or is null. + public OrganizationProperties(MarketplaceDetails marketplace, UserDetails user) + { + Argument.AssertNotNull(marketplace, nameof(marketplace)); + Argument.AssertNotNull(user, nameof(user)); + + Marketplace = marketplace; + User = user; + } + + /// Initializes a new instance of . + /// Marketplace details of the resource. + /// Details of the user. + /// Provisioning state of the resource. + /// partner properties. + /// Single sign-on properties. + /// Keeps track of any properties unknown to the library. + internal OrganizationProperties(MarketplaceDetails marketplace, UserDetails user, ResourceProvisioningState? provisioningState, PartnerProperties partnerProperties, SingleSignOnPropertiesV2 singleSignOnProperties, IDictionary serializedAdditionalRawData) + { + Marketplace = marketplace; + User = user; + ProvisioningState = provisioningState; + PartnerProperties = partnerProperties; + SingleSignOnProperties = singleSignOnProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OrganizationProperties() + { + } + + /// Marketplace details of the resource. + public MarketplaceDetails Marketplace { get; set; } + /// Details of the user. + public UserDetails User { get; set; } + /// Provisioning state of the resource. + public ResourceProvisioningState? ProvisioningState { get; } + /// partner properties. + internal PartnerProperties PartnerProperties { get; set; } + /// Pinecone Organization Name. + public string PartnerDisplayName + { + get => PartnerProperties is null ? default : PartnerProperties.DisplayName; + set => PartnerProperties = new PartnerProperties(value); + } + + /// Single sign-on properties. + public SingleSignOnPropertiesV2 SingleSignOnProperties { get; set; } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourceListResult.Serialization.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourceListResult.Serialization.cs new file mode 100644 index 000000000000..027db036ec7b --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + internal partial class OrganizationResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrganizationResourceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OrganizationResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrganizationResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOrganizationResourceListResult(document.RootElement, options); + } + + internal static OrganizationResourceListResult DeserializeOrganizationResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OrganizationResourceData.DeserializeOrganizationResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OrganizationResourceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OrganizationResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + OrganizationResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOrganizationResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OrganizationResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourceListResult.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourceListResult.cs new file mode 100644 index 000000000000..157d078893aa --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + /// The response of a OrganizationResource list operation. + internal partial class OrganizationResourceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The OrganizationResource items on this page. + /// is null. + internal OrganizationResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The OrganizationResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal OrganizationResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OrganizationResourceListResult() + { + } + + /// The OrganizationResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourcePatch.Serialization.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourcePatch.Serialization.cs new file mode 100644 index 000000000000..3be8f8ad1504 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourcePatch.Serialization.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + public partial class OrganizationResourcePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrganizationResourcePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OrganizationResourcePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrganizationResourcePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOrganizationResourcePatch(document.RootElement, options); + } + + internal static OrganizationResourcePatch DeserializeOrganizationResourcePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + ManagedServiceIdentity identity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OrganizationResourcePatch(tags ?? new ChangeTrackingDictionary(), identity, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OrganizationResourcePatch)} does not support writing '{options.Format}' format."); + } + } + + OrganizationResourcePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOrganizationResourcePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OrganizationResourcePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourcePatch.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourcePatch.cs new file mode 100644 index 000000000000..a48cda9fd021 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/OrganizationResourcePatch.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + /// The type used for update operations of the Organization Resource. + public partial class OrganizationResourcePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OrganizationResourcePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The managed service identities assigned to this resource. + /// Keeps track of any properties unknown to the library. + internal OrganizationResourcePatch(IDictionary tags, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The managed service identities assigned to this resource. + public ManagedServiceIdentity Identity { get; set; } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/PartnerProperties.Serialization.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/PartnerProperties.Serialization.cs new file mode 100644 index 000000000000..3d0f36a07d60 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/PartnerProperties.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + internal partial class PartnerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PartnerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePartnerProperties(document.RootElement, options); + } + + internal static PartnerProperties DeserializePartnerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string displayName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PartnerProperties(displayName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PartnerProperties)} does not support writing '{options.Format}' format."); + } + } + + PartnerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePartnerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PartnerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/PartnerProperties.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/PartnerProperties.cs new file mode 100644 index 000000000000..2620433acb2d --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/PartnerProperties.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; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + /// Partner's specific Properties. + internal partial class PartnerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Pinecone Organization Name. + /// is null. + public PartnerProperties(string displayName) + { + Argument.AssertNotNull(displayName, nameof(displayName)); + + DisplayName = displayName; + } + + /// Initializes a new instance of . + /// Pinecone Organization Name. + /// Keeps track of any properties unknown to the library. + internal PartnerProperties(string displayName, IDictionary serializedAdditionalRawData) + { + DisplayName = displayName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PartnerProperties() + { + } + + /// Pinecone Organization Name. + public string DisplayName { get; set; } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/ResourceProvisioningState.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/ResourceProvisioningState.cs new file mode 100644 index 000000000000..4b000d174639 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/ResourceProvisioningState.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.PineconeVectorDb.Models +{ + /// The provisioning state of a resource type. + public readonly partial struct ResourceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static ResourceProvisioningState Succeeded { get; } = new ResourceProvisioningState(SucceededValue); + /// Resource creation failed. + public static ResourceProvisioningState Failed { get; } = new ResourceProvisioningState(FailedValue); + /// Resource creation was canceled. + public static ResourceProvisioningState Canceled { get; } = new ResourceProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceProvisioningState left, ResourceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceProvisioningState left, ResourceProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ResourceProvisioningState(string value) => new ResourceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceProvisioningState other && Equals(other); + /// + public bool Equals(ResourceProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnPropertiesV2.Serialization.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnPropertiesV2.Serialization.cs new file mode 100644 index 000000000000..7db6a9c5c7eb --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnPropertiesV2.Serialization.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + public partial class SingleSignOnPropertiesV2 : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleSignOnPropertiesV2)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(EnterpriseAppId)) + { + writer.WritePropertyName("enterpriseAppId"u8); + writer.WriteStringValue(EnterpriseAppId); + } + if (Optional.IsDefined(Uri)) + { + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Uri); + } + if (Optional.IsCollectionDefined(AadDomains)) + { + writer.WritePropertyName("aadDomains"u8); + writer.WriteStartArray(); + foreach (var item in AadDomains) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SingleSignOnPropertiesV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleSignOnPropertiesV2)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleSignOnPropertiesV2(document.RootElement, options); + } + + internal static SingleSignOnPropertiesV2 DeserializeSingleSignOnPropertiesV2(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SingleSignOnType type = default; + SingleSignOnState? state = default; + string enterpriseAppId = default; + string url = default; + IList aadDomains = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new SingleSignOnType(property.Value.GetString()); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new SingleSignOnState(property.Value.GetString()); + continue; + } + if (property.NameEquals("enterpriseAppId"u8)) + { + enterpriseAppId = property.Value.GetString(); + continue; + } + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("aadDomains"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + aadDomains = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SingleSignOnPropertiesV2( + type, + state, + enterpriseAppId, + url, + aadDomains ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleSignOnPropertiesV2)} does not support writing '{options.Format}' format."); + } + } + + SingleSignOnPropertiesV2 IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSingleSignOnPropertiesV2(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleSignOnPropertiesV2)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnPropertiesV2.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnPropertiesV2.cs new file mode 100644 index 000000000000..8a02b7096334 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnPropertiesV2.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + /// Properties specific to Single Sign On Resource. + public partial class SingleSignOnPropertiesV2 + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Type of Single Sign-On mechanism being used. + public SingleSignOnPropertiesV2(SingleSignOnType type) + { + Type = type; + AadDomains = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Type of Single Sign-On mechanism being used. + /// State of the Single Sign On for the resource. + /// AAD enterprise application Id used to setup SSO. + /// URL for SSO to be used by the partner to redirect the user to their system. + /// List of AAD domains fetched from Microsoft Graph for user. + /// Keeps track of any properties unknown to the library. + internal SingleSignOnPropertiesV2(SingleSignOnType type, SingleSignOnState? state, string enterpriseAppId, string uri, IList aadDomains, IDictionary serializedAdditionalRawData) + { + Type = type; + State = state; + EnterpriseAppId = enterpriseAppId; + Uri = uri; + AadDomains = aadDomains; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SingleSignOnPropertiesV2() + { + } + + /// Type of Single Sign-On mechanism being used. + public SingleSignOnType Type { get; set; } + /// State of the Single Sign On for the resource. + public SingleSignOnState? State { get; set; } + /// AAD enterprise application Id used to setup SSO. + public string EnterpriseAppId { get; set; } + /// URL for SSO to be used by the partner to redirect the user to their system. + public string Uri { get; set; } + /// List of AAD domains fetched from Microsoft Graph for user. + public IList AadDomains { get; } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnState.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnState.cs new file mode 100644 index 000000000000..e2425452b081 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnState.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.PineconeVectorDb.Models +{ + /// Various states of the SSO resource. + public readonly partial struct SingleSignOnState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SingleSignOnState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InitialValue = "Initial"; + private const string EnableValue = "Enable"; + private const string DisableValue = "Disable"; + + /// Initial state of the SSO resource. + public static SingleSignOnState Initial { get; } = new SingleSignOnState(InitialValue); + /// State of the SSO resource when it is enabled. + public static SingleSignOnState Enable { get; } = new SingleSignOnState(EnableValue); + /// State of the SSO resource when it is disabled. + public static SingleSignOnState Disable { get; } = new SingleSignOnState(DisableValue); + /// Determines if two values are the same. + public static bool operator ==(SingleSignOnState left, SingleSignOnState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SingleSignOnState left, SingleSignOnState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SingleSignOnState(string value) => new SingleSignOnState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SingleSignOnState other && Equals(other); + /// + public bool Equals(SingleSignOnState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnType.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnType.cs new file mode 100644 index 000000000000..1bdb797d0eab --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/SingleSignOnType.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.PineconeVectorDb.Models +{ + /// Defines the type of Single Sign-On (SSO) mechanism being used. + public readonly partial struct SingleSignOnType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SingleSignOnType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SamlValue = "Saml"; + private const string OpenIdValue = "OpenId"; + + /// Security Assertion Markup Language (SAML) based Single Sign-On. + public static SingleSignOnType Saml { get; } = new SingleSignOnType(SamlValue); + /// OpenID Connect based Single Sign-On. + public static SingleSignOnType OpenId { get; } = new SingleSignOnType(OpenIdValue); + /// Determines if two values are the same. + public static bool operator ==(SingleSignOnType left, SingleSignOnType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SingleSignOnType left, SingleSignOnType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SingleSignOnType(string value) => new SingleSignOnType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SingleSignOnType other && Equals(other); + /// + public bool Equals(SingleSignOnType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/UserDetails.Serialization.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/UserDetails.Serialization.cs new file mode 100644 index 000000000000..e243b931509f --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/UserDetails.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + public partial class UserDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UserDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(FirstName)) + { + writer.WritePropertyName("firstName"u8); + writer.WriteStringValue(FirstName); + } + if (Optional.IsDefined(LastName)) + { + writer.WritePropertyName("lastName"u8); + writer.WriteStringValue(LastName); + } + if (Optional.IsDefined(EmailAddress)) + { + writer.WritePropertyName("emailAddress"u8); + writer.WriteStringValue(EmailAddress); + } + if (Optional.IsDefined(Upn)) + { + writer.WritePropertyName("upn"u8); + writer.WriteStringValue(Upn); + } + if (Optional.IsDefined(PhoneNumber)) + { + writer.WritePropertyName("phoneNumber"u8); + writer.WriteStringValue(PhoneNumber); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + UserDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UserDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUserDetails(document.RootElement, options); + } + + internal static UserDetails DeserializeUserDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string firstName = default; + string lastName = default; + string emailAddress = default; + string upn = default; + string phoneNumber = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("firstName"u8)) + { + firstName = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastName"u8)) + { + lastName = property.Value.GetString(); + continue; + } + if (property.NameEquals("emailAddress"u8)) + { + emailAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("upn"u8)) + { + upn = property.Value.GetString(); + continue; + } + if (property.NameEquals("phoneNumber"u8)) + { + phoneNumber = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UserDetails( + firstName, + lastName, + emailAddress, + upn, + phoneNumber, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UserDetails)} does not support writing '{options.Format}' format."); + } + } + + UserDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUserDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UserDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/UserDetails.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/UserDetails.cs new file mode 100644 index 000000000000..fcabf1faf43a --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/Models/UserDetails.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.PineconeVectorDb.Models +{ + /// User details for an organization. + public partial class UserDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public UserDetails() + { + } + + /// Initializes a new instance of . + /// First name of the user. + /// Last name of the user. + /// Email address of the user. + /// User's principal name. + /// User's phone number. + /// Keeps track of any properties unknown to the library. + internal UserDetails(string firstName, string lastName, string emailAddress, string upn, string phoneNumber, IDictionary serializedAdditionalRawData) + { + FirstName = firstName; + LastName = lastName; + EmailAddress = emailAddress; + Upn = upn; + PhoneNumber = phoneNumber; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// First name of the user. + public string FirstName { get; set; } + /// Last name of the user. + public string LastName { get; set; } + /// Email address of the user. + public string EmailAddress { get; set; } + /// User's principal name. + public string Upn { get; set; } + /// User's phone number. + public string PhoneNumber { get; set; } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResource.Serialization.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResource.Serialization.cs new file mode 100644 index 000000000000..dfc0a87bd7d4 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.PineconeVectorDb +{ + public partial class OrganizationResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + OrganizationResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + OrganizationResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResource.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResource.cs new file mode 100644 index 000000000000..8362bcaf8fb2 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResource.cs @@ -0,0 +1,699 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.PineconeVectorDb.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.PineconeVectorDb +{ + /// + /// A Class representing an OrganizationResource 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 GetOrganizationResource method. + /// Otherwise you can get one from its parent resource using the GetOrganizationResource method. + /// + public partial class OrganizationResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationname. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationname) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _organizationResourceOrganizationsClientDiagnostics; + private readonly OrganizationsRestOperations _organizationResourceOrganizationsRestClient; + private readonly OrganizationResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Pinecone.VectorDb/organizations"; + + /// Initializes a new instance of the class for mocking. + protected OrganizationResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal OrganizationResource(ArmClient client, OrganizationResourceData 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 OrganizationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _organizationResourceOrganizationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PineconeVectorDb", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string organizationResourceOrganizationsApiVersion); + _organizationResourceOrganizationsRestClient = new OrganizationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, organizationResourceOrganizationsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 OrganizationResourceData 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 OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResource.Get"); + scope.Start(); + try + { + var response = await _organizationResourceOrganizationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new OrganizationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResource.Get"); + scope.Start(); + try + { + var response = _organizationResourceOrganizationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new OrganizationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Delete + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResource.Delete"); + scope.Start(); + try + { + var response = await _organizationResourceOrganizationsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new PineconeVectorDbArmOperation(_organizationResourceOrganizationsClientDiagnostics, Pipeline, _organizationResourceOrganizationsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Delete + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResource.Delete"); + scope.Start(); + try + { + var response = _organizationResourceOrganizationsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new PineconeVectorDbArmOperation(_organizationResourceOrganizationsClientDiagnostics, Pipeline, _organizationResourceOrganizationsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Update + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(OrganizationResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResource.Update"); + scope.Start(); + try + { + var response = await _organizationResourceOrganizationsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new OrganizationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Update + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(OrganizationResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResource.Update"); + scope.Start(); + try + { + var response = _organizationResourceOrganizationsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + return Response.FromValue(new OrganizationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _organizationResourceOrganizationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new OrganizationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new OrganizationResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _organizationResourceOrganizationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new OrganizationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new OrganizationResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _organizationResourceOrganizationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new OrganizationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new OrganizationResourcePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + 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 = _organizationResourceOrganizationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new OrganizationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new OrganizationResourcePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _organizationResourceOrganizationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new OrganizationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new OrganizationResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _organizationResourceOrganizationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new OrganizationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new OrganizationResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResourceCollection.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResourceCollection.cs new file mode 100644 index 000000000000..9ae03104f417 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResourceCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.PineconeVectorDb +{ + /// + /// 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 GetOrganizationResources method from an instance of . + /// + public partial class OrganizationResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _organizationResourceOrganizationsClientDiagnostics; + private readonly OrganizationsRestOperations _organizationResourceOrganizationsRestClient; + + /// Initializes a new instance of the class for mocking. + protected OrganizationResourceCollection() + { + } + + /// 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 OrganizationResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _organizationResourceOrganizationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PineconeVectorDb", OrganizationResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(OrganizationResource.ResourceType, out string organizationResourceOrganizationsApiVersion); + _organizationResourceOrganizationsRestClient = new OrganizationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, organizationResourceOrganizationsApiVersion); +#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 OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Name of the Organization resource. + /// Resource create parameters. + /// 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 organizationname, OrganizationResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _organizationResourceOrganizationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, organizationname, data, cancellationToken).ConfigureAwait(false); + var operation = new PineconeVectorDbArmOperation(new OrganizationResourceOperationSource(Client), _organizationResourceOrganizationsClientDiagnostics, Pipeline, _organizationResourceOrganizationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, organizationname, 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 OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Name of the Organization resource. + /// Resource create parameters. + /// 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 organizationname, OrganizationResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _organizationResourceOrganizationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, organizationname, data, cancellationToken); + var operation = new PineconeVectorDbArmOperation(new OrganizationResourceOperationSource(Client), _organizationResourceOrganizationsClientDiagnostics, Pipeline, _organizationResourceOrganizationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, organizationname, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization 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 organizationname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + + using var scope = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResourceCollection.Get"); + scope.Start(); + try + { + var response = await _organizationResourceOrganizationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, organizationname, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new OrganizationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string organizationname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + + using var scope = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResourceCollection.Get"); + scope.Start(); + try + { + var response = _organizationResourceOrganizationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, organizationname, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new OrganizationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List OrganizationResource resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations + /// + /// + /// Operation Id + /// OrganizationResource_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _organizationResourceOrganizationsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _organizationResourceOrganizationsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new OrganizationResource(Client, OrganizationResourceData.DeserializeOrganizationResourceData(e)), _organizationResourceOrganizationsClientDiagnostics, Pipeline, "OrganizationResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List OrganizationResource resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations + /// + /// + /// Operation Id + /// OrganizationResource_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _organizationResourceOrganizationsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _organizationResourceOrganizationsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new OrganizationResource(Client, OrganizationResourceData.DeserializeOrganizationResourceData(e)), _organizationResourceOrganizationsClientDiagnostics, Pipeline, "OrganizationResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization 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 organizationname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + + using var scope = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _organizationResourceOrganizationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, organizationname, 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/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string organizationname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + + using var scope = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResourceCollection.Exists"); + scope.Start(); + try + { + var response = _organizationResourceOrganizationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, organizationname, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string organizationname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + + using var scope = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _organizationResourceOrganizationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, organizationname, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new OrganizationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-10-22-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string organizationname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + + using var scope = _organizationResourceOrganizationsClientDiagnostics.CreateScope("OrganizationResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _organizationResourceOrganizationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, organizationname, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new OrganizationResource(Client, response.Value), 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/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResourceData.Serialization.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResourceData.Serialization.cs new file mode 100644 index 000000000000..96b563a298c3 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResourceData.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.PineconeVectorDb.Models; + +namespace Azure.ResourceManager.PineconeVectorDb +{ + public partial class OrganizationResourceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrganizationResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + } + + OrganizationResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrganizationResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOrganizationResourceData(document.RootElement, options); + } + + internal static OrganizationResourceData DeserializeOrganizationResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OrganizationProperties properties = default; + ManagedServiceIdentity identity = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = OrganizationProperties.DeserializeOrganizationProperties(property.Value, options); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + 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"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OrganizationResourceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + identity, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OrganizationResourceData)} does not support writing '{options.Format}' format."); + } + } + + OrganizationResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOrganizationResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OrganizationResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResourceData.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResourceData.cs new file mode 100644 index 000000000000..a3227c03f06c --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/OrganizationResourceData.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.PineconeVectorDb.Models; + +namespace Azure.ResourceManager.PineconeVectorDb +{ + /// + /// A class representing the OrganizationResource data model. + /// Concrete tracked resource types can be created by aliasing this type using a specific property type. + /// + public partial class OrganizationResourceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public OrganizationResourceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// Keeps track of any properties unknown to the library. + internal OrganizationResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, OrganizationProperties properties, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OrganizationResourceData() + { + } + + /// The resource-specific properties for this resource. + public OrganizationProperties Properties { get; set; } + /// The managed service identities assigned to this resource. + public ManagedServiceIdentity Identity { get; set; } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/ProviderConstants.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..03b47c36ff71 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/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.PineconeVectorDb +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/RestOperations/OrganizationsRestOperations.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/RestOperations/OrganizationsRestOperations.cs new file mode 100644 index 000000000000..1cc86dbd06ef --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Generated/RestOperations/OrganizationsRestOperations.cs @@ -0,0 +1,731 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.PineconeVectorDb.Models; + +namespace Azure.ResourceManager.PineconeVectorDb +{ + internal partial class OrganizationsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OrganizationsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public OrganizationsRestOperations(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 ?? "2024-10-22-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationname) + { + 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/Pinecone.VectorDb/organizations/", false); + uri.AppendPath(organizationname, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationname) + { + 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/Pinecone.VectorDb/organizations/", false); + uri.AppendPath(organizationname, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a OrganizationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Organization 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 organizationname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationname); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OrganizationResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrganizationResourceData.DeserializeOrganizationResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((OrganizationResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a OrganizationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Organization 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 organizationname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationname); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OrganizationResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrganizationResourceData.DeserializeOrganizationResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((OrganizationResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationname, OrganizationResourceData data) + { + 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/Pinecone.VectorDb/organizations/", false); + uri.AppendPath(organizationname, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationname, OrganizationResourceData 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/Pinecone.VectorDb/organizations/", false); + uri.AppendPath(organizationname, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a OrganizationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Organization resource. + /// Resource create parameters. + /// 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 organizationname, OrganizationResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationname, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a OrganizationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Organization resource. + /// Resource create parameters. + /// 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 organizationname, OrganizationResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationname, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationname, OrganizationResourcePatch 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/Pinecone.VectorDb/organizations/", false); + uri.AppendPath(organizationname, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string organizationname, OrganizationResourcePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Pinecone.VectorDb/organizations/", false); + uri.AppendPath(organizationname, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a OrganizationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Organization resource. + /// The resource properties to be updated. + /// 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 organizationname, OrganizationResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationname, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OrganizationResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrganizationResourceData.DeserializeOrganizationResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a OrganizationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Organization resource. + /// The resource properties to be updated. + /// 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 organizationname, OrganizationResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationname, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OrganizationResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrganizationResourceData.DeserializeOrganizationResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationname) + { + 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/Pinecone.VectorDb/organizations/", false); + uri.AppendPath(organizationname, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationname) + { + 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/Pinecone.VectorDb/organizations/", false); + uri.AppendPath(organizationname, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a OrganizationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Organization 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 organizationname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationname); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a OrganizationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Organization 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 organizationname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationname, nameof(organizationname)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationname); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + 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/Pinecone.VectorDb/organizations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(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/Pinecone.VectorDb/organizations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List OrganizationResource resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OrganizationResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List OrganizationResource resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OrganizationResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Pinecone.VectorDb/organizations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + 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/Pinecone.VectorDb/organizations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List OrganizationResource resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + OrganizationResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List OrganizationResource resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + OrganizationResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(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; + } + + /// List OrganizationResource resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(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 = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OrganizationResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List OrganizationResource resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(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 = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OrganizationResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + 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; + } + + /// List OrganizationResource resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + OrganizationResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List OrganizationResource resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + OrganizationResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Properties/AssemblyInfo.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..b55d2b26e599 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.PineconeVectorDb.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("PineconeVectorDb")] diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tests/Azure.ResourceManager.PineconeVectorDb.Tests.csproj b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tests/Azure.ResourceManager.PineconeVectorDb.Tests.csproj new file mode 100644 index 000000000000..e5bdd5e65c69 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tests/Azure.ResourceManager.PineconeVectorDb.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tests/PineconeVectorDbManagementTestBase.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tests/PineconeVectorDbManagementTestBase.cs new file mode 100644 index 000000000000..8eda48d36492 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tests/PineconeVectorDbManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.PineconeVectorDb.Tests +{ + public class PineconeVectorDbManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected PineconeVectorDbManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected PineconeVectorDbManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + 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/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tests/PineconeVectorDbManagementTestEnvironment.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tests/PineconeVectorDbManagementTestEnvironment.cs new file mode 100644 index 000000000000..930750b0dff2 --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tests/PineconeVectorDbManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.PineconeVectorDb.Tests +{ + public class PineconeVectorDbManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tsp-location.yaml b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tsp-location.yaml new file mode 100644 index 000000000000..608cb8c6a21e --- /dev/null +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/liftrpinecone/Pinecone.VectorDb.Management +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/pineconevectordb/ci.mgmt.yml b/sdk/pineconevectordb/ci.mgmt.yml new file mode 100644 index 000000000000..eaf6533feb83 --- /dev/null +++ b/sdk/pineconevectordb/ci.mgmt.yml @@ -0,0 +1,26 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/pineconevectordb /ci.mgmt.yml + - sdk/pineconevectordb /Azure.ResourceManager.PineconeVectorDb / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: pineconevectordb + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.PineconeVectorDb + safeName: AzureResourceManagerPineconeVectorDb diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index d8bf790b5988..26069cb48d79 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -39,6 +39,7 @@ trigger: - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis - sdk/chaos/Azure.ResourceManager.Chaos - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices + - sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations - sdk/communication/Azure.ResourceManager.Communication - sdk/compute/Azure.ResourceManager.Compute - sdk/computefleet/Azure.ResourceManager.ComputeFleet @@ -52,10 +53,12 @@ trigger: - sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry - sdk/containerservice/Azure.ResourceManager.ContainerService + - sdk/contoso/Azure.ResourceManager.Contoso - sdk/cosmosdb/Azure.ResourceManager.CosmosDB - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql - sdk/costmanagement/Azure.ResourceManager.CostManagement - sdk/customer-insights/Azure.ResourceManager.CustomerInsights + - sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher - sdk/databox/Azure.ResourceManager.DataBox - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge - sdk/datadog/Azure.ResourceManager.Datadog @@ -77,9 +80,9 @@ trigger: - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins - sdk/dns/Azure.ResourceManager.Dns - sdk/dnsresolver/Azure.ResourceManager.DnsResolver + - sdk/durabletask/Azure.ResourceManager.DurableTask - sdk/dynatrace/Azure.ResourceManager.Dynatrace - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/edgezones/Azure.ResourceManager.EdgeZones - sdk/elastic/Azure.ResourceManager.Elastic - sdk/elasticsan/Azure.ResourceManager.ElasticSan @@ -104,10 +107,12 @@ trigger: - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes - sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork + - sdk/impactreporting/Azure.ResourceManager.ImpactReporting - sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - sdk/iotcentral/Azure.ResourceManager.IotCentral - sdk/iothub/Azure.ResourceManager.IotHub + - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/keyvault/Azure.ResourceManager.KeyVault - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - sdk/kusto/Azure.ResourceManager.Kusto @@ -147,6 +152,7 @@ trigger: - sdk/orbital/Azure.ResourceManager.Orbital - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw - sdk/peering/Azure.ResourceManager.Peering + - sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting - sdk/policyinsights/Azure.ResourceManager.PolicyInsights - sdk/postgresql/Azure.ResourceManager.PostgreSql @@ -181,6 +187,7 @@ trigger: - sdk/servicelinker/Azure.ResourceManager.ServiceLinker - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking - sdk/signalr/Azure.ResourceManager.SignalR + - sdk/sitemanager/Azure.ResourceManager.SiteManager - sdk/sphere/Azure.ResourceManager.Sphere - sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery - sdk/sqlmanagement/Azure.ResourceManager.Sql @@ -204,6 +211,7 @@ trigger: - sdk/websites/Azure.ResourceManager.AppService - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor - sdk/workloads/Azure.ResourceManager.Workloads + - sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances pr: branches: @@ -245,6 +253,7 @@ pr: - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis - sdk/chaos/Azure.ResourceManager.Chaos - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices + - sdk/commonedgesitemanageroperations/Azure.ResourceManager.CommonEdgeSiteManagerOperations - sdk/communication/Azure.ResourceManager.Communication - sdk/compute/Azure.ResourceManager.Compute - sdk/computefleet/Azure.ResourceManager.ComputeFleet @@ -258,10 +267,12 @@ pr: - sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry - sdk/containerservice/Azure.ResourceManager.ContainerService + - sdk/contoso/Azure.ResourceManager.Contoso - sdk/cosmosdb/Azure.ResourceManager.CosmosDB - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql - sdk/costmanagement/Azure.ResourceManager.CostManagement - sdk/customer-insights/Azure.ResourceManager.CustomerInsights + - sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher - sdk/databox/Azure.ResourceManager.DataBox - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge - sdk/datadog/Azure.ResourceManager.Datadog @@ -283,9 +294,9 @@ pr: - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins - sdk/dns/Azure.ResourceManager.Dns - sdk/dnsresolver/Azure.ResourceManager.DnsResolver + - sdk/durabletask/Azure.ResourceManager.DurableTask - sdk/dynatrace/Azure.ResourceManager.Dynatrace - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/edgezones/Azure.ResourceManager.EdgeZones - sdk/elastic/Azure.ResourceManager.Elastic - sdk/elasticsan/Azure.ResourceManager.ElasticSan @@ -310,10 +321,12 @@ pr: - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes - sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork + - sdk/impactreporting/Azure.ResourceManager.ImpactReporting - sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - sdk/iotcentral/Azure.ResourceManager.IotCentral - sdk/iothub/Azure.ResourceManager.IotHub + - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/keyvault/Azure.ResourceManager.KeyVault - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - sdk/kusto/Azure.ResourceManager.Kusto @@ -353,6 +366,7 @@ pr: - sdk/orbital/Azure.ResourceManager.Orbital - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw - sdk/peering/Azure.ResourceManager.Peering + - sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting - sdk/policyinsights/Azure.ResourceManager.PolicyInsights - sdk/postgresql/Azure.ResourceManager.PostgreSql @@ -387,6 +401,7 @@ pr: - sdk/servicelinker/Azure.ResourceManager.ServiceLinker - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking - sdk/signalr/Azure.ResourceManager.SignalR + - sdk/sitemanager/Azure.ResourceManager.SiteManager - sdk/sphere/Azure.ResourceManager.Sphere - sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery - sdk/sqlmanagement/Azure.ResourceManager.Sql @@ -410,6 +425,7 @@ pr: - sdk/websites/Azure.ResourceManager.AppService - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor - sdk/workloads/Azure.ResourceManager.Workloads + - sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/Configuration.json b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/Configuration.json new file mode 100644 index 000000000000..4a3e558fc260 --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/Configuration.json @@ -0,0 +1,12 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.ServiceNetworking", + "library-name": "Azure.ResourceManager.ServiceNetworking", + "flavor": "azure", + "use-model-reader-writer": true, + "shared-source-folders": [ + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared", + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "azure-arm": true +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tsp-location.yaml b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tsp-location.yaml index a148958abf88..1ddd99060de0 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tsp-location.yaml +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/servicenetworking/ServiceNetworking.Management -commit: aaa30aa706969369385454abb690e425d2e5addb +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tspCodeModel.json b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tspCodeModel.json new file mode 100644 index 000000000000..0d799d7a6d1d --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tspCodeModel.json @@ -0,0 +1,13781 @@ +{ + "$id": "1", + "Name": "Microsoft.ServiceNetworking", + "ApiVersions": [ + "2023-11-01", + "2024-05-01-preview", + "2025-01-01", + "2025-03-01-preview" + ], + "Enums": [ + { + "$id": "2", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a user or system.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "10", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "12", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "10" + }, + "doc": "Actions are for internal-only APIs.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "14", + "kind": "enum", + "name": "ServiceNetworkingProvisioningState", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.ProvisioningState", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "16", + "kind": "enumvalue", + "name": "Provisioning", + "value": "Provisioning", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource in Provisioning State", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "Updating", + "value": "Updating", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource in Updating State", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource in Deleting State", + "decorators": [] + }, + { + "$id": "22", + "kind": "enumvalue", + "name": "Accepted", + "value": "Accepted", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource in Accepted State", + "decorators": [] + }, + { + "$id": "24", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource in Succeeded State", + "decorators": [] + }, + { + "$id": "26", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource in Failed State", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource in Canceled State", + "decorators": [] + } + ], + "namespace": "Microsoft.ServiceNetworking", + "doc": "Resource Provisioning State Enum", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "30", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "32", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "34", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "40", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "42", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "44", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "48", + "kind": "enum", + "name": "ApplicationGatewayForContainersSecurityPolicyType", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.PolicyType", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "50", + "kind": "enumvalue", + "name": "WAF", + "value": "waf", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "Policy of Type WAF", + "decorators": [] + }, + { + "$id": "52", + "kind": "enumvalue", + "name": "IpAccessRules", + "value": "ipAccessRules", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "Policy of Type IpAccessRules", + "decorators": [] + } + ], + "namespace": "Microsoft.ServiceNetworking", + "doc": "Policy Type of the Security Policy", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "54", + "kind": "enum", + "name": "IpAccessRuleAction", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRuleAction", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "56", + "kind": "enumvalue", + "name": "Allow", + "value": "allow", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "54" + }, + "doc": "Allow Source Ip Prefixes", + "decorators": [] + }, + { + "$id": "58", + "kind": "enumvalue", + "name": "Deny", + "value": "deny", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "54" + }, + "doc": "Deny Source Ip Prefixes", + "decorators": [] + } + ], + "namespace": "Microsoft.ServiceNetworking", + "doc": "Action of Ip Access Rule", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "60", + "kind": "enum", + "name": "TrafficControllerAssociationType", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationType", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "62", + "kind": "enumvalue", + "name": "subnets", + "value": "subnets", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "doc": "Association of Type Subnet", + "decorators": [] + } + ], + "namespace": "Microsoft.ServiceNetworking", + "doc": "Association Type Enum", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "64", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.Versions", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "66", + "kind": "enumvalue", + "name": "v2023_11_01", + "value": "2023-11-01", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "2023-11-01 stable version", + "decorators": [] + }, + { + "$id": "68", + "kind": "enumvalue", + "name": "v2024_05_01_preview", + "value": "2024-05-01-preview", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "2024-05-01 preview version", + "decorators": [] + }, + { + "$id": "70", + "kind": "enumvalue", + "name": "v2025_05_01", + "value": "2025-01-01", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "2025-01-01 stable version", + "decorators": [] + }, + { + "$id": "72", + "kind": "enumvalue", + "name": "v2025_03_01_preview", + "value": "2025-03-01-preview", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "2025-03-01 preview version", + "decorators": [] + } + ], + "namespace": "Microsoft.ServiceNetworking", + "doc": "Api versions", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "Models": [ + { + "$id": "74", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult", + "usage": "Output,Json", + "doc": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "decorators": [], + "properties": [ + { + "$id": "75", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "76", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "77", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation", + "usage": "Output,Json", + "doc": "Details of a REST API operation, returned from the Resource Provider Operations API", + "decorators": [], + "properties": [ + { + "$id": "78", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name", + "serializationOptions": { + "$id": "80", + "json": { + "$id": "81", + "name": "name" + } + } + }, + { + "$id": "82", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.", + "type": { + "$id": "83", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction", + "serializationOptions": { + "$id": "84", + "json": { + "$id": "85", + "name": "isDataAction" + } + } + }, + { + "$id": "86", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "87", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "88", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider", + "serializationOptions": { + "$id": "90", + "json": { + "$id": "91", + "name": "provider" + } + } + }, + { + "$id": "92", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource", + "serializationOptions": { + "$id": "94", + "json": { + "$id": "95", + "name": "resource" + } + } + }, + { + "$id": "96", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation", + "serializationOptions": { + "$id": "98", + "json": { + "$id": "99", + "name": "operation" + } + } + }, + { + "$id": "100", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description", + "serializationOptions": { + "$id": "102", + "json": { + "$id": "103", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "104", + "json": { + "$id": "105", + "name": "display" + } + } + }, + { + "$id": "106", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin", + "serializationOptions": { + "$id": "107", + "json": { + "$id": "108", + "name": "origin" + } + } + }, + { + "$id": "109", + "kind": "property", + "name": "actionType", + "serializedName": "actionType", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": { + "$ref": "10" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType", + "serializationOptions": { + "$id": "110", + "json": { + "$id": "111", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "112", + "json": { + "$id": "113", + "name": "value" + } + } + }, + { + "$id": "114", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "115", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "116", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.nextLink", + "serializationOptions": { + "$id": "117", + "json": { + "$id": "118", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "77" + }, + { + "$ref": "87" + }, + { + "$id": "119", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Error,Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "120", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "121", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "122", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", + "serializationOptions": { + "$id": "124", + "json": { + "$id": "125", + "name": "code" + } + } + }, + { + "$id": "126", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", + "serializationOptions": { + "$id": "128", + "json": { + "$id": "129", + "name": "message" + } + } + }, + { + "$id": "130", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", + "serializationOptions": { + "$id": "132", + "json": { + "$id": "133", + "name": "target" + } + } + }, + { + "$id": "134", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "135", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "121" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "136", + "json": { + "$id": "137", + "name": "details" + } + } + }, + { + "$id": "138", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "139", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "140", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "141", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", + "serializationOptions": { + "$id": "143", + "json": { + "$id": "144", + "name": "type" + } + } + }, + { + "$id": "145", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "146", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Json,Exception,LroPolling", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", + "serializationOptions": { + "$id": "147", + "json": { + "$id": "148", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "149", + "json": { + "$id": "150", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "151", + "json": { + "$id": "152", + "name": "error" + } + } + } + ] + }, + { + "$ref": "121" + }, + { + "$ref": "140" + }, + { + "$ref": "146" + }, + { + "$id": "153", + "kind": "model", + "name": "TrafficController", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficController", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Concrete tracked resource types can be created by aliasing this type using a specific property type.", + "decorators": [], + "baseModel": { + "$id": "154", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$id": "155", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "156", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "type": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", + "serializationOptions": { + "$id": "158", + "json": { + "$id": "159", + "name": "id" + } + } + }, + { + "$id": "160", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name", + "serializationOptions": { + "$id": "162", + "json": { + "$id": "163", + "name": "name" + } + } + }, + { + "$id": "164", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "165", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "166", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type", + "serializationOptions": { + "$id": "167", + "json": { + "$id": "168", + "name": "type" + } + } + }, + { + "$id": "169", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "170", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "171", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "172", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy", + "serializationOptions": { + "$id": "173", + "json": { + "$id": "174", + "name": "createdBy" + } + } + }, + { + "$id": "175", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "30" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "176", + "json": { + "$id": "177", + "name": "createdByType" + } + } + }, + { + "$id": "178", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "179", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt", + "serializationOptions": { + "$id": "181", + "json": { + "$id": "182", + "name": "createdAt" + } + } + }, + { + "$id": "183", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy", + "serializationOptions": { + "$id": "185", + "json": { + "$id": "186", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "187", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "30" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "188", + "json": { + "$id": "189", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "190", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "191", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "192", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt", + "serializationOptions": { + "$id": "193", + "json": { + "$id": "194", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "195", + "json": { + "$id": "196", + "name": "systemData" + } + } + } + ] + }, + "properties": [ + { + "$id": "197", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "198", + "kind": "dict", + "keyType": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "200", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags", + "serializationOptions": { + "$id": "201", + "json": { + "$id": "202", + "name": "tags" + } + } + }, + { + "$id": "203", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "204", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location", + "serializationOptions": { + "$id": "205", + "json": { + "$id": "206", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "207", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "208", + "kind": "model", + "name": "TrafficControllerProperties", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Traffic Controller Properties.", + "decorators": [], + "properties": [ + { + "$id": "209", + "kind": "property", + "name": "configurationEndpoints", + "serializedName": "configurationEndpoints", + "doc": "Configuration Endpoints.", + "type": { + "$id": "210", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerProperties.configurationEndpoints", + "serializationOptions": { + "$id": "212", + "json": { + "$id": "213", + "name": "configurationEndpoints" + } + } + }, + { + "$id": "214", + "kind": "property", + "name": "frontends", + "serializedName": "frontends", + "doc": "Frontends References List", + "type": { + "$id": "215", + "kind": "array", + "name": "ArrayResourceId", + "valueType": { + "$id": "216", + "kind": "model", + "name": "ResourceId", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.ResourceId", + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Resource ID definition used by parent to reference child resources.", + "decorators": [], + "properties": [ + { + "$id": "217", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource ID of child resource.", + "type": { + "$id": "218", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.ResourceId.id", + "serializationOptions": { + "$id": "219", + "json": { + "$id": "220", + "name": "id" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerProperties.frontends", + "serializationOptions": { + "$id": "221", + "json": { + "$id": "222", + "name": "frontends" + } + } + }, + { + "$id": "223", + "kind": "property", + "name": "associations", + "serializedName": "associations", + "doc": "Associations References List", + "type": { + "$id": "224", + "kind": "array", + "name": "ArrayResourceId", + "valueType": { + "$ref": "216" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerProperties.associations", + "serializationOptions": { + "$id": "225", + "json": { + "$id": "226", + "name": "associations" + } + } + }, + { + "$id": "227", + "kind": "property", + "name": "securityPolicies", + "serializedName": "securityPolicies", + "doc": "Security Policies References List", + "type": { + "$id": "228", + "kind": "array", + "name": "ArrayResourceId", + "valueType": { + "$ref": "216" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerProperties.securityPolicies", + "serializationOptions": { + "$id": "229", + "json": { + "$id": "230", + "name": "securityPolicies" + } + } + }, + { + "$id": "231", + "kind": "property", + "name": "securityPolicyConfigurations", + "serializedName": "securityPolicyConfigurations", + "doc": "Security Policy Configuration", + "type": { + "$id": "232", + "kind": "model", + "name": "SecurityPolicyConfigurations", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyConfigurations", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "SecurityPolicyConfigurations Subresource of Traffic Controller.", + "decorators": [], + "properties": [ + { + "$id": "233", + "kind": "property", + "name": "wafSecurityPolicy", + "serializedName": "wafSecurityPolicy", + "doc": "Contains reference to a WAF-type security policy.", + "type": { + "$id": "234", + "kind": "model", + "name": "WafSecurityPolicy", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.WafSecurityPolicy", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Web Application Firewall Security Policy", + "decorators": [], + "properties": [ + { + "$id": "235", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource ID of the Waf Security Policy", + "type": { + "$id": "236", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.WafSecurityPolicy.id", + "serializationOptions": { + "$id": "237", + "json": { + "$id": "238", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyConfigurations.wafSecurityPolicy", + "serializationOptions": { + "$id": "239", + "json": { + "$id": "240", + "name": "wafSecurityPolicy" + } + } + }, + { + "$id": "241", + "kind": "property", + "name": "ipAccessRulesSecurityPolicy", + "serializedName": "ipAccessRulesSecurityPolicy", + "doc": "Contains reference to a IpAccessRules-type security policy.", + "type": { + "$id": "242", + "kind": "model", + "name": "IpAccessRulesSecurityPolicy", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRulesSecurityPolicy", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "IpAccessRules Security Policy", + "decorators": [], + "properties": [ + { + "$id": "243", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource ID of the Ip Access Rules Security Policy", + "type": { + "$id": "244", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRulesSecurityPolicy.id", + "serializationOptions": { + "$id": "245", + "json": { + "$id": "246", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyConfigurations.ipAccessRulesSecurityPolicy", + "serializationOptions": { + "$id": "247", + "json": { + "$id": "248", + "name": "ipAccessRulesSecurityPolicy" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerProperties.securityPolicyConfigurations", + "serializationOptions": { + "$id": "249", + "json": { + "$id": "250", + "name": "securityPolicyConfigurations" + } + } + }, + { + "$id": "251", + "kind": "property", + "name": "TrafficControllerProvisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerProperties.provisioningState", + "serializationOptions": { + "$id": "252", + "json": { + "$id": "253", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficController.properties", + "serializationOptions": { + "$id": "254", + "json": { + "$id": "255", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "208" + }, + { + "$ref": "216" + }, + { + "$ref": "232" + }, + { + "$ref": "234" + }, + { + "$ref": "242" + }, + { + "$ref": "154" + }, + { + "$ref": "155" + }, + { + "$ref": "170" + }, + { + "$id": "256", + "kind": "model", + "name": "TrafficControllerUpdate", + "namespace": "Azure.ResourceManager.Foundations", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the TrafficController.", + "decorators": [], + "properties": [ + { + "$id": "257", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "258", + "kind": "dict", + "keyType": { + "$id": "259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.tags", + "serializationOptions": { + "$id": "261", + "json": { + "$id": "262", + "name": "tags" + } + } + }, + { + "$id": "263", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "264", + "kind": "model", + "name": "TrafficControllerUpdateProperties", + "namespace": "Azure.ResourceManager.Foundations", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the TrafficController.", + "decorators": [], + "properties": [ + { + "$id": "265", + "kind": "property", + "name": "securityPolicyConfigurations", + "serializedName": "securityPolicyConfigurations", + "doc": "Security Policy Configuration", + "type": { + "$ref": "232" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.securityPolicyConfigurations", + "serializationOptions": { + "$id": "266", + "json": { + "$id": "267", + "name": "securityPolicyConfigurations" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "268", + "json": { + "$id": "269", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "264" + }, + { + "$id": "270", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "271", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "40" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "272", + "json": { + "$id": "273", + "name": "status" + } + } + }, + { + "$id": "274", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "276", + "json": { + "$id": "277", + "name": "name" + } + } + }, + { + "$id": "278", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "279", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "280", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", + "serializationOptions": { + "$id": "281", + "json": { + "$id": "282", + "name": "startTime" + } + } + }, + { + "$id": "283", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "284", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", + "serializationOptions": { + "$id": "286", + "json": { + "$id": "287", + "name": "endTime" + } + } + }, + { + "$id": "288", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "289", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "290", + "json": { + "$id": "291", + "name": "percentComplete" + } + } + }, + { + "$id": "292", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "121" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "293", + "json": { + "$id": "294", + "name": "error" + } + } + } + ] + }, + { + "$id": "295", + "kind": "model", + "name": "TrafficControllerListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a TrafficController list operation.", + "decorators": [], + "properties": [ + { + "$id": "296", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The TrafficController items on this page", + "type": { + "$id": "297", + "kind": "array", + "name": "ArrayTrafficController", + "valueType": { + "$ref": "153" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "298", + "json": { + "$id": "299", + "name": "value" + } + } + }, + { + "$id": "300", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "301", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "302", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "303", + "json": { + "$id": "304", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "305", + "kind": "model", + "name": "ApplicationGatewayForContainersSecurityPolicy", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicy", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "SecurityPolicy Subresource of Traffic Controller.", + "decorators": [], + "baseModel": { + "$ref": "154" + }, + "properties": [ + { + "$id": "306", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "307", + "kind": "model", + "name": "SecurityPolicyProperties", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "SecurityPolicy Properties.", + "decorators": [], + "properties": [ + { + "$id": "308", + "kind": "property", + "name": "policyType", + "serializedName": "policyType", + "doc": "Type of the Traffic Controller Security Policy", + "type": { + "$ref": "48" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyProperties.policyType", + "serializationOptions": { + "$id": "309", + "json": { + "$id": "310", + "name": "policyType" + } + } + }, + { + "$id": "311", + "kind": "property", + "name": "wafPolicy", + "serializedName": "wafPolicy", + "doc": "Web Application Firewall Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set.", + "type": { + "$id": "312", + "kind": "model", + "name": "WafPolicy", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.WafPolicy", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Web Application Firewall Policy", + "decorators": [], + "properties": [ + { + "$id": "313", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource ID of the WAF", + "type": { + "$id": "314", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.WafPolicy.id", + "serializationOptions": { + "$id": "315", + "json": { + "$id": "316", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyProperties.wafPolicy", + "serializationOptions": { + "$id": "317", + "json": { + "$id": "318", + "name": "wafPolicy" + } + } + }, + { + "$id": "319", + "kind": "property", + "name": "ipAccessRulesPolicy", + "serializedName": "ipAccessRulesPolicy", + "doc": "Ip Access Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set.", + "type": { + "$id": "320", + "kind": "model", + "name": "IpAccessRulesPolicy", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRulesPolicy", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Ip Access Policy", + "decorators": [], + "properties": [ + { + "$id": "321", + "kind": "property", + "name": "rules", + "serializedName": "rules", + "doc": "Ip Access Policy Rules List", + "type": { + "$id": "322", + "kind": "array", + "name": "ArrayIpAccessRule", + "valueType": { + "$id": "323", + "kind": "model", + "name": "IpAccessRule", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRule", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Ip Access Policy Rules", + "decorators": [], + "properties": [ + { + "$id": "324", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the Ip Access Rule", + "type": { + "$id": "325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRule.name", + "serializationOptions": { + "$id": "326", + "json": { + "$id": "327", + "name": "name" + } + } + }, + { + "$id": "328", + "kind": "property", + "name": "priority", + "serializedName": "priority", + "doc": "The priority of the rule. The value can be between 1 and 500. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.", + "type": { + "$id": "329", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRule.priority", + "serializationOptions": { + "$id": "330", + "json": { + "$id": "331", + "name": "priority" + } + } + }, + { + "$id": "332", + "kind": "property", + "name": "sourceAddressPrefixes", + "serializedName": "sourceAddressPrefixes", + "doc": "Source Address Prefixed Applied by the Rule. Asterisk '*' can also be used to match all source IPs.", + "type": { + "$id": "333", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "334", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRule.sourceAddressPrefixes", + "serializationOptions": { + "$id": "335", + "json": { + "$id": "336", + "name": "sourceAddressPrefixes" + } + } + }, + { + "$id": "337", + "kind": "property", + "name": "action", + "serializedName": "action", + "doc": "Action of the Rule", + "type": { + "$ref": "54" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRule.action", + "serializationOptions": { + "$id": "338", + "json": { + "$id": "339", + "name": "action" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.IpAccessRulesPolicy.rules", + "serializationOptions": { + "$id": "340", + "json": { + "$id": "341", + "name": "rules" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyProperties.ipAccessRulesPolicy", + "serializationOptions": { + "$id": "342", + "json": { + "$id": "343", + "name": "ipAccessRulesPolicy" + } + } + }, + { + "$id": "344", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning State of Traffic Controller SecurityPolicy Resource", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicyProperties.provisioningState", + "serializationOptions": { + "$id": "345", + "json": { + "$id": "346", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPolicy.properties", + "serializationOptions": { + "$id": "347", + "json": { + "$id": "348", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "307" + }, + { + "$ref": "312" + }, + { + "$ref": "320" + }, + { + "$ref": "323" + }, + { + "$id": "349", + "kind": "model", + "name": "SecurityPolicyUpdate", + "namespace": "Azure.ResourceManager.Foundations", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the SecurityPolicy.", + "decorators": [], + "properties": [ + { + "$id": "350", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "351", + "kind": "dict", + "keyType": { + "$id": "352", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "353", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.tags", + "serializationOptions": { + "$id": "354", + "json": { + "$id": "355", + "name": "tags" + } + } + }, + { + "$id": "356", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "357", + "kind": "model", + "name": "SecurityPolicyUpdateProperties", + "namespace": "Azure.ResourceManager.Foundations", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the SecurityPolicy.", + "decorators": [], + "properties": [ + { + "$id": "358", + "kind": "property", + "name": "wafPolicy", + "serializedName": "wafPolicy", + "doc": "Web Application Firewall Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set.", + "type": { + "$ref": "312" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.wafPolicy", + "serializationOptions": { + "$id": "359", + "json": { + "$id": "360", + "name": "wafPolicy" + } + } + }, + { + "$id": "361", + "kind": "property", + "name": "ipAccessRulesPolicy", + "serializedName": "ipAccessRulesPolicy", + "doc": "Ip Access Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set.", + "type": { + "$ref": "320" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.ipAccessRulesPolicy", + "serializationOptions": { + "$id": "362", + "json": { + "$id": "363", + "name": "ipAccessRulesPolicy" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "364", + "json": { + "$id": "365", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "357" + }, + { + "$id": "366", + "kind": "model", + "name": "SecurityPolicyListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a SecurityPolicy list operation.", + "decorators": [], + "properties": [ + { + "$id": "367", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The SecurityPolicy items on this page", + "type": { + "$id": "368", + "kind": "array", + "name": "ArraySecurityPolicy", + "valueType": { + "$ref": "305" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "369", + "json": { + "$id": "370", + "name": "value" + } + } + }, + { + "$id": "371", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "372", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "373", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "374", + "json": { + "$id": "375", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "376", + "kind": "model", + "name": "TrafficControllerFrontend", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.Frontend", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Frontend Sub Resource of Traffic Controller.", + "decorators": [], + "baseModel": { + "$ref": "154" + }, + "properties": [ + { + "$id": "377", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "378", + "kind": "model", + "name": "FrontendProperties", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Frontend Properties.", + "decorators": [], + "properties": [ + { + "$id": "379", + "kind": "property", + "name": "fqdn", + "serializedName": "fqdn", + "doc": "The Fully Qualified Domain Name of the DNS record associated to a Traffic Controller frontend.", + "type": { + "$id": "380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendProperties.fqdn", + "serializationOptions": { + "$id": "381", + "json": { + "$id": "382", + "name": "fqdn" + } + } + }, + { + "$id": "383", + "kind": "property", + "name": "securityPolicyConfigurations", + "serializedName": "securityPolicyConfigurations", + "doc": "Frontend Security Policy Configuration", + "type": { + "$ref": "232" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendProperties.securityPolicyConfigurations", + "serializationOptions": { + "$id": "384", + "json": { + "$id": "385", + "name": "securityPolicyConfigurations" + } + } + }, + { + "$id": "386", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning State of Traffic Controller Frontend Resource", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendProperties.provisioningState", + "serializationOptions": { + "$id": "387", + "json": { + "$id": "388", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.Frontend.properties", + "serializationOptions": { + "$id": "389", + "json": { + "$id": "390", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "378" + }, + { + "$id": "391", + "kind": "model", + "name": "FrontendUpdate", + "namespace": "Azure.ResourceManager.Foundations", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the Frontend.", + "decorators": [], + "properties": [ + { + "$id": "392", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "393", + "kind": "dict", + "keyType": { + "$id": "394", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.tags", + "serializationOptions": { + "$id": "396", + "json": { + "$id": "397", + "name": "tags" + } + } + }, + { + "$id": "398", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "399", + "kind": "model", + "name": "FrontendUpdateProperties", + "namespace": "Azure.ResourceManager.Foundations", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the Frontend.", + "decorators": [], + "properties": [ + { + "$id": "400", + "kind": "property", + "name": "securityPolicyConfigurations", + "serializedName": "securityPolicyConfigurations", + "doc": "Frontend Security Policy Configuration", + "type": { + "$ref": "232" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.securityPolicyConfigurations", + "serializationOptions": { + "$id": "401", + "json": { + "$id": "402", + "name": "securityPolicyConfigurations" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "403", + "json": { + "$id": "404", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "399" + }, + { + "$id": "405", + "kind": "model", + "name": "FrontendListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a Frontend list operation.", + "decorators": [], + "properties": [ + { + "$id": "406", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Frontend items on this page", + "type": { + "$id": "407", + "kind": "array", + "name": "ArrayFrontend", + "valueType": { + "$ref": "376" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "408", + "json": { + "$id": "409", + "name": "value" + } + } + }, + { + "$id": "410", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "411", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "412", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "413", + "json": { + "$id": "414", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "415", + "kind": "model", + "name": "TrafficControllerAssociation", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.Association", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Association Subresource of Traffic Controller", + "decorators": [], + "baseModel": { + "$ref": "154" + }, + "properties": [ + { + "$id": "416", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "417", + "kind": "model", + "name": "AssociationProperties", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Association Properties.", + "decorators": [], + "properties": [ + { + "$id": "418", + "kind": "property", + "name": "associationType", + "serializedName": "associationType", + "doc": "Association Type", + "type": { + "$ref": "60" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationProperties.associationType", + "serializationOptions": { + "$id": "419", + "json": { + "$id": "420", + "name": "associationType" + } + } + }, + { + "$id": "421", + "kind": "property", + "name": "subnet", + "serializedName": "subnet", + "doc": "Association Subnet", + "type": { + "$id": "422", + "kind": "model", + "name": "AssociationSubnet", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationSubnet", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Association Subnet.", + "decorators": [], + "properties": [ + { + "$id": "423", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Association ID.", + "type": { + "$id": "424", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationSubnet.id", + "serializationOptions": { + "$id": "425", + "json": { + "$id": "426", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationProperties.subnet", + "serializationOptions": { + "$id": "427", + "json": { + "$id": "428", + "name": "subnet" + } + } + }, + { + "$id": "429", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning State of Traffic Controller Association Resource", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationProperties.provisioningState", + "serializationOptions": { + "$id": "430", + "json": { + "$id": "431", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.Association.properties", + "serializationOptions": { + "$id": "432", + "json": { + "$id": "433", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "417" + }, + { + "$ref": "422" + }, + { + "$id": "434", + "kind": "model", + "name": "TrafficControllerAssociationUpdate", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationUpdate", + "usage": "Input,Json", + "doc": "The type used for update operations of the Association.", + "decorators": [], + "properties": [ + { + "$id": "435", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "436", + "kind": "dict", + "keyType": { + "$id": "437", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "438", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationUpdate.tags", + "serializationOptions": { + "$id": "439", + "json": { + "$id": "440", + "name": "tags" + } + } + }, + { + "$id": "441", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "442", + "kind": "model", + "name": "AssociationUpdateProperties", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationUpdateProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the Association.", + "decorators": [], + "properties": [ + { + "$id": "443", + "kind": "property", + "name": "associationType", + "serializedName": "associationType", + "doc": "Association Type", + "type": { + "$ref": "60" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationUpdateProperties.associationType", + "serializationOptions": { + "$id": "444", + "json": { + "$id": "445", + "name": "associationType" + } + } + }, + { + "$id": "446", + "kind": "property", + "name": "subnet", + "serializedName": "subnet", + "doc": "Association Subnet", + "type": { + "$id": "447", + "kind": "model", + "name": "AssociationSubnetUpdate", + "namespace": "Microsoft.ServiceNetworking", + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationSubnetUpdate", + "usage": "Input,Json", + "doc": "Association Subnet.", + "decorators": [], + "properties": [ + { + "$id": "448", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Association ID.", + "type": { + "$id": "449", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationSubnetUpdate.id", + "serializationOptions": { + "$id": "450", + "json": { + "$id": "451", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationUpdateProperties.subnet", + "serializationOptions": { + "$id": "452", + "json": { + "$id": "453", + "name": "subnet" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationUpdate.properties", + "serializationOptions": { + "$id": "454", + "json": { + "$id": "455", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "442" + }, + { + "$ref": "447" + }, + { + "$id": "456", + "kind": "model", + "name": "AssociationListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a Association list operation.", + "decorators": [], + "properties": [ + { + "$id": "457", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Association items on this page", + "type": { + "$id": "458", + "kind": "array", + "name": "ArrayAssociation", + "valueType": { + "$ref": "415" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "459", + "json": { + "$id": "460", + "name": "value" + } + } + }, + { + "$id": "461", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "462", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "463", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "464", + "json": { + "$id": "465", + "name": "nextLink" + } + } + } + ] + } + ], + "Clients": [ + { + "$id": "466", + "Name": "ServiceNetworkingClient", + "Namespace": "Microsoft.ServiceNetworking", + "Doc": "Traffic Controller Provider management API.", + "Operations": [], + "Protocol": { + "$id": "467" + }, + "Parameters": [ + { + "$id": "468", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "469", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "470", + "Type": { + "$id": "471", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking" + }, + { + "$id": "472", + "Name": "AssociationsInterface", + "Namespace": "Microsoft.ServiceNetworking", + "Operations": [ + { + "$id": "473", + "Name": "get", + "ResourceName": "Association", + "Doc": "Get a Association", + "Accessibility": "public", + "Parameters": [ + { + "$id": "474", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "476", + "Type": { + "$id": "477", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "478", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "479", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "480", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "481", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "482", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "484", + "Name": "associationName", + "NameInRequest": "associationName", + "Doc": "Name of Association", + "Type": { + "$id": "485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "486", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "487", + "kind": "constant", + "valueType": { + "$id": "488", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "489", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "415" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationsInterface.get", + "Decorators": [], + "Examples": [ + { + "$id": "490", + "kind": "http", + "name": "Get Association", + "description": "Get Association", + "filePath": "2025-03-01-preview/AssociationGet.json", + "parameters": [ + { + "$id": "491", + "parameter": { + "$ref": "474" + }, + "value": { + "$id": "492", + "kind": "string", + "type": { + "$ref": "475" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "493", + "parameter": { + "$ref": "478" + }, + "value": { + "$id": "494", + "kind": "string", + "type": { + "$ref": "479" + }, + "value": "subid" + } + }, + { + "$id": "495", + "parameter": { + "$ref": "480" + }, + "value": { + "$id": "496", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "rg1" + } + }, + { + "$id": "497", + "parameter": { + "$ref": "482" + }, + "value": { + "$id": "498", + "kind": "string", + "type": { + "$ref": "483" + }, + "value": "tc1" + } + }, + { + "$id": "499", + "parameter": { + "$ref": "484" + }, + "value": { + "$id": "500", + "kind": "string", + "type": { + "$ref": "485" + }, + "value": "as1" + } + } + ], + "responses": [ + { + "$id": "501", + "response": { + "$ref": "489" + }, + "statusCode": 200, + "bodyValue": { + "$id": "502", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "503", + "name": { + "$id": "504", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "as1" + }, + "type": { + "$id": "505", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/associations" + }, + "id": { + "$id": "506", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1" + }, + "location": { + "$id": "507", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "508", + "kind": "model", + "type": { + "$ref": "417" + }, + "value": { + "$id": "509", + "associationType": { + "$id": "510", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "subnets" + }, + "subnet": { + "$id": "511", + "kind": "model", + "type": { + "$ref": "422" + }, + "value": { + "$id": "512", + "id": { + "$id": "513", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + }, + "provisioningState": { + "$id": "514", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "515", + "Name": "createOrUpdate", + "ResourceName": "Association", + "Doc": "Create a Association", + "Accessibility": "public", + "Parameters": [ + { + "$id": "516", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "517", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "518", + "Type": { + "$id": "519", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "520", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "521", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "522", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "523", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "524", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "525", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "526", + "Name": "associationName", + "NameInRequest": "associationName", + "Doc": "Name of Association", + "Type": { + "$id": "527", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "528", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "529", + "kind": "constant", + "valueType": { + "$id": "530", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "531", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "532", + "kind": "constant", + "valueType": { + "$id": "533", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "534", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "415" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "535", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "415" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "536", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "415" + }, + "Headers": [ + { + "$id": "537", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "538", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "539", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "540", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "415" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationsInterface.createOrUpdate", + "Decorators": [ + { + "$id": "541", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "542", + "finalState": "azure-async-operation" + } + } + ], + "Examples": [ + { + "$id": "543", + "kind": "http", + "name": "Put Association", + "description": "Put Association", + "filePath": "2025-03-01-preview/AssociationPut.json", + "parameters": [ + { + "$id": "544", + "parameter": { + "$ref": "516" + }, + "value": { + "$id": "545", + "kind": "string", + "type": { + "$ref": "517" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "546", + "parameter": { + "$ref": "520" + }, + "value": { + "$id": "547", + "kind": "string", + "type": { + "$ref": "521" + }, + "value": "subid" + } + }, + { + "$id": "548", + "parameter": { + "$ref": "522" + }, + "value": { + "$id": "549", + "kind": "string", + "type": { + "$ref": "523" + }, + "value": "rg1" + } + }, + { + "$id": "550", + "parameter": { + "$ref": "524" + }, + "value": { + "$id": "551", + "kind": "string", + "type": { + "$ref": "525" + }, + "value": "tc1" + } + }, + { + "$id": "552", + "parameter": { + "$ref": "526" + }, + "value": { + "$id": "553", + "kind": "string", + "type": { + "$ref": "527" + }, + "value": "as1" + } + }, + { + "$id": "554", + "parameter": { + "$ref": "534" + }, + "value": { + "$id": "555", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "556", + "location": { + "$id": "557", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "558", + "kind": "model", + "type": { + "$ref": "417" + }, + "value": { + "$id": "559", + "associationType": { + "$id": "560", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "subnets" + }, + "subnet": { + "$id": "561", + "kind": "model", + "type": { + "$ref": "422" + }, + "value": { + "$id": "562", + "id": { + "$id": "563", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "564", + "response": { + "$ref": "535" + }, + "statusCode": 200, + "bodyValue": { + "$id": "565", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "566", + "name": { + "$id": "567", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "associatedvnet-1" + }, + "type": { + "$id": "568", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/associations" + }, + "id": { + "$id": "569", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1" + }, + "location": { + "$id": "570", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "571", + "kind": "model", + "type": { + "$ref": "417" + }, + "value": { + "$id": "572", + "associationType": { + "$id": "573", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "subnets" + }, + "subnet": { + "$id": "574", + "kind": "model", + "type": { + "$ref": "422" + }, + "value": { + "$id": "575", + "id": { + "$id": "576", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + }, + "provisioningState": { + "$id": "577", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Accepted" + } + } + } + } + } + }, + { + "$id": "578", + "response": { + "$ref": "536" + }, + "statusCode": 201, + "bodyValue": { + "$id": "579", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "580", + "name": { + "$id": "581", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "associatedvnet-1" + }, + "type": { + "$id": "582", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/associations" + }, + "id": { + "$id": "583", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1" + }, + "location": { + "$id": "584", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "585", + "kind": "model", + "type": { + "$ref": "417" + }, + "value": { + "$id": "586", + "associationType": { + "$id": "587", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "subnets" + }, + "subnet": { + "$id": "588", + "kind": "model", + "type": { + "$ref": "422" + }, + "value": { + "$id": "589", + "id": { + "$id": "590", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "591", + "Name": "update", + "ResourceName": "Association", + "Doc": "Update a Association", + "Accessibility": "public", + "Parameters": [ + { + "$id": "592", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "594", + "Type": { + "$id": "595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "596", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "598", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "600", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "601", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "602", + "Name": "associationName", + "NameInRequest": "associationName", + "Doc": "Name of Association", + "Type": { + "$id": "603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "604", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "605", + "kind": "constant", + "valueType": { + "$id": "606", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "607", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "608", + "kind": "constant", + "valueType": { + "$id": "609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "610", + "Name": "properties", + "NameInRequest": "properties", + "Doc": "The resource properties to be updated.", + "Type": { + "$ref": "434" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "611", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "415" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationsInterface.update", + "Decorators": [], + "Examples": [ + { + "$id": "612", + "kind": "http", + "name": "Update Association", + "description": "Update Association", + "filePath": "2025-03-01-preview/AssociationPatch.json", + "parameters": [ + { + "$id": "613", + "parameter": { + "$ref": "592" + }, + "value": { + "$id": "614", + "kind": "string", + "type": { + "$ref": "593" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "615", + "parameter": { + "$ref": "596" + }, + "value": { + "$id": "616", + "kind": "string", + "type": { + "$ref": "597" + }, + "value": "subid" + } + }, + { + "$id": "617", + "parameter": { + "$ref": "598" + }, + "value": { + "$id": "618", + "kind": "string", + "type": { + "$ref": "599" + }, + "value": "rg1" + } + }, + { + "$id": "619", + "parameter": { + "$ref": "600" + }, + "value": { + "$id": "620", + "kind": "string", + "type": { + "$ref": "601" + }, + "value": "tc1" + } + }, + { + "$id": "621", + "parameter": { + "$ref": "602" + }, + "value": { + "$id": "622", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "as1" + } + }, + { + "$id": "623", + "parameter": { + "$ref": "610" + }, + "value": { + "$id": "624", + "kind": "model", + "type": { + "$ref": "434" + }, + "value": { + "$id": "625", + "properties": { + "$id": "626", + "kind": "model", + "type": { + "$ref": "442" + }, + "value": { + "$id": "627", + "associationType": { + "$id": "628", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "subnets" + }, + "subnet": { + "$id": "629", + "kind": "model", + "type": { + "$ref": "447" + }, + "value": { + "$id": "630", + "id": { + "$id": "631", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "632", + "response": { + "$ref": "611" + }, + "statusCode": 200, + "bodyValue": { + "$id": "633", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "634", + "name": { + "$id": "635", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "as1" + }, + "type": { + "$id": "636", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/associations" + }, + "id": { + "$id": "637", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1" + }, + "location": { + "$id": "638", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "639", + "kind": "model", + "type": { + "$ref": "417" + }, + "value": { + "$id": "640", + "associationType": { + "$id": "641", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "subnets" + }, + "subnet": { + "$id": "642", + "kind": "model", + "type": { + "$ref": "422" + }, + "value": { + "$id": "643", + "id": { + "$id": "644", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "645", + "Name": "delete", + "ResourceName": "Association", + "Doc": "Delete a Association", + "Accessibility": "public", + "Parameters": [ + { + "$id": "646", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "647", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "648", + "Type": { + "$id": "649", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "650", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "652", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "654", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "656", + "Name": "associationName", + "NameInRequest": "associationName", + "Doc": "Name of Association", + "Type": { + "$id": "657", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "658", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "659", + "kind": "constant", + "valueType": { + "$id": "660", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "661", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "662", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "663", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "664", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "665", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "666", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}", + "BufferResponse": true, + "LongRunning": { + "$id": "667", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "668", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationsInterface.delete", + "Decorators": [], + "Examples": [ + { + "$id": "669", + "kind": "http", + "name": "Delete Association", + "description": "Delete Association", + "filePath": "2025-03-01-preview/AssociationDelete.json", + "parameters": [ + { + "$id": "670", + "parameter": { + "$ref": "646" + }, + "value": { + "$id": "671", + "kind": "string", + "type": { + "$ref": "647" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "672", + "parameter": { + "$ref": "650" + }, + "value": { + "$id": "673", + "kind": "string", + "type": { + "$ref": "651" + }, + "value": "subid" + } + }, + { + "$id": "674", + "parameter": { + "$ref": "652" + }, + "value": { + "$id": "675", + "kind": "string", + "type": { + "$ref": "653" + }, + "value": "rg1" + } + }, + { + "$id": "676", + "parameter": { + "$ref": "654" + }, + "value": { + "$id": "677", + "kind": "string", + "type": { + "$ref": "655" + }, + "value": "tc1" + } + }, + { + "$id": "678", + "parameter": { + "$ref": "656" + }, + "value": { + "$id": "679", + "kind": "string", + "type": { + "$ref": "657" + }, + "value": "as1" + } + } + ], + "responses": [ + { + "$id": "680", + "response": { + "$ref": "661" + }, + "statusCode": 202 + }, + { + "$id": "681", + "response": { + "$ref": "666" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "682", + "Name": "listByTrafficController", + "ResourceName": "Association", + "Doc": "List Association resources by TrafficController", + "Accessibility": "public", + "Parameters": [ + { + "$id": "683", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "684", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "685", + "Type": { + "$id": "686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "687", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "688", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "689", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "690", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "691", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "692", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "693", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "694", + "kind": "constant", + "valueType": { + "$id": "695", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "696", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "456" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations", + "BufferResponse": true, + "Paging": { + "$id": "697", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "698", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationsInterface.listByTrafficController", + "Decorators": [], + "Examples": [ + { + "$id": "699", + "kind": "http", + "name": "Get Associations", + "description": "Get Associations", + "filePath": "2025-03-01-preview/AssociationsGet.json", + "parameters": [ + { + "$id": "700", + "parameter": { + "$ref": "683" + }, + "value": { + "$id": "701", + "kind": "string", + "type": { + "$ref": "684" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "702", + "parameter": { + "$ref": "687" + }, + "value": { + "$id": "703", + "kind": "string", + "type": { + "$ref": "688" + }, + "value": "subid" + } + }, + { + "$id": "704", + "parameter": { + "$ref": "689" + }, + "value": { + "$id": "705", + "kind": "string", + "type": { + "$ref": "690" + }, + "value": "rg1" + } + }, + { + "$id": "706", + "parameter": { + "$ref": "691" + }, + "value": { + "$id": "707", + "kind": "string", + "type": { + "$ref": "692" + }, + "value": "tc1" + } + } + ], + "responses": [ + { + "$id": "708", + "response": { + "$ref": "696" + }, + "statusCode": 200, + "bodyValue": { + "$id": "709", + "kind": "model", + "type": { + "$ref": "456" + }, + "value": { + "$id": "710", + "value": { + "$id": "711", + "kind": "array", + "type": { + "$ref": "458" + }, + "value": [ + { + "$id": "712", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "713", + "name": { + "$id": "714", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "as1" + }, + "type": { + "$id": "715", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/associations" + }, + "id": { + "$id": "716", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1" + }, + "location": { + "$id": "717", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "718", + "kind": "model", + "type": { + "$ref": "417" + }, + "value": { + "$id": "719", + "associationType": { + "$id": "720", + "kind": "string", + "type": { + "$ref": "60" + }, + "value": "subnets" + }, + "subnet": { + "$id": "721", + "kind": "model", + "type": { + "$ref": "422" + }, + "value": { + "$id": "722", + "id": { + "$id": "723", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + }, + "provisioningState": { + "$id": "724", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "725" + }, + "Parent": "ServiceNetworkingClient", + "Parameters": [ + { + "$id": "726", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "727", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "728", + "Type": { + "$id": "729", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.AssociationsInterface" + }, + { + "$id": "730", + "Name": "FrontendsInterface", + "Namespace": "Microsoft.ServiceNetworking", + "Operations": [ + { + "$id": "731", + "Name": "get", + "ResourceName": "Frontend", + "Doc": "Get a Frontend", + "Accessibility": "public", + "Parameters": [ + { + "$id": "732", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "733", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "734", + "Type": { + "$id": "735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "736", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "738", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "740", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "742", + "Name": "frontendName", + "NameInRequest": "frontendName", + "Doc": "Frontends", + "Type": { + "$id": "743", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "744", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "745", + "kind": "constant", + "valueType": { + "$id": "746", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "747", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "376" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendsInterface.get", + "Decorators": [], + "Examples": [ + { + "$id": "748", + "kind": "http", + "name": "Get Frontend", + "description": "Get Frontend", + "filePath": "2025-03-01-preview/FrontendGet.json", + "parameters": [ + { + "$id": "749", + "parameter": { + "$ref": "732" + }, + "value": { + "$id": "750", + "kind": "string", + "type": { + "$ref": "733" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "751", + "parameter": { + "$ref": "736" + }, + "value": { + "$id": "752", + "kind": "string", + "type": { + "$ref": "737" + }, + "value": "subid" + } + }, + { + "$id": "753", + "parameter": { + "$ref": "738" + }, + "value": { + "$id": "754", + "kind": "string", + "type": { + "$ref": "739" + }, + "value": "rg1" + } + }, + { + "$id": "755", + "parameter": { + "$ref": "740" + }, + "value": { + "$id": "756", + "kind": "string", + "type": { + "$ref": "741" + }, + "value": "tc1" + } + }, + { + "$id": "757", + "parameter": { + "$ref": "742" + }, + "value": { + "$id": "758", + "kind": "string", + "type": { + "$ref": "743" + }, + "value": "fe1" + } + } + ], + "responses": [ + { + "$id": "759", + "response": { + "$ref": "747" + }, + "statusCode": 200, + "bodyValue": { + "$id": "760", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "761", + "name": { + "$id": "762", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "fe1" + }, + "location": { + "$id": "763", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "type": { + "$id": "764", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/frontends" + }, + "id": { + "$id": "765", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + }, + "properties": { + "$id": "766", + "kind": "model", + "type": { + "$ref": "378" + }, + "value": { + "$id": "767", + "fqdn": { + "$id": "768", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "test.net" + }, + "securityPolicyConfigurations": { + "$id": "769", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "$id": "770", + "ipAccessRulesSecurityPolicy": { + "$id": "771", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "772", + "id": { + "$id": "773", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + } + } + } + } + }, + "provisioningState": { + "$id": "774", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "775", + "Name": "createOrUpdate", + "ResourceName": "Frontend", + "Doc": "Create a Frontend", + "Accessibility": "public", + "Parameters": [ + { + "$id": "776", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "777", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "778", + "Type": { + "$id": "779", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "780", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "781", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "782", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "783", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "784", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "785", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "786", + "Name": "frontendName", + "NameInRequest": "frontendName", + "Doc": "Frontends", + "Type": { + "$id": "787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "788", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "789", + "kind": "constant", + "valueType": { + "$id": "790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "791", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "792", + "kind": "constant", + "valueType": { + "$id": "793", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "794", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "376" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "795", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "376" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "796", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "376" + }, + "Headers": [ + { + "$id": "797", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "798", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "799", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "800", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "376" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendsInterface.createOrUpdate", + "Decorators": [ + { + "$id": "801", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "802", + "finalState": "azure-async-operation" + } + } + ], + "Examples": [ + { + "$id": "803", + "kind": "http", + "name": "Put Frontend", + "description": "Put Frontend", + "filePath": "2025-03-01-preview/FrontendPut.json", + "parameters": [ + { + "$id": "804", + "parameter": { + "$ref": "776" + }, + "value": { + "$id": "805", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "806", + "parameter": { + "$ref": "780" + }, + "value": { + "$id": "807", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "subid" + } + }, + { + "$id": "808", + "parameter": { + "$ref": "782" + }, + "value": { + "$id": "809", + "kind": "string", + "type": { + "$ref": "783" + }, + "value": "rg1" + } + }, + { + "$id": "810", + "parameter": { + "$ref": "784" + }, + "value": { + "$id": "811", + "kind": "string", + "type": { + "$ref": "785" + }, + "value": "tc1" + } + }, + { + "$id": "812", + "parameter": { + "$ref": "786" + }, + "value": { + "$id": "813", + "kind": "string", + "type": { + "$ref": "787" + }, + "value": "fe1" + } + }, + { + "$id": "814", + "parameter": { + "$ref": "794" + }, + "value": { + "$id": "815", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "816", + "location": { + "$id": "817", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "818", + "kind": "model", + "type": { + "$ref": "378" + }, + "value": { + "$id": "819" + } + } + } + } + } + ], + "responses": [ + { + "$id": "820", + "response": { + "$ref": "795" + }, + "statusCode": 200, + "bodyValue": { + "$id": "821", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "822", + "name": { + "$id": "823", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "fe1" + }, + "location": { + "$id": "824", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "type": { + "$id": "825", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/frontends" + }, + "id": { + "$id": "826", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + }, + "properties": { + "$id": "827", + "kind": "model", + "type": { + "$ref": "378" + }, + "value": { + "$id": "828", + "fqdn": { + "$id": "829", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "test.net" + }, + "securityPolicyConfigurations": { + "$id": "830", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "$id": "831", + "ipAccessRulesSecurityPolicy": { + "$id": "832", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "833", + "id": { + "$id": "834", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + } + } + } + } + }, + "provisioningState": { + "$id": "835", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "836", + "response": { + "$ref": "796" + }, + "statusCode": 201, + "bodyValue": { + "$id": "837", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "838", + "name": { + "$id": "839", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "fe1" + }, + "location": { + "$id": "840", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "type": { + "$id": "841", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/frontends" + }, + "id": { + "$id": "842", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + }, + "properties": { + "$id": "843", + "kind": "model", + "type": { + "$ref": "378" + }, + "value": { + "$id": "844", + "fqdn": { + "$id": "845", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "test.net" + }, + "securityPolicyConfigurations": { + "$id": "846", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "$id": "847", + "ipAccessRulesSecurityPolicy": { + "$id": "848", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "849", + "id": { + "$id": "850", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + } + } + } + } + }, + "provisioningState": { + "$id": "851", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "852", + "Name": "update", + "ResourceName": "Frontend", + "Doc": "Update a Frontend", + "Accessibility": "public", + "Parameters": [ + { + "$id": "853", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "854", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "855", + "Type": { + "$id": "856", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "857", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "858", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "859", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "860", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "861", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "862", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "863", + "Name": "frontendName", + "NameInRequest": "frontendName", + "Doc": "Frontends", + "Type": { + "$id": "864", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "865", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "866", + "kind": "constant", + "valueType": { + "$id": "867", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "868", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "869", + "kind": "constant", + "valueType": { + "$id": "870", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "871", + "Name": "properties", + "NameInRequest": "properties", + "Doc": "The resource properties to be updated.", + "Type": { + "$ref": "391" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "872", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "376" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendsInterface.update", + "Decorators": [], + "Examples": [ + { + "$id": "873", + "kind": "http", + "name": "Update Frontend", + "description": "Update Frontend", + "filePath": "2025-03-01-preview/FrontendPatch.json", + "parameters": [ + { + "$id": "874", + "parameter": { + "$ref": "853" + }, + "value": { + "$id": "875", + "kind": "string", + "type": { + "$ref": "854" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "876", + "parameter": { + "$ref": "857" + }, + "value": { + "$id": "877", + "kind": "string", + "type": { + "$ref": "858" + }, + "value": "subid" + } + }, + { + "$id": "878", + "parameter": { + "$ref": "859" + }, + "value": { + "$id": "879", + "kind": "string", + "type": { + "$ref": "860" + }, + "value": "rg1" + } + }, + { + "$id": "880", + "parameter": { + "$ref": "861" + }, + "value": { + "$id": "881", + "kind": "string", + "type": { + "$ref": "862" + }, + "value": "tc1" + } + }, + { + "$id": "882", + "parameter": { + "$ref": "863" + }, + "value": { + "$id": "883", + "kind": "string", + "type": { + "$ref": "864" + }, + "value": "fe1" + } + }, + { + "$id": "884", + "parameter": { + "$ref": "871" + }, + "value": { + "$id": "885", + "kind": "model", + "type": { + "$ref": "391" + }, + "value": { + "$id": "886" + } + } + } + ], + "responses": [ + { + "$id": "887", + "response": { + "$ref": "872" + }, + "statusCode": 200, + "bodyValue": { + "$id": "888", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "889", + "name": { + "$id": "890", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "fe1" + }, + "location": { + "$id": "891", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "type": { + "$id": "892", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/frontends" + }, + "id": { + "$id": "893", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + }, + "properties": { + "$id": "894", + "kind": "model", + "type": { + "$ref": "378" + }, + "value": { + "$id": "895", + "fqdn": { + "$id": "896", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "test.net" + }, + "securityPolicyConfigurations": { + "$id": "897", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "$id": "898", + "ipAccessRulesSecurityPolicy": { + "$id": "899", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "900", + "id": { + "$id": "901", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + } + } + } + } + }, + "provisioningState": { + "$id": "902", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "903", + "Name": "delete", + "ResourceName": "Frontend", + "Doc": "Delete a Frontend", + "Accessibility": "public", + "Parameters": [ + { + "$id": "904", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "905", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "906", + "Type": { + "$id": "907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "908", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "910", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "911", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "912", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "913", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "914", + "Name": "frontendName", + "NameInRequest": "frontendName", + "Doc": "Frontends", + "Type": { + "$id": "915", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "916", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "917", + "kind": "constant", + "valueType": { + "$id": "918", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "919", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "920", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "921", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "922", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "923", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "924", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}", + "BufferResponse": true, + "LongRunning": { + "$id": "925", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "926", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendsInterface.delete", + "Decorators": [], + "Examples": [ + { + "$id": "927", + "kind": "http", + "name": "Delete Frontend", + "description": "Delete Frontend", + "filePath": "2025-03-01-preview/FrontendDelete.json", + "parameters": [ + { + "$id": "928", + "parameter": { + "$ref": "904" + }, + "value": { + "$id": "929", + "kind": "string", + "type": { + "$ref": "905" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "930", + "parameter": { + "$ref": "908" + }, + "value": { + "$id": "931", + "kind": "string", + "type": { + "$ref": "909" + }, + "value": "subid" + } + }, + { + "$id": "932", + "parameter": { + "$ref": "910" + }, + "value": { + "$id": "933", + "kind": "string", + "type": { + "$ref": "911" + }, + "value": "rg1" + } + }, + { + "$id": "934", + "parameter": { + "$ref": "912" + }, + "value": { + "$id": "935", + "kind": "string", + "type": { + "$ref": "913" + }, + "value": "tc1" + } + }, + { + "$id": "936", + "parameter": { + "$ref": "914" + }, + "value": { + "$id": "937", + "kind": "string", + "type": { + "$ref": "915" + }, + "value": "fe1" + } + } + ], + "responses": [ + { + "$id": "938", + "response": { + "$ref": "919" + }, + "statusCode": 202 + }, + { + "$id": "939", + "response": { + "$ref": "924" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "940", + "Name": "listByTrafficController", + "ResourceName": "Frontend", + "Doc": "List Frontend resources by TrafficController", + "Accessibility": "public", + "Parameters": [ + { + "$id": "941", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "942", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "943", + "Type": { + "$id": "944", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "945", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "946", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "947", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "948", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "949", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "950", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "951", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "952", + "kind": "constant", + "valueType": { + "$id": "953", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "954", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "405" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends", + "BufferResponse": true, + "Paging": { + "$id": "955", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "956", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendsInterface.listByTrafficController", + "Decorators": [], + "Examples": [ + { + "$id": "957", + "kind": "http", + "name": "Get Frontends", + "description": "Get Frontends", + "filePath": "2025-03-01-preview/FrontendsGet.json", + "parameters": [ + { + "$id": "958", + "parameter": { + "$ref": "941" + }, + "value": { + "$id": "959", + "kind": "string", + "type": { + "$ref": "942" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "960", + "parameter": { + "$ref": "945" + }, + "value": { + "$id": "961", + "kind": "string", + "type": { + "$ref": "946" + }, + "value": "subid" + } + }, + { + "$id": "962", + "parameter": { + "$ref": "947" + }, + "value": { + "$id": "963", + "kind": "string", + "type": { + "$ref": "948" + }, + "value": "rg1" + } + }, + { + "$id": "964", + "parameter": { + "$ref": "949" + }, + "value": { + "$id": "965", + "kind": "string", + "type": { + "$ref": "950" + }, + "value": "tc1" + } + } + ], + "responses": [ + { + "$id": "966", + "response": { + "$ref": "954" + }, + "statusCode": 200, + "bodyValue": { + "$id": "967", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "968", + "value": { + "$id": "969", + "kind": "array", + "type": { + "$ref": "407" + }, + "value": [ + { + "$id": "970", + "kind": "model", + "type": { + "$ref": "376" + }, + "value": { + "$id": "971", + "name": { + "$id": "972", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "fe1" + }, + "location": { + "$id": "973", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "type": { + "$id": "974", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/frontends" + }, + "id": { + "$id": "975", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + }, + "properties": { + "$id": "976", + "kind": "model", + "type": { + "$ref": "378" + }, + "value": { + "$id": "977", + "fqdn": { + "$id": "978", + "kind": "string", + "type": { + "$ref": "380" + }, + "value": "test.net" + }, + "securityPolicyConfigurations": { + "$id": "979", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "$id": "980", + "ipAccessRulesSecurityPolicy": { + "$id": "981", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "982", + "id": { + "$id": "983", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + } + } + } + } + }, + "provisioningState": { + "$id": "984", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "985" + }, + "Parent": "ServiceNetworkingClient", + "Parameters": [ + { + "$id": "986", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "987", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "988", + "Type": { + "$id": "989", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.FrontendsInterface" + }, + { + "$id": "990", + "Name": "SecurityPoliciesInterface", + "Namespace": "Microsoft.ServiceNetworking", + "Operations": [ + { + "$id": "991", + "Name": "get", + "ResourceName": "SecurityPolicy", + "Doc": "Get a SecurityPolicy", + "Accessibility": "public", + "Parameters": [ + { + "$id": "992", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "994", + "Type": { + "$id": "995", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "996", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "998", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "999", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1000", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "1001", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1002", + "Name": "securityPolicyName", + "NameInRequest": "securityPolicyName", + "Doc": "SecurityPolicy", + "Type": { + "$id": "1003", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1004", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1005", + "kind": "constant", + "valueType": { + "$id": "1006", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1007", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "305" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/securityPolicies/{securityPolicyName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.get", + "Decorators": [], + "Examples": [ + { + "$id": "1008", + "kind": "http", + "name": "Get SecurityPolicy", + "description": "Get SecurityPolicy", + "filePath": "2025-03-01-preview/SecurityPolicyGet.json", + "parameters": [ + { + "$id": "1009", + "parameter": { + "$ref": "992" + }, + "value": { + "$id": "1010", + "kind": "string", + "type": { + "$ref": "993" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1011", + "parameter": { + "$ref": "996" + }, + "value": { + "$id": "1012", + "kind": "string", + "type": { + "$ref": "997" + }, + "value": "subid" + } + }, + { + "$id": "1013", + "parameter": { + "$ref": "998" + }, + "value": { + "$id": "1014", + "kind": "string", + "type": { + "$ref": "999" + }, + "value": "rg1" + } + }, + { + "$id": "1015", + "parameter": { + "$ref": "1000" + }, + "value": { + "$id": "1016", + "kind": "string", + "type": { + "$ref": "1001" + }, + "value": "tc1" + } + }, + { + "$id": "1017", + "parameter": { + "$ref": "1002" + }, + "value": { + "$id": "1018", + "kind": "string", + "type": { + "$ref": "1003" + }, + "value": "sp1" + } + } + ], + "responses": [ + { + "$id": "1019", + "response": { + "$ref": "1007" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1020", + "kind": "model", + "type": { + "$ref": "305" + }, + "value": { + "$id": "1021", + "name": { + "$id": "1022", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "waf-0" + }, + "type": { + "$id": "1023", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1024", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/waf-0" + }, + "location": { + "$id": "1025", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "eastus" + }, + "properties": { + "$id": "1026", + "kind": "model", + "type": { + "$ref": "307" + }, + "value": { + "$id": "1027", + "policyType": { + "$id": "1028", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "waf" + }, + "wafPolicy": { + "$id": "1029", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "1030", + "id": { + "$id": "1031", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0" + } + } + }, + "provisioningState": { + "$id": "1032", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1033", + "Name": "createOrUpdate", + "ResourceName": "SecurityPolicy", + "Doc": "Create a SecurityPolicy", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1034", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1035", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1036", + "Type": { + "$id": "1037", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1038", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1039", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1040", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1041", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1042", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "1043", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1044", + "Name": "securityPolicyName", + "NameInRequest": "securityPolicyName", + "Doc": "SecurityPolicy", + "Type": { + "$id": "1045", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1046", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "1047", + "kind": "constant", + "valueType": { + "$id": "1048", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1049", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1050", + "kind": "constant", + "valueType": { + "$id": "1051", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1052", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "305" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1053", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "305" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "1054", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "305" + }, + "Headers": [ + { + "$id": "1055", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "1056", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/securityPolicies/{securityPolicyName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "1057", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "1058", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "305" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.createOrUpdate", + "Decorators": [ + { + "$id": "1059", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "1060", + "finalState": "azure-async-operation" + } + } + ], + "Examples": [ + { + "$id": "1061", + "kind": "http", + "name": "Put IpAccessRules SecurityPolicy", + "description": "Put IpAccessRules SecurityPolicy", + "filePath": "2025-03-01-preview/IpAccessRulesSecurityPolicyPut.json", + "parameters": [ + { + "$id": "1062", + "parameter": { + "$ref": "1034" + }, + "value": { + "$id": "1063", + "kind": "string", + "type": { + "$ref": "1035" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1064", + "parameter": { + "$ref": "1038" + }, + "value": { + "$id": "1065", + "kind": "string", + "type": { + "$ref": "1039" + }, + "value": "subid" + } + }, + { + "$id": "1066", + "parameter": { + "$ref": "1040" + }, + "value": { + "$id": "1067", + "kind": "string", + "type": { + "$ref": "1041" + }, + "value": "rg1" + } + }, + { + "$id": "1068", + "parameter": { + "$ref": "1042" + }, + "value": { + "$id": "1069", + "kind": "string", + "type": { + "$ref": "1043" + }, + "value": "tc1" + } + }, + { + "$id": "1070", + "parameter": { + "$ref": "1044" + }, + "value": { + "$id": "1071", + "kind": "string", + "type": { + "$ref": "1045" + }, + "value": "sp1" + } + }, + { + "$id": "1072", + "parameter": { + "$ref": "1052" + }, + "value": { + "$id": "1073", + "kind": "model", + "type": { + "$ref": "305" + }, + "value": { + "$id": "1074", + "location": { + "$id": "1075", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "1076", + "kind": "model", + "type": { + "$ref": "307" + }, + "value": { + "$id": "1077", + "ipAccessRulesPolicy": { + "$id": "1078", + "kind": "model", + "type": { + "$ref": "320" + }, + "value": { + "$id": "1079", + "rules": { + "$id": "1080", + "kind": "array", + "type": { + "$ref": "322" + }, + "value": [] + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1081", + "response": { + "$ref": "1053" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1082", + "kind": "model", + "type": { + "$ref": "305" + }, + "value": { + "$id": "1083", + "name": { + "$id": "1084", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "ipAccessRules-0" + }, + "type": { + "$id": "1085", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1086", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + }, + "location": { + "$id": "1087", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "eastus" + }, + "properties": { + "$id": "1088", + "kind": "model", + "type": { + "$ref": "307" + }, + "value": { + "$id": "1089", + "policyType": { + "$id": "1090", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "ipAccessRules" + }, + "ipAccessRulesPolicy": { + "$id": "1091", + "kind": "model", + "type": { + "$ref": "320" + }, + "value": { + "$id": "1092", + "rules": { + "$id": "1093", + "kind": "array", + "type": { + "$ref": "322" + }, + "value": [] + } + } + }, + "provisioningState": { + "$id": "1094", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "1095", + "response": { + "$ref": "1054" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1096", + "kind": "model", + "type": { + "$ref": "305" + }, + "value": { + "$id": "1097", + "name": { + "$id": "1098", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "ipAccessRules-0" + }, + "type": { + "$id": "1099", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1100", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + }, + "location": { + "$id": "1101", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "eastus" + }, + "properties": { + "$id": "1102", + "kind": "model", + "type": { + "$ref": "307" + }, + "value": { + "$id": "1103", + "policyType": { + "$id": "1104", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "ipAccessRules" + }, + "ipAccessRulesPolicy": { + "$id": "1105", + "kind": "model", + "type": { + "$ref": "320" + }, + "value": { + "$id": "1106", + "rules": { + "$id": "1107", + "kind": "array", + "type": { + "$ref": "322" + }, + "value": [] + } + } + }, + "provisioningState": { + "$id": "1108", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + }, + { + "$id": "1109", + "kind": "http", + "name": "Put WAF SecurityPolicy", + "description": "Put WAF SecurityPolicy", + "filePath": "2025-03-01-preview/WafSecurityPolicyPut.json", + "parameters": [ + { + "$id": "1110", + "parameter": { + "$ref": "1034" + }, + "value": { + "$id": "1111", + "kind": "string", + "type": { + "$ref": "1035" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1112", + "parameter": { + "$ref": "1038" + }, + "value": { + "$id": "1113", + "kind": "string", + "type": { + "$ref": "1039" + }, + "value": "subid" + } + }, + { + "$id": "1114", + "parameter": { + "$ref": "1040" + }, + "value": { + "$id": "1115", + "kind": "string", + "type": { + "$ref": "1041" + }, + "value": "rg1" + } + }, + { + "$id": "1116", + "parameter": { + "$ref": "1042" + }, + "value": { + "$id": "1117", + "kind": "string", + "type": { + "$ref": "1043" + }, + "value": "tc1" + } + }, + { + "$id": "1118", + "parameter": { + "$ref": "1044" + }, + "value": { + "$id": "1119", + "kind": "string", + "type": { + "$ref": "1045" + }, + "value": "sp1" + } + }, + { + "$id": "1120", + "parameter": { + "$ref": "1052" + }, + "value": { + "$id": "1121", + "kind": "model", + "type": { + "$ref": "305" + }, + "value": { + "$id": "1122", + "location": { + "$id": "1123", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "properties": { + "$id": "1124", + "kind": "model", + "type": { + "$ref": "307" + }, + "value": { + "$id": "1125", + "wafPolicy": { + "$id": "1126", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "1127", + "id": { + "$id": "1128", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1129", + "response": { + "$ref": "1053" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1130", + "kind": "model", + "type": { + "$ref": "305" + }, + "value": { + "$id": "1131", + "name": { + "$id": "1132", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "waf-0" + }, + "type": { + "$id": "1133", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1134", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/waf-0" + }, + "location": { + "$id": "1135", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "eastus" + }, + "properties": { + "$id": "1136", + "kind": "model", + "type": { + "$ref": "307" + }, + "value": { + "$id": "1137", + "policyType": { + "$id": "1138", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "waf" + }, + "wafPolicy": { + "$id": "1139", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "1140", + "id": { + "$id": "1141", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0" + } + } + }, + "provisioningState": { + "$id": "1142", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "1143", + "response": { + "$ref": "1054" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1144", + "kind": "model", + "type": { + "$ref": "305" + }, + "value": { + "$id": "1145", + "name": { + "$id": "1146", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "waf-0" + }, + "type": { + "$id": "1147", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1148", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/waf-0" + }, + "location": { + "$id": "1149", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "eastus" + }, + "properties": { + "$id": "1150", + "kind": "model", + "type": { + "$ref": "307" + }, + "value": { + "$id": "1151", + "policyType": { + "$id": "1152", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "waf" + }, + "wafPolicy": { + "$id": "1153", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "1154", + "id": { + "$id": "1155", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0" + } + } + }, + "provisioningState": { + "$id": "1156", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1157", + "Name": "update", + "ResourceName": "SecurityPolicy", + "Doc": "Update a SecurityPolicy", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1158", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1160", + "Type": { + "$id": "1161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1162", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1164", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1166", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "1167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1168", + "Name": "securityPolicyName", + "NameInRequest": "securityPolicyName", + "Doc": "SecurityPolicy", + "Type": { + "$id": "1169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1170", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "1171", + "kind": "constant", + "valueType": { + "$id": "1172", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1173", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1174", + "kind": "constant", + "valueType": { + "$id": "1175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1176", + "Name": "properties", + "NameInRequest": "properties", + "Doc": "The resource properties to be updated.", + "Type": { + "$ref": "349" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1177", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "305" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/securityPolicies/{securityPolicyName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.update", + "Decorators": [], + "Examples": [ + { + "$id": "1178", + "kind": "http", + "name": "Update IpAccessRules SecurityPolicy", + "description": "Update IpAccessRules SecurityPolicy", + "filePath": "2025-03-01-preview/IpAccessRulesSecurityPolicyPatch.json", + "parameters": [ + { + "$id": "1179", + "parameter": { + "$ref": "1158" + }, + "value": { + "$id": "1180", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1181", + "parameter": { + "$ref": "1162" + }, + "value": { + "$id": "1182", + "kind": "string", + "type": { + "$ref": "1163" + }, + "value": "subid" + } + }, + { + "$id": "1183", + "parameter": { + "$ref": "1164" + }, + "value": { + "$id": "1184", + "kind": "string", + "type": { + "$ref": "1165" + }, + "value": "rg1" + } + }, + { + "$id": "1185", + "parameter": { + "$ref": "1166" + }, + "value": { + "$id": "1186", + "kind": "string", + "type": { + "$ref": "1167" + }, + "value": "tc1" + } + }, + { + "$id": "1187", + "parameter": { + "$ref": "1168" + }, + "value": { + "$id": "1188", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "sp1" + } + }, + { + "$id": "1189", + "parameter": { + "$ref": "1176" + }, + "value": { + "$id": "1190", + "kind": "model", + "type": { + "$ref": "349" + }, + "value": { + "$id": "1191", + "properties": { + "$id": "1192", + "kind": "model", + "type": { + "$ref": "357" + }, + "value": { + "$id": "1193", + "ipAccessRulesPolicy": { + "$id": "1194", + "kind": "model", + "type": { + "$ref": "320" + }, + "value": { + "$id": "1195", + "rules": { + "$id": "1196", + "kind": "array", + "type": { + "$ref": "322" + }, + "value": [] + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1197", + "response": { + "$ref": "1177" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1198", + "kind": "model", + "type": { + "$ref": "305" + }, + "value": { + "$id": "1199", + "name": { + "$id": "1200", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "ipAccessRules-0" + }, + "type": { + "$id": "1201", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1202", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0" + }, + "location": { + "$id": "1203", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "eastus" + }, + "properties": { + "$id": "1204", + "kind": "model", + "type": { + "$ref": "307" + }, + "value": { + "$id": "1205", + "policyType": { + "$id": "1206", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "ipAccessRules" + }, + "ipAccessRulesPolicy": { + "$id": "1207", + "kind": "model", + "type": { + "$ref": "320" + }, + "value": { + "$id": "1208", + "rules": { + "$id": "1209", + "kind": "array", + "type": { + "$ref": "322" + }, + "value": [] + } + } + }, + "provisioningState": { + "$id": "1210", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + }, + { + "$id": "1211", + "kind": "http", + "name": "Update WAF SecurityPolicy", + "description": "Update WAF SecurityPolicy", + "filePath": "2025-03-01-preview/WafSecurityPolicyPatch.json", + "parameters": [ + { + "$id": "1212", + "parameter": { + "$ref": "1158" + }, + "value": { + "$id": "1213", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1214", + "parameter": { + "$ref": "1162" + }, + "value": { + "$id": "1215", + "kind": "string", + "type": { + "$ref": "1163" + }, + "value": "subid" + } + }, + { + "$id": "1216", + "parameter": { + "$ref": "1164" + }, + "value": { + "$id": "1217", + "kind": "string", + "type": { + "$ref": "1165" + }, + "value": "rg1" + } + }, + { + "$id": "1218", + "parameter": { + "$ref": "1166" + }, + "value": { + "$id": "1219", + "kind": "string", + "type": { + "$ref": "1167" + }, + "value": "tc1" + } + }, + { + "$id": "1220", + "parameter": { + "$ref": "1168" + }, + "value": { + "$id": "1221", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "sp1" + } + }, + { + "$id": "1222", + "parameter": { + "$ref": "1176" + }, + "value": { + "$id": "1223", + "kind": "model", + "type": { + "$ref": "349" + }, + "value": { + "$id": "1224", + "properties": { + "$id": "1225", + "kind": "model", + "type": { + "$ref": "357" + }, + "value": { + "$id": "1226", + "wafPolicy": { + "$id": "1227", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "1228", + "id": { + "$id": "1229", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0" + } + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1230", + "response": { + "$ref": "1177" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1231", + "kind": "model", + "type": { + "$ref": "305" + }, + "value": { + "$id": "1232", + "name": { + "$id": "1233", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "waf-0" + }, + "type": { + "$id": "1234", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1235", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/waf-0" + }, + "location": { + "$id": "1236", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "eastus" + }, + "properties": { + "$id": "1237", + "kind": "model", + "type": { + "$ref": "307" + }, + "value": { + "$id": "1238", + "policyType": { + "$id": "1239", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "waf" + }, + "wafPolicy": { + "$id": "1240", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "1241", + "id": { + "$id": "1242", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0" + } + } + }, + "provisioningState": { + "$id": "1243", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1244", + "Name": "delete", + "ResourceName": "SecurityPolicy", + "Doc": "Delete a SecurityPolicy", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1245", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1247", + "Type": { + "$id": "1248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1249", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1250", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1251", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1252", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1253", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "1254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1255", + "Name": "securityPolicyName", + "NameInRequest": "securityPolicyName", + "Doc": "SecurityPolicy", + "Type": { + "$id": "1256", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1257", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1258", + "kind": "constant", + "valueType": { + "$id": "1259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1260", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "1261", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "1262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1263", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "1264", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "1265", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/securityPolicies/{securityPolicyName}", + "BufferResponse": true, + "LongRunning": { + "$id": "1266", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "1267", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.delete", + "Decorators": [], + "Examples": [ + { + "$id": "1268", + "kind": "http", + "name": "Delete SecurityPolicy", + "description": "Delete SecurityPolicy", + "filePath": "2025-03-01-preview/SecurityPolicyDelete.json", + "parameters": [ + { + "$id": "1269", + "parameter": { + "$ref": "1245" + }, + "value": { + "$id": "1270", + "kind": "string", + "type": { + "$ref": "1246" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1271", + "parameter": { + "$ref": "1249" + }, + "value": { + "$id": "1272", + "kind": "string", + "type": { + "$ref": "1250" + }, + "value": "subid" + } + }, + { + "$id": "1273", + "parameter": { + "$ref": "1251" + }, + "value": { + "$id": "1274", + "kind": "string", + "type": { + "$ref": "1252" + }, + "value": "rg1" + } + }, + { + "$id": "1275", + "parameter": { + "$ref": "1253" + }, + "value": { + "$id": "1276", + "kind": "string", + "type": { + "$ref": "1254" + }, + "value": "tc1" + } + }, + { + "$id": "1277", + "parameter": { + "$ref": "1255" + }, + "value": { + "$id": "1278", + "kind": "string", + "type": { + "$ref": "1256" + }, + "value": "sp1" + } + } + ], + "responses": [ + { + "$id": "1279", + "response": { + "$ref": "1260" + }, + "statusCode": 202 + }, + { + "$id": "1280", + "response": { + "$ref": "1265" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "1281", + "Name": "listByTrafficController", + "ResourceName": "SecurityPolicy", + "Doc": "List SecurityPolicy resources by TrafficController", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1282", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1284", + "Type": { + "$id": "1285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1286", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1288", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1290", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "1291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1292", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1293", + "kind": "constant", + "valueType": { + "$id": "1294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1295", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "366" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/securityPolicies", + "BufferResponse": true, + "Paging": { + "$id": "1296", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "1297", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPoliciesInterface.listByTrafficController", + "Decorators": [], + "Examples": [ + { + "$id": "1298", + "kind": "http", + "name": "Get SecurityPolicies", + "description": "Get SecurityPolicies", + "filePath": "2025-03-01-preview/SecurityPoliciesGetList.json", + "parameters": [ + { + "$id": "1299", + "parameter": { + "$ref": "1282" + }, + "value": { + "$id": "1300", + "kind": "string", + "type": { + "$ref": "1283" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1301", + "parameter": { + "$ref": "1286" + }, + "value": { + "$id": "1302", + "kind": "string", + "type": { + "$ref": "1287" + }, + "value": "subid" + } + }, + { + "$id": "1303", + "parameter": { + "$ref": "1288" + }, + "value": { + "$id": "1304", + "kind": "string", + "type": { + "$ref": "1289" + }, + "value": "rg1" + } + }, + { + "$id": "1305", + "parameter": { + "$ref": "1290" + }, + "value": { + "$id": "1306", + "kind": "string", + "type": { + "$ref": "1291" + }, + "value": "tc1" + } + } + ], + "responses": [ + { + "$id": "1307", + "response": { + "$ref": "1295" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1308", + "kind": "model", + "type": { + "$ref": "366" + }, + "value": { + "$id": "1309", + "value": { + "$id": "1310", + "kind": "array", + "type": { + "$ref": "368" + }, + "value": [ + { + "$id": "1311", + "kind": "model", + "type": { + "$ref": "305" + }, + "value": { + "$id": "1312", + "name": { + "$id": "1313", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "waf-0" + }, + "type": { + "$id": "1314", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies" + }, + "id": { + "$id": "1315", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/waf-0" + }, + "location": { + "$id": "1316", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "eastus" + }, + "properties": { + "$id": "1317", + "kind": "model", + "type": { + "$ref": "307" + }, + "value": { + "$id": "1318", + "policyType": { + "$id": "1319", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "waf" + }, + "wafPolicy": { + "$id": "1320", + "kind": "model", + "type": { + "$ref": "312" + }, + "value": { + "$id": "1321", + "id": { + "$id": "1322", + "kind": "string", + "type": { + "$ref": "314" + }, + "value": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0" + } + } + }, + "provisioningState": { + "$id": "1323", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "1324" + }, + "Parent": "ServiceNetworkingClient", + "Parameters": [ + { + "$id": "1325", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "1326", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "1327", + "Type": { + "$id": "1328", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.SecurityPoliciesInterface" + }, + { + "$id": "1329", + "Name": "TrafficControllerInterface", + "Namespace": "Microsoft.ServiceNetworking", + "Operations": [ + { + "$id": "1330", + "Name": "get", + "ResourceName": "TrafficController", + "Doc": "Get a TrafficController", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1331", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1332", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1333", + "Type": { + "$id": "1334", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1335", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1336", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1337", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1339", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "1340", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1341", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1342", + "kind": "constant", + "valueType": { + "$id": "1343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1344", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "153" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerInterface.get", + "Decorators": [], + "Examples": [ + { + "$id": "1345", + "kind": "http", + "name": "Get Traffic Controller", + "description": "Get Traffic Controller", + "filePath": "2025-03-01-preview/TrafficControllerGet.json", + "parameters": [ + { + "$id": "1346", + "parameter": { + "$ref": "1331" + }, + "value": { + "$id": "1347", + "kind": "string", + "type": { + "$ref": "1332" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1348", + "parameter": { + "$ref": "1335" + }, + "value": { + "$id": "1349", + "kind": "string", + "type": { + "$ref": "1336" + }, + "value": "subid" + } + }, + { + "$id": "1350", + "parameter": { + "$ref": "1337" + }, + "value": { + "$id": "1351", + "kind": "string", + "type": { + "$ref": "1338" + }, + "value": "rg1" + } + }, + { + "$id": "1352", + "parameter": { + "$ref": "1339" + }, + "value": { + "$id": "1353", + "kind": "string", + "type": { + "$ref": "1340" + }, + "value": "tc1" + } + } + ], + "responses": [ + { + "$id": "1354", + "response": { + "$ref": "1344" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1355", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "1356", + "name": { + "$id": "1357", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "tc1" + }, + "id": { + "$id": "1358", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1" + }, + "type": { + "$id": "1359", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers" + }, + "location": { + "$id": "1360", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "tags": { + "$id": "1361", + "kind": "dict", + "type": { + "$ref": "198" + }, + "value": { + "$id": "1362", + "key1": { + "$id": "1363", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "value1" + } + } + }, + "properties": { + "$id": "1364", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "1365", + "configurationEndpoints": { + "$id": "1366", + "kind": "array", + "type": { + "$ref": "210" + }, + "value": [ + { + "$id": "1367", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "abc.trafficcontroller.azure.net" + } + ] + }, + "frontends": { + "$id": "1368", + "kind": "array", + "type": { + "$ref": "215" + }, + "value": [ + { + "$id": "1369", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1370", + "id": { + "$id": "1371", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + } + } + ] + }, + "associations": { + "$id": "1372", + "kind": "array", + "type": { + "$ref": "224" + }, + "value": [ + { + "$id": "1373", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1374", + "id": { + "$id": "1375", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + } + } + ] + }, + "provisioningState": { + "$id": "1376", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1377", + "Name": "createOrUpdate", + "ResourceName": "TrafficController", + "Doc": "Create a TrafficController", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1378", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1379", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1380", + "Type": { + "$id": "1381", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1382", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1384", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1385", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1386", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "1387", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1388", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "1389", + "kind": "constant", + "valueType": { + "$id": "1390", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1391", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1392", + "kind": "constant", + "valueType": { + "$id": "1393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1394", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "153" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1395", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "153" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "1396", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "153" + }, + "Headers": [ + { + "$id": "1397", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "1398", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "1399", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "1400", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "153" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerInterface.createOrUpdate", + "Decorators": [ + { + "$id": "1401", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "1402", + "finalState": "azure-async-operation" + } + } + ], + "Examples": [ + { + "$id": "1403", + "kind": "http", + "name": "Put Traffic Controller", + "description": "Put Traffic Controller", + "filePath": "2025-03-01-preview/TrafficControllerPut.json", + "parameters": [ + { + "$id": "1404", + "parameter": { + "$ref": "1378" + }, + "value": { + "$id": "1405", + "kind": "string", + "type": { + "$ref": "1379" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1406", + "parameter": { + "$ref": "1382" + }, + "value": { + "$id": "1407", + "kind": "string", + "type": { + "$ref": "1383" + }, + "value": "subid" + } + }, + { + "$id": "1408", + "parameter": { + "$ref": "1384" + }, + "value": { + "$id": "1409", + "kind": "string", + "type": { + "$ref": "1385" + }, + "value": "rg1" + } + }, + { + "$id": "1410", + "parameter": { + "$ref": "1386" + }, + "value": { + "$id": "1411", + "kind": "string", + "type": { + "$ref": "1387" + }, + "value": "tc1" + } + }, + { + "$id": "1412", + "parameter": { + "$ref": "1394" + }, + "value": { + "$id": "1413", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "1414", + "location": { + "$id": "1415", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "tags": { + "$id": "1416", + "kind": "dict", + "type": { + "$ref": "198" + }, + "value": { + "$id": "1417", + "key1": { + "$id": "1418", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "value1" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1419", + "response": { + "$ref": "1395" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1420", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "1421", + "name": { + "$id": "1422", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "tc1" + }, + "id": { + "$id": "1423", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1" + }, + "type": { + "$id": "1424", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers" + }, + "location": { + "$id": "1425", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "tags": { + "$id": "1426", + "kind": "dict", + "type": { + "$ref": "198" + }, + "value": { + "$id": "1427", + "key1": { + "$id": "1428", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "value1" + } + } + }, + "properties": { + "$id": "1429", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "1430", + "configurationEndpoints": { + "$id": "1431", + "kind": "array", + "type": { + "$ref": "210" + }, + "value": [ + { + "$id": "1432", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "abc.trafficcontroller.azure.net" + } + ] + }, + "frontends": { + "$id": "1433", + "kind": "array", + "type": { + "$ref": "215" + }, + "value": [ + { + "$id": "1434", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1435", + "id": { + "$id": "1436", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + } + } + ] + }, + "associations": { + "$id": "1437", + "kind": "array", + "type": { + "$ref": "224" + }, + "value": [ + { + "$id": "1438", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1439", + "id": { + "$id": "1440", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + } + } + ] + }, + "securityPolicies": { + "$id": "1441", + "kind": "array", + "type": { + "$ref": "228" + }, + "value": [ + { + "$id": "1442", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1443", + "id": { + "$id": "1444", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1" + } + } + } + ] + }, + "securityPolicyConfigurations": { + "$id": "1445", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "$id": "1446", + "wafSecurityPolicy": { + "$id": "1447", + "kind": "model", + "type": { + "$ref": "234" + }, + "value": { + "$id": "1448", + "id": { + "$id": "1449", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/waf-0" + } + } + } + } + }, + "provisioningState": { + "$id": "1450", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + }, + { + "$id": "1451", + "response": { + "$ref": "1396" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1452", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "1453", + "name": { + "$id": "1454", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "tc1" + }, + "id": { + "$id": "1455", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1" + }, + "type": { + "$id": "1456", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers" + }, + "location": { + "$id": "1457", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "tags": { + "$id": "1458", + "kind": "dict", + "type": { + "$ref": "198" + }, + "value": { + "$id": "1459", + "key1": { + "$id": "1460", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "value1" + } + } + }, + "properties": { + "$id": "1461", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "1462", + "configurationEndpoints": { + "$id": "1463", + "kind": "array", + "type": { + "$ref": "210" + }, + "value": [ + { + "$id": "1464", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "abc.trafficcontroller.azure.net" + } + ] + }, + "frontends": { + "$id": "1465", + "kind": "array", + "type": { + "$ref": "215" + }, + "value": [ + { + "$id": "1466", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1467", + "id": { + "$id": "1468", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + } + } + ] + }, + "associations": { + "$id": "1469", + "kind": "array", + "type": { + "$ref": "224" + }, + "value": [ + { + "$id": "1470", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1471", + "id": { + "$id": "1472", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + } + } + ] + }, + "securityPolicies": { + "$id": "1473", + "kind": "array", + "type": { + "$ref": "228" + }, + "value": [ + { + "$id": "1474", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1475", + "id": { + "$id": "1476", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1" + } + } + } + ] + }, + "securityPolicyConfigurations": { + "$id": "1477", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "$id": "1478", + "wafSecurityPolicy": { + "$id": "1479", + "kind": "model", + "type": { + "$ref": "234" + }, + "value": { + "$id": "1480", + "id": { + "$id": "1481", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/waf-0" + } + } + } + } + }, + "provisioningState": { + "$id": "1482", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1483", + "Name": "update", + "ResourceName": "TrafficController", + "Doc": "Update a TrafficController", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1484", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1486", + "Type": { + "$id": "1487", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1488", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1489", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1490", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1491", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1492", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "1493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1494", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "1495", + "kind": "constant", + "valueType": { + "$id": "1496", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1497", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1498", + "kind": "constant", + "valueType": { + "$id": "1499", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1500", + "Name": "properties", + "NameInRequest": "properties", + "Doc": "The resource properties to be updated.", + "Type": { + "$ref": "256" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1501", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "153" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerInterface.update", + "Decorators": [], + "Examples": [ + { + "$id": "1502", + "kind": "http", + "name": "Patch Traffic Controller", + "description": "Patch Traffic Controller", + "filePath": "2025-03-01-preview/TrafficControllerPatch.json", + "parameters": [ + { + "$id": "1503", + "parameter": { + "$ref": "1484" + }, + "value": { + "$id": "1504", + "kind": "string", + "type": { + "$ref": "1485" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1505", + "parameter": { + "$ref": "1488" + }, + "value": { + "$id": "1506", + "kind": "string", + "type": { + "$ref": "1489" + }, + "value": "subid" + } + }, + { + "$id": "1507", + "parameter": { + "$ref": "1490" + }, + "value": { + "$id": "1508", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "rg1" + } + }, + { + "$id": "1509", + "parameter": { + "$ref": "1492" + }, + "value": { + "$id": "1510", + "kind": "string", + "type": { + "$ref": "1493" + }, + "value": "tc1" + } + }, + { + "$id": "1511", + "parameter": { + "$ref": "1500" + }, + "value": { + "$id": "1512", + "kind": "model", + "type": { + "$ref": "256" + }, + "value": { + "$id": "1513", + "tags": { + "$id": "1514", + "kind": "dict", + "type": { + "$ref": "258" + }, + "value": { + "$id": "1515", + "key1": { + "$id": "1516", + "kind": "string", + "type": { + "$ref": "260" + }, + "value": "value1" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1517", + "response": { + "$ref": "1501" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1518", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "1519", + "name": { + "$id": "1520", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "tc1" + }, + "id": { + "$id": "1521", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1" + }, + "type": { + "$id": "1522", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers" + }, + "location": { + "$id": "1523", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "tags": { + "$id": "1524", + "kind": "dict", + "type": { + "$ref": "198" + }, + "value": { + "$id": "1525", + "key1": { + "$id": "1526", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "value1" + } + } + }, + "properties": { + "$id": "1527", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "1528", + "configurationEndpoints": { + "$id": "1529", + "kind": "array", + "type": { + "$ref": "210" + }, + "value": [ + { + "$id": "1530", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "abc.trafficcontroller.azure.net" + } + ] + }, + "frontends": { + "$id": "1531", + "kind": "array", + "type": { + "$ref": "215" + }, + "value": [ + { + "$id": "1532", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1533", + "id": { + "$id": "1534", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + } + } + ] + }, + "associations": { + "$id": "1535", + "kind": "array", + "type": { + "$ref": "224" + }, + "value": [ + { + "$id": "1536", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1537", + "id": { + "$id": "1538", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + } + } + ] + }, + "securityPolicies": { + "$id": "1539", + "kind": "array", + "type": { + "$ref": "228" + }, + "value": [ + { + "$id": "1540", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1541", + "id": { + "$id": "1542", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1" + } + } + } + ] + }, + "securityPolicyConfigurations": { + "$id": "1543", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "$id": "1544", + "wafSecurityPolicy": { + "$id": "1545", + "kind": "model", + "type": { + "$ref": "234" + }, + "value": { + "$id": "1546", + "id": { + "$id": "1547", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/waf-0" + } + } + } + } + }, + "provisioningState": { + "$id": "1548", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1549", + "Name": "delete", + "ResourceName": "TrafficController", + "Doc": "Delete a TrafficController", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1550", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1551", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1552", + "Type": { + "$id": "1553", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1554", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1555", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1556", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1557", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1558", + "Name": "trafficControllerName", + "NameInRequest": "trafficControllerName", + "Doc": "traffic controller name for path", + "Type": { + "$id": "1559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1560", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1561", + "kind": "constant", + "valueType": { + "$id": "1562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1563", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "1564", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "1565", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1566", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "1567", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "1568", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}", + "BufferResponse": true, + "LongRunning": { + "$id": "1569", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "1570", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerInterface.delete", + "Decorators": [], + "Examples": [ + { + "$id": "1571", + "kind": "http", + "name": "Delete Traffic Controller", + "description": "Delete Traffic Controller", + "filePath": "2025-03-01-preview/TrafficControllerDelete.json", + "parameters": [ + { + "$id": "1572", + "parameter": { + "$ref": "1550" + }, + "value": { + "$id": "1573", + "kind": "string", + "type": { + "$ref": "1551" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1574", + "parameter": { + "$ref": "1554" + }, + "value": { + "$id": "1575", + "kind": "string", + "type": { + "$ref": "1555" + }, + "value": "subid" + } + }, + { + "$id": "1576", + "parameter": { + "$ref": "1556" + }, + "value": { + "$id": "1577", + "kind": "string", + "type": { + "$ref": "1557" + }, + "value": "rg1" + } + }, + { + "$id": "1578", + "parameter": { + "$ref": "1558" + }, + "value": { + "$id": "1579", + "kind": "string", + "type": { + "$ref": "1559" + }, + "value": "tc1" + } + } + ], + "responses": [ + { + "$id": "1580", + "response": { + "$ref": "1563" + }, + "statusCode": 202 + }, + { + "$id": "1581", + "response": { + "$ref": "1568" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "1582", + "Name": "listByResourceGroup", + "ResourceName": "TrafficController", + "Doc": "List TrafficController resources by resource group", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1583", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1585", + "Type": { + "$id": "1586", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1587", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1588", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1589", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1590", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1591", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1592", + "kind": "constant", + "valueType": { + "$id": "1593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1594", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "295" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers", + "BufferResponse": true, + "Paging": { + "$id": "1595", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "1596", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerInterface.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "1597", + "kind": "http", + "name": "Get Traffic Controllers", + "description": "Get Traffic Controllers", + "filePath": "2025-03-01-preview/TrafficControllersGet.json", + "parameters": [ + { + "$id": "1598", + "parameter": { + "$ref": "1583" + }, + "value": { + "$id": "1599", + "kind": "string", + "type": { + "$ref": "1584" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1600", + "parameter": { + "$ref": "1587" + }, + "value": { + "$id": "1601", + "kind": "string", + "type": { + "$ref": "1588" + }, + "value": "subid" + } + }, + { + "$id": "1602", + "parameter": { + "$ref": "1589" + }, + "value": { + "$id": "1603", + "kind": "string", + "type": { + "$ref": "1590" + }, + "value": "rg1" + } + } + ], + "responses": [ + { + "$id": "1604", + "response": { + "$ref": "1594" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1605", + "kind": "model", + "type": { + "$ref": "295" + }, + "value": { + "$id": "1606", + "value": { + "$id": "1607", + "kind": "array", + "type": { + "$ref": "297" + }, + "value": [ + { + "$id": "1608", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "1609", + "name": { + "$id": "1610", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "tc1" + }, + "id": { + "$id": "1611", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1" + }, + "type": { + "$id": "1612", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers" + }, + "location": { + "$id": "1613", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "tags": { + "$id": "1614", + "kind": "dict", + "type": { + "$ref": "198" + }, + "value": { + "$id": "1615", + "key1": { + "$id": "1616", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "value1" + } + } + }, + "properties": { + "$id": "1617", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "1618", + "configurationEndpoints": { + "$id": "1619", + "kind": "array", + "type": { + "$ref": "210" + }, + "value": [ + { + "$id": "1620", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "abc.trafficcontroller.azure.net" + } + ] + }, + "frontends": { + "$id": "1621", + "kind": "array", + "type": { + "$ref": "215" + }, + "value": [ + { + "$id": "1622", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1623", + "id": { + "$id": "1624", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + } + } + ] + }, + "associations": { + "$id": "1625", + "kind": "array", + "type": { + "$ref": "224" + }, + "value": [ + { + "$id": "1626", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1627", + "id": { + "$id": "1628", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + } + } + ] + }, + "securityPolicies": { + "$id": "1629", + "kind": "array", + "type": { + "$ref": "228" + }, + "value": [ + { + "$id": "1630", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1631", + "id": { + "$id": "1632", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1" + } + } + } + ] + }, + "securityPolicyConfigurations": { + "$id": "1633", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "$id": "1634", + "wafSecurityPolicy": { + "$id": "1635", + "kind": "model", + "type": { + "$ref": "234" + }, + "value": { + "$id": "1636", + "id": { + "$id": "1637", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/waf-0" + } + } + } + } + }, + "provisioningState": { + "$id": "1638", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + { + "$id": "1639", + "Name": "listBySubscription", + "ResourceName": "TrafficController", + "Doc": "List TrafficController resources by subscription ID", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1640", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1642", + "Type": { + "$id": "1643", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1644", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1645", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1646", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1647", + "kind": "constant", + "valueType": { + "$id": "1648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1649", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "295" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceNetworking/trafficControllers", + "BufferResponse": true, + "Paging": { + "$id": "1650", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "1651", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerInterface.listBySubscription", + "Decorators": [], + "Examples": [ + { + "$id": "1652", + "kind": "http", + "name": "Get Traffic Controllers List", + "description": "Get Traffic Controllers List", + "filePath": "2025-03-01-preview/TrafficControllersGetList.json", + "parameters": [ + { + "$id": "1653", + "parameter": { + "$ref": "1640" + }, + "value": { + "$id": "1654", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "1655", + "parameter": { + "$ref": "1644" + }, + "value": { + "$id": "1656", + "kind": "string", + "type": { + "$ref": "1645" + }, + "value": "subid" + } + } + ], + "responses": [ + { + "$id": "1657", + "response": { + "$ref": "1649" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1658", + "kind": "model", + "type": { + "$ref": "295" + }, + "value": { + "$id": "1659", + "value": { + "$id": "1660", + "kind": "array", + "type": { + "$ref": "297" + }, + "value": [ + { + "$id": "1661", + "kind": "model", + "type": { + "$ref": "153" + }, + "value": { + "$id": "1662", + "name": { + "$id": "1663", + "kind": "string", + "type": { + "$ref": "161" + }, + "value": "tc1" + }, + "id": { + "$id": "1664", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1" + }, + "type": { + "$id": "1665", + "kind": "string", + "type": { + "$ref": "165" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers" + }, + "location": { + "$id": "1666", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "NorthCentralUS" + }, + "tags": { + "$id": "1667", + "kind": "dict", + "type": { + "$ref": "198" + }, + "value": { + "$id": "1668", + "key1": { + "$id": "1669", + "kind": "string", + "type": { + "$ref": "200" + }, + "value": "value1" + } + } + }, + "properties": { + "$id": "1670", + "kind": "model", + "type": { + "$ref": "208" + }, + "value": { + "$id": "1671", + "configurationEndpoints": { + "$id": "1672", + "kind": "array", + "type": { + "$ref": "210" + }, + "value": [ + { + "$id": "1673", + "kind": "string", + "type": { + "$ref": "211" + }, + "value": "abc.trafficcontroller.azure.net" + } + ] + }, + "frontends": { + "$id": "1674", + "kind": "array", + "type": { + "$ref": "215" + }, + "value": [ + { + "$id": "1675", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1676", + "id": { + "$id": "1677", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + } + } + ] + }, + "associations": { + "$id": "1678", + "kind": "array", + "type": { + "$ref": "224" + }, + "value": [ + { + "$id": "1679", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1680", + "id": { + "$id": "1681", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + } + } + ] + }, + "securityPolicies": { + "$id": "1682", + "kind": "array", + "type": { + "$ref": "228" + }, + "value": [ + { + "$id": "1683", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "1684", + "id": { + "$id": "1685", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1" + } + } + } + ] + }, + "securityPolicyConfigurations": { + "$id": "1686", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "$id": "1687", + "wafSecurityPolicy": { + "$id": "1688", + "kind": "model", + "type": { + "$ref": "234" + }, + "value": { + "$id": "1689", + "id": { + "$id": "1690", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/waf-0" + } + } + } + } + }, + "provisioningState": { + "$id": "1691", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "1692" + }, + "Parent": "ServiceNetworkingClient", + "Parameters": [ + { + "$id": "1693", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "1694", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "1695", + "Type": { + "$id": "1696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.TrafficControllerInterface" + }, + { + "$id": "1697", + "Name": "Operations", + "Namespace": "Microsoft.ServiceNetworking", + "Operations": [ + { + "$id": "1698", + "Name": "list", + "ResourceName": "Operations", + "Doc": "List the operations for the provider", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1699", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1700", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1701", + "Type": { + "$id": "1702", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01-preview" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1703", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1704", + "kind": "constant", + "valueType": { + "$id": "1705", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1706", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "74" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/providers/Microsoft.ServiceNetworking/operations", + "BufferResponse": true, + "Paging": { + "$id": "1707", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "1708", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "Decorators": [], + "Examples": [ + { + "$id": "1709", + "kind": "http", + "name": "Get Operations List", + "description": "Get Operations List", + "filePath": "2025-03-01-preview/OperationsList.json", + "parameters": [ + { + "$id": "1710", + "parameter": { + "$ref": "1699" + }, + "value": { + "$id": "1711", + "kind": "string", + "type": { + "$ref": "1700" + }, + "value": "2025-03-01-preview" + } + } + ], + "responses": [ + { + "$id": "1712", + "response": { + "$ref": "1706" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1713", + "kind": "model", + "type": { + "$ref": "74" + }, + "value": { + "$id": "1714", + "value": { + "$id": "1715", + "kind": "array", + "type": { + "$ref": "76" + }, + "value": [ + { + "$id": "1716", + "kind": "model", + "type": { + "$ref": "77" + }, + "value": { + "$id": "1717", + "name": { + "$id": "1718", + "kind": "string", + "type": { + "$ref": "79" + }, + "value": "Microsoft.ServiceNetworking/trafficControllers/read" + }, + "isDataAction": { + "$id": "1719", + "kind": "boolean", + "type": { + "$ref": "83" + }, + "value": false + }, + "display": { + "$id": "1720", + "kind": "model", + "type": { + "$ref": "87" + }, + "value": { + "$id": "1721", + "provider": { + "$id": "1722", + "kind": "string", + "type": { + "$ref": "89" + }, + "value": "Microsoft Service Networking" + }, + "resource": { + "$id": "1723", + "kind": "string", + "type": { + "$ref": "93" + }, + "value": "Traffic Controller" + }, + "operation": { + "$id": "1724", + "kind": "string", + "type": { + "$ref": "97" + }, + "value": "Get Traffic Controller configuration" + }, + "description": { + "$id": "1725", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "Traffic Controller is a L7 Load Balancing solution for a Multi Cluster setup" + } + } + }, + "origin": { + "$id": "1726", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user,system" + } + } + } + ] + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "1727" + }, + "Parent": "ServiceNetworkingClient", + "Parameters": [ + { + "$id": "1728", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "1729", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "1730", + "Type": { + "$id": "1731", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.ServiceNetworking.Operations" + } + ], + "Auth": { + "$id": "1732", + "OAuth2": { + "$id": "1733", + "Scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/Azure.ResourceManager.SiteManager.sln b/sdk/sitemanager/Azure.ResourceManager.SiteManager/Azure.ResourceManager.SiteManager.sln new file mode 100644 index 000000000000..3e41f05eca9c --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/Azure.ResourceManager.SiteManager.sln @@ -0,0 +1,54 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.SiteManager.Samples", "samples\Azure.ResourceManager.SiteManager.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.SiteManager", "src\Azure.ResourceManager.SiteManager.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/CHANGELOG.md b/sdk/sitemanager/Azure.ResourceManager.SiteManager/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/Directory.Build.props b/sdk/sitemanager/Azure.ResourceManager.SiteManager/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/README.md b/sdk/sitemanager/Azure.ResourceManager.SiteManager/README.md new file mode 100644 index 000000000000..c2f1cb55a1f5 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure SiteManager management client library for .NET + +**[Describe the service briefly first.]** + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - 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. + +## Getting started + +### Install the package + +Install the Microsoft Azure SiteManager management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.SiteManager --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET 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/dev/mgmt_quickstart.md). +- [API References](https://learn.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://aka.ms/azuresdk-net-mgmt-samples) + +## 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 about Microsoft Azure SDK, see [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 +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action 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 other 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/sitemanager/Azure.ResourceManager.SiteManager/api/Azure.ResourceManager.SiteManager.net8.0.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/api/Azure.ResourceManager.SiteManager.net8.0.cs new file mode 100644 index 000000000000..d391e0ac9db6 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/api/Azure.ResourceManager.SiteManager.net8.0.cs @@ -0,0 +1,185 @@ +namespace Azure.ResourceManager.SiteManager +{ + public partial class ResourceGroupSiteCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ResourceGroupSiteCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string siteName, 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 siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string siteName, 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 ResourceGroupSiteResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ResourceGroupSiteResource() { } + public virtual Azure.ResourceManager.SiteManager.SiteData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string siteName) { 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; } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SiteData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteData() { } + public Azure.ResourceManager.SiteManager.Models.SiteProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public static partial class SiteManagerExtensions + { + public static Azure.Response GetResourceGroupSite(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetResourceGroupSiteAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SiteManager.ResourceGroupSiteResource GetResourceGroupSiteResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.SiteManager.ResourceGroupSiteCollection GetResourceGroupSites(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Response GetSubscriptionSite(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSubscriptionSiteAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SiteManager.SubscriptionSiteResource GetSubscriptionSiteResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.SiteManager.SubscriptionSiteCollection GetSubscriptionSites(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } + } + public partial class SubscriptionSiteCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SubscriptionSiteCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string siteName, 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 siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string siteName, 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 SubscriptionSiteResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SubscriptionSiteResource() { } + public virtual Azure.ResourceManager.SiteManager.SiteData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string siteName) { 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; } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.SiteManager.Mocking +{ + public partial class MockableSiteManagerArmClient : Azure.ResourceManager.ArmResource + { + protected MockableSiteManagerArmClient() { } + public virtual Azure.ResourceManager.SiteManager.ResourceGroupSiteResource GetResourceGroupSiteResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.SiteManager.SubscriptionSiteResource GetSubscriptionSiteResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableSiteManagerResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableSiteManagerResourceGroupResource() { } + public virtual Azure.Response GetResourceGroupSite(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetResourceGroupSiteAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.SiteManager.ResourceGroupSiteCollection GetResourceGroupSites() { throw null; } + } + public partial class MockableSiteManagerSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableSiteManagerSubscriptionResource() { } + public virtual Azure.Response GetSubscriptionSite(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSubscriptionSiteAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.SiteManager.SubscriptionSiteCollection GetSubscriptionSites() { throw null; } + } +} +namespace Azure.ResourceManager.SiteManager.Models +{ + public static partial class ArmSiteManagerModelFactory + { + public static Azure.ResourceManager.SiteManager.SiteData SiteData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.SiteManager.Models.SiteProperties properties = null) { throw null; } + public static Azure.ResourceManager.SiteManager.Models.SiteProperties SiteProperties(string displayName = null, string description = null, Azure.Core.ResourceIdentifier addressResourceId = null, Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState?)) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState 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.SiteManager.Models.ResourceProvisioningState left, Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState left, Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SiteProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteProperties() { } + public Azure.Core.ResourceIdentifier AddressResourceId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SiteUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteUpdate() { } + public Azure.ResourceManager.SiteManager.Models.SiteUpdateProperties Properties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SiteUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteUpdateProperties() { } + public Azure.Core.ResourceIdentifier AddressResourceId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/api/Azure.ResourceManager.SiteManager.netstandard2.0.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/api/Azure.ResourceManager.SiteManager.netstandard2.0.cs new file mode 100644 index 000000000000..d391e0ac9db6 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/api/Azure.ResourceManager.SiteManager.netstandard2.0.cs @@ -0,0 +1,185 @@ +namespace Azure.ResourceManager.SiteManager +{ + public partial class ResourceGroupSiteCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ResourceGroupSiteCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string siteName, 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 siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string siteName, 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 ResourceGroupSiteResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ResourceGroupSiteResource() { } + public virtual Azure.ResourceManager.SiteManager.SiteData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string siteName) { 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; } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SiteData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteData() { } + public Azure.ResourceManager.SiteManager.Models.SiteProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public static partial class SiteManagerExtensions + { + public static Azure.Response GetResourceGroupSite(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetResourceGroupSiteAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SiteManager.ResourceGroupSiteResource GetResourceGroupSiteResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.SiteManager.ResourceGroupSiteCollection GetResourceGroupSites(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Response GetSubscriptionSite(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSubscriptionSiteAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SiteManager.SubscriptionSiteResource GetSubscriptionSiteResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.SiteManager.SubscriptionSiteCollection GetSubscriptionSites(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } + } + public partial class SubscriptionSiteCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SubscriptionSiteCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string siteName, Azure.ResourceManager.SiteManager.SiteData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string siteName, 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 siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string siteName, 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 SubscriptionSiteResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SubscriptionSiteResource() { } + public virtual Azure.ResourceManager.SiteManager.SiteData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string siteName) { 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; } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.SiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.SiteManager.Models.SiteUpdate properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.SiteManager.Mocking +{ + public partial class MockableSiteManagerArmClient : Azure.ResourceManager.ArmResource + { + protected MockableSiteManagerArmClient() { } + public virtual Azure.ResourceManager.SiteManager.ResourceGroupSiteResource GetResourceGroupSiteResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.SiteManager.SubscriptionSiteResource GetSubscriptionSiteResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableSiteManagerResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableSiteManagerResourceGroupResource() { } + public virtual Azure.Response GetResourceGroupSite(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetResourceGroupSiteAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.SiteManager.ResourceGroupSiteCollection GetResourceGroupSites() { throw null; } + } + public partial class MockableSiteManagerSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableSiteManagerSubscriptionResource() { } + public virtual Azure.Response GetSubscriptionSite(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSubscriptionSiteAsync(string siteName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.SiteManager.SubscriptionSiteCollection GetSubscriptionSites() { throw null; } + } +} +namespace Azure.ResourceManager.SiteManager.Models +{ + public static partial class ArmSiteManagerModelFactory + { + public static Azure.ResourceManager.SiteManager.SiteData SiteData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.SiteManager.Models.SiteProperties properties = null) { throw null; } + public static Azure.ResourceManager.SiteManager.Models.SiteProperties SiteProperties(string displayName = null, string description = null, Azure.Core.ResourceIdentifier addressResourceId = null, Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState? provisioningState = default(Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState?)) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState 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.SiteManager.Models.ResourceProvisioningState left, Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState left, Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SiteProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteProperties() { } + public Azure.Core.ResourceIdentifier AddressResourceId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public Azure.ResourceManager.SiteManager.Models.ResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SiteUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteUpdate() { } + public Azure.ResourceManager.SiteManager.Models.SiteUpdateProperties Properties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SiteUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteUpdateProperties() { } + public Azure.Core.ResourceIdentifier AddressResourceId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SiteManager.Models.SiteUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/assets.json b/sdk/sitemanager/Azure.ResourceManager.SiteManager/assets.json new file mode 100644 index 000000000000..fd8ce0868cf6 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/sitemanager/Azure.ResourceManager.SiteManager", + "Tag": "" +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Azure.ResourceManager.SiteManager.Samples.csproj b/sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Azure.ResourceManager.SiteManager.Samples.csproj new file mode 100644 index 000000000000..ca7b4ed2fcd2 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/samples/Azure.ResourceManager.SiteManager.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Azure.ResourceManager.SiteManager.csproj b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Azure.ResourceManager.SiteManager.csproj new file mode 100644 index 000000000000..c8beaaf346a9 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Azure.ResourceManager.SiteManager.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider SiteManager. + 1.0.0-beta.1 + azure;management;arm;resource manager;sitemanager + Azure.ResourceManager.SiteManager + + diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ArmSiteManagerModelFactory.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ArmSiteManagerModelFactory.cs new file mode 100644 index 000000000000..4c3fd7407380 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ArmSiteManagerModelFactory.cs @@ -0,0 +1,48 @@ +// 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; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.SiteManager.Models +{ + /// Model factory for models. + public static partial class ArmSiteManagerModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static SiteData SiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SiteProperties properties = null) + { + return new SiteData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// displayName of Site resource. + /// Description of Site resource. + /// AddressResource ArmId of Site resource. + /// Provisioning state of last operation. + /// A new instance for mocking. + public static SiteProperties SiteProperties(string displayName = null, string description = null, ResourceIdentifier addressResourceId = null, ResourceProvisioningState? provisioningState = null) + { + return new SiteProperties(displayName, description, addressResourceId, provisioningState, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerArmClient.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerArmClient.cs new file mode 100644 index 000000000000..95b0363ade7a --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerArmClient.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.SiteManager.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableSiteManagerArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableSiteManagerArmClient() + { + } + + /// 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 MockableSiteManagerArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableSiteManagerArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual ResourceGroupSiteResource GetResourceGroupSiteResource(ResourceIdentifier id) + { + ResourceGroupSiteResource.ValidateResourceId(id); + return new ResourceGroupSiteResource(Client, id); + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual SubscriptionSiteResource GetSubscriptionSiteResource(ResourceIdentifier id) + { + SubscriptionSiteResource.ValidateResourceId(id); + return new SubscriptionSiteResource(Client, id); + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerResourceGroupResource.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerResourceGroupResource.cs new file mode 100644 index 000000000000..6d5f8ea54c99 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerResourceGroupResource.cs @@ -0,0 +1,105 @@ +// 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.Core; + +namespace Azure.ResourceManager.SiteManager.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableSiteManagerResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableSiteManagerResourceGroupResource() + { + } + + /// 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 MockableSiteManagerResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of ResourceGroupSiteResources in the ResourceGroupResource. + /// An object representing collection of ResourceGroupSiteResources and their operations over a ResourceGroupSiteResource. + public virtual ResourceGroupSiteCollection GetResourceGroupSites() + { + return GetCachedClient(client => new ResourceGroupSiteCollection(client, Id)); + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetResourceGroupSiteAsync(string siteName, CancellationToken cancellationToken = default) + { + return await GetResourceGroupSites().GetAsync(siteName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetResourceGroupSite(string siteName, CancellationToken cancellationToken = default) + { + return GetResourceGroupSites().Get(siteName, cancellationToken); + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerSubscriptionResource.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerSubscriptionResource.cs new file mode 100644 index 000000000000..9c3d22dc5900 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/MockableSiteManagerSubscriptionResource.cs @@ -0,0 +1,105 @@ +// 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.Core; + +namespace Azure.ResourceManager.SiteManager.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableSiteManagerSubscriptionResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableSiteManagerSubscriptionResource() + { + } + + /// 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 MockableSiteManagerSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of SubscriptionSiteResources in the SubscriptionResource. + /// An object representing collection of SubscriptionSiteResources and their operations over a SubscriptionSiteResource. + public virtual SubscriptionSiteCollection GetSubscriptionSites() + { + return GetCachedClient(client => new SubscriptionSiteCollection(client, Id)); + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSubscriptionSiteAsync(string siteName, CancellationToken cancellationToken = default) + { + return await GetSubscriptionSites().GetAsync(siteName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSubscriptionSite(string siteName, CancellationToken cancellationToken = default) + { + return GetSubscriptionSites().Get(siteName, cancellationToken); + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/SiteManagerExtensions.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/SiteManagerExtensions.cs new file mode 100644 index 000000000000..1fccc8c49cac --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Extensions/SiteManagerExtensions.cs @@ -0,0 +1,259 @@ +// 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.Core; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SiteManager.Mocking; + +namespace Azure.ResourceManager.SiteManager +{ + /// A class to add extension methods to Azure.ResourceManager.SiteManager. + public static partial class SiteManagerExtensions + { + private static MockableSiteManagerArmClient GetMockableSiteManagerArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableSiteManagerArmClient(client0)); + } + + private static MockableSiteManagerResourceGroupResource GetMockableSiteManagerResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableSiteManagerResourceGroupResource(client, resource.Id)); + } + + private static MockableSiteManagerSubscriptionResource GetMockableSiteManagerSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableSiteManagerSubscriptionResource(client, resource.Id)); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ResourceGroupSiteResource GetResourceGroupSiteResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSiteManagerArmClient(client).GetResourceGroupSiteResource(id); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SubscriptionSiteResource GetSubscriptionSiteResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSiteManagerArmClient(client).GetSubscriptionSiteResource(id); + } + + /// + /// Gets a collection of ResourceGroupSiteResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of ResourceGroupSiteResources and their operations over a ResourceGroupSiteResource. + public static ResourceGroupSiteCollection GetResourceGroupSites(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableSiteManagerResourceGroupResource(resourceGroupResource).GetResourceGroupSites(); + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of Site resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetResourceGroupSiteAsync(this ResourceGroupResource resourceGroupResource, string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableSiteManagerResourceGroupResource(resourceGroupResource).GetResourceGroupSiteAsync(siteName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of Site resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetResourceGroupSite(this ResourceGroupResource resourceGroupResource, string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableSiteManagerResourceGroupResource(resourceGroupResource).GetResourceGroupSite(siteName, cancellationToken); + } + + /// + /// Gets a collection of SubscriptionSiteResources in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of SubscriptionSiteResources and their operations over a SubscriptionSiteResource. + public static SubscriptionSiteCollection GetSubscriptionSites(this SubscriptionResource subscriptionResource) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSiteManagerSubscriptionResource(subscriptionResource).GetSubscriptionSites(); + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of Site resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetSubscriptionSiteAsync(this SubscriptionResource subscriptionResource, string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSiteManagerSubscriptionResource(subscriptionResource).GetSubscriptionSiteAsync(siteName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of Site resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetSubscriptionSite(this SubscriptionResource subscriptionResource, string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSiteManagerSubscriptionResource(subscriptionResource).GetSubscriptionSite(siteName, cancellationToken); + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Argument.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..a33cae7b9b4a --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SiteManager +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..d1195c913a7f --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SiteManager +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ChangeTrackingList.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..d7c37dce15ea --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// 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.Linq; + +namespace Azure.ResourceManager.SiteManager +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..8b6326c08556 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.SiteManager +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Optional.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..eeaa7c102d82 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Optional.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; + +namespace Azure.ResourceManager.SiteManager +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..5c17e9380373 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SiteManager +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/ResourceGroupSiteOperationSource.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/ResourceGroupSiteOperationSource.cs new file mode 100644 index 000000000000..b4621bf5d096 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/ResourceGroupSiteOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SiteManager +{ + internal class ResourceGroupSiteOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ResourceGroupSiteOperationSource(ArmClient client) + { + _client = client; + } + + ResourceGroupSiteResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new ResourceGroupSiteResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new ResourceGroupSiteResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteManagerArmOperation.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteManagerArmOperation.cs new file mode 100644 index 000000000000..2cd25b7e0d02 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteManagerArmOperation.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SiteManager +{ +#pragma warning disable SA1649 // File name should match first type name + internal class SiteManagerArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of SiteManagerArmOperation for mocking. + protected SiteManagerArmOperation() + { + } + + internal SiteManagerArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal SiteManagerArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "SiteManagerArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + 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/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteManagerArmOperationOfT.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteManagerArmOperationOfT.cs new file mode 100644 index 000000000000..fc904280a722 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SiteManagerArmOperationOfT.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SiteManager +{ +#pragma warning disable SA1649 // File name should match first type name + internal class SiteManagerArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of SiteManagerArmOperation for mocking. + protected SiteManagerArmOperation() + { + } + + internal SiteManagerArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal SiteManagerArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "SiteManagerArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + 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/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SubscriptionSiteOperationSource.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SubscriptionSiteOperationSource.cs new file mode 100644 index 000000000000..30de7e428a88 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/LongRunningOperation/SubscriptionSiteOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SiteManager +{ + internal class SubscriptionSiteOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SubscriptionSiteOperationSource(ArmClient client) + { + _client = client; + } + + SubscriptionSiteResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new SubscriptionSiteResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new SubscriptionSiteResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/ResourceProvisioningState.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/ResourceProvisioningState.cs new file mode 100644 index 000000000000..e99e5b7d2b63 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/ResourceProvisioningState.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.SiteManager.Models +{ + /// The provisioning state of a resource type. + public readonly partial struct ResourceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static ResourceProvisioningState Succeeded { get; } = new ResourceProvisioningState(SucceededValue); + /// Resource creation failed. + public static ResourceProvisioningState Failed { get; } = new ResourceProvisioningState(FailedValue); + /// Resource creation was canceled. + public static ResourceProvisioningState Canceled { get; } = new ResourceProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceProvisioningState left, ResourceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceProvisioningState left, ResourceProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ResourceProvisioningState(string value) => new ResourceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceProvisioningState other && Equals(other); + /// + public bool Equals(ResourceProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteListResult.Serialization.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteListResult.Serialization.cs new file mode 100644 index 000000000000..d2fe83e6a24a --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SiteManager.Models +{ + internal partial class SiteListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SiteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteListResult(document.RootElement, options); + } + + internal static SiteListResult DeserializeSiteListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SiteData.DeserializeSiteData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SiteListResult)} does not support writing '{options.Format}' format."); + } + } + + SiteListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSiteListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteListResult.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteListResult.cs new file mode 100644 index 000000000000..cdd5ac29edcd --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.SiteManager.Models +{ + /// The response of a Site list operation. + internal partial class SiteListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Site items on this page. + /// is null. + internal SiteListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Site items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SiteListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SiteListResult() + { + } + + /// The Site items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteProperties.Serialization.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteProperties.Serialization.cs new file mode 100644 index 000000000000..65aee1d1f37f --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteProperties.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SiteManager.Models +{ + public partial class SiteProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(AddressResourceId)) + { + writer.WritePropertyName("addressResourceId"u8); + writer.WriteStringValue(AddressResourceId); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SiteProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteProperties(document.RootElement, options); + } + + internal static SiteProperties DeserializeSiteProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string displayName = default; + string description = default; + ResourceIdentifier addressResourceId = default; + ResourceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("addressResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + addressResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ResourceProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteProperties(displayName, description, addressResourceId, provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SiteProperties)} does not support writing '{options.Format}' format."); + } + } + + SiteProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSiteProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteProperties.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteProperties.cs new file mode 100644 index 000000000000..744e4baf8923 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteProperties.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.SiteManager.Models +{ + /// Site properties. + public partial class SiteProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SiteProperties() + { + } + + /// Initializes a new instance of . + /// displayName of Site resource. + /// Description of Site resource. + /// AddressResource ArmId of Site resource. + /// Provisioning state of last operation. + /// Keeps track of any properties unknown to the library. + internal SiteProperties(string displayName, string description, ResourceIdentifier addressResourceId, ResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + DisplayName = displayName; + Description = description; + AddressResourceId = addressResourceId; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// displayName of Site resource. + public string DisplayName { get; set; } + /// Description of Site resource. + public string Description { get; set; } + /// AddressResource ArmId of Site resource. + public ResourceIdentifier AddressResourceId { get; set; } + /// Provisioning state of last operation. + public ResourceProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdate.Serialization.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdate.Serialization.cs new file mode 100644 index 000000000000..dac0628fdd2f --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdate.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SiteManager.Models +{ + public partial class SiteUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteUpdate)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SiteUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteUpdate(document.RootElement, options); + } + + internal static SiteUpdate DeserializeSiteUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SiteUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SiteUpdateProperties.DeserializeSiteUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteUpdate(properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SiteUpdate)} does not support writing '{options.Format}' format."); + } + } + + SiteUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSiteUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdate.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdate.cs new file mode 100644 index 000000000000..ed66baac9fcb --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdate.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SiteManager.Models +{ + /// The type used for update operations of the Site. + public partial class SiteUpdate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SiteUpdate() + { + } + + /// Initializes a new instance of . + /// The updatable properties of the Site. + /// Keeps track of any properties unknown to the library. + internal SiteUpdate(SiteUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The updatable properties of the Site. + public SiteUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdateProperties.Serialization.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..f0d094c1f685 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdateProperties.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SiteManager.Models +{ + public partial class SiteUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(AddressResourceId)) + { + writer.WritePropertyName("addressResourceId"u8); + writer.WriteStringValue(AddressResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SiteUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteUpdateProperties(document.RootElement, options); + } + + internal static SiteUpdateProperties DeserializeSiteUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string displayName = default; + string description = default; + ResourceIdentifier addressResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("addressResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + addressResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteUpdateProperties(displayName, description, addressResourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SiteUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + SiteUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSiteUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdateProperties.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdateProperties.cs new file mode 100644 index 000000000000..a356c03675a9 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/Models/SiteUpdateProperties.cs @@ -0,0 +1,74 @@ +// 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.SiteManager.Models +{ + /// The updatable properties of the Site. + public partial class SiteUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SiteUpdateProperties() + { + } + + /// Initializes a new instance of . + /// displayName of Site resource. + /// Description of Site resource. + /// AddressResource ArmId of Site resource. + /// Keeps track of any properties unknown to the library. + internal SiteUpdateProperties(string displayName, string description, ResourceIdentifier addressResourceId, IDictionary serializedAdditionalRawData) + { + DisplayName = displayName; + Description = description; + AddressResourceId = addressResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// displayName of Site resource. + public string DisplayName { get; set; } + /// Description of Site resource. + public string Description { get; set; } + /// AddressResource ArmId of Site resource. + public ResourceIdentifier AddressResourceId { get; set; } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ProviderConstants.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..ac5d9bb23fcf --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/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.SiteManager +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ResourceGroupSiteCollection.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ResourceGroupSiteCollection.cs new file mode 100644 index 000000000000..a548e85411f8 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ResourceGroupSiteCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.SiteManager +{ + /// + /// 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 GetResourceGroupSites method from an instance of . + /// + public partial class ResourceGroupSiteCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _resourceGroupSiteSitesClientDiagnostics; + private readonly SitesRestOperations _resourceGroupSiteSitesRestClient; + + /// Initializes a new instance of the class for mocking. + protected ResourceGroupSiteCollection() + { + } + + /// 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 ResourceGroupSiteCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _resourceGroupSiteSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SiteManager", ResourceGroupSiteResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceGroupSiteResource.ResourceType, out string resourceGroupSiteSitesApiVersion); + _resourceGroupSiteSitesRestClient = new SitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, resourceGroupSiteSitesApiVersion); +#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 Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Name of Site resource. + /// Resource create parameters. + /// 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 siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _resourceGroupSiteSitesClientDiagnostics.CreateScope("ResourceGroupSiteCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _resourceGroupSiteSitesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, siteName, data, cancellationToken).ConfigureAwait(false); + var operation = new SiteManagerArmOperation(new ResourceGroupSiteOperationSource(Client), _resourceGroupSiteSitesClientDiagnostics, Pipeline, _resourceGroupSiteSitesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, siteName, 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 Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Name of Site resource. + /// Resource create parameters. + /// 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 siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _resourceGroupSiteSitesClientDiagnostics.CreateScope("ResourceGroupSiteCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _resourceGroupSiteSitesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, siteName, data, cancellationToken); + var operation = new SiteManagerArmOperation(new ResourceGroupSiteOperationSource(Client), _resourceGroupSiteSitesClientDiagnostics, Pipeline, _resourceGroupSiteSitesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, siteName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _resourceGroupSiteSitesClientDiagnostics.CreateScope("ResourceGroupSiteCollection.Get"); + scope.Start(); + try + { + var response = await _resourceGroupSiteSitesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, siteName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ResourceGroupSiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _resourceGroupSiteSitesClientDiagnostics.CreateScope("ResourceGroupSiteCollection.Get"); + scope.Start(); + try + { + var response = _resourceGroupSiteSitesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, siteName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ResourceGroupSiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Site resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites + /// + /// + /// Operation Id + /// Site_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _resourceGroupSiteSitesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _resourceGroupSiteSitesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ResourceGroupSiteResource(Client, SiteData.DeserializeSiteData(e)), _resourceGroupSiteSitesClientDiagnostics, Pipeline, "ResourceGroupSiteCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Site resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites + /// + /// + /// Operation Id + /// Site_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _resourceGroupSiteSitesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _resourceGroupSiteSitesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ResourceGroupSiteResource(Client, SiteData.DeserializeSiteData(e)), _resourceGroupSiteSitesClientDiagnostics, Pipeline, "ResourceGroupSiteCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _resourceGroupSiteSitesClientDiagnostics.CreateScope("ResourceGroupSiteCollection.Exists"); + scope.Start(); + try + { + var response = await _resourceGroupSiteSitesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, siteName, 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.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _resourceGroupSiteSitesClientDiagnostics.CreateScope("ResourceGroupSiteCollection.Exists"); + scope.Start(); + try + { + var response = _resourceGroupSiteSitesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, siteName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _resourceGroupSiteSitesClientDiagnostics.CreateScope("ResourceGroupSiteCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _resourceGroupSiteSitesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, siteName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ResourceGroupSiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _resourceGroupSiteSitesClientDiagnostics.CreateScope("ResourceGroupSiteCollection.GetIfExists"); + scope.Start(); + try + { + var response = _resourceGroupSiteSitesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, siteName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ResourceGroupSiteResource(Client, response.Value), 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/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ResourceGroupSiteResource.Serialization.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ResourceGroupSiteResource.Serialization.cs new file mode 100644 index 000000000000..65f3282ddd71 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ResourceGroupSiteResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SiteManager +{ + public partial class ResourceGroupSiteResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ResourceGroupSiteResource.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ResourceGroupSiteResource.cs new file mode 100644 index 000000000000..23f443292d04 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/ResourceGroupSiteResource.cs @@ -0,0 +1,344 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SiteManager.Models; + +namespace Azure.ResourceManager.SiteManager +{ + /// + /// A Class representing a ResourceGroupSite 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 GetResourceGroupSiteResource method. + /// Otherwise you can get one from its parent resource using the GetResourceGroupSite method. + /// + public partial class ResourceGroupSiteResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The siteName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string siteName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _resourceGroupSiteSitesClientDiagnostics; + private readonly SitesRestOperations _resourceGroupSiteSitesRestClient; + private readonly SiteData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/sites"; + + /// Initializes a new instance of the class for mocking. + protected ResourceGroupSiteResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ResourceGroupSiteResource(ArmClient client, SiteData 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 ResourceGroupSiteResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _resourceGroupSiteSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SiteManager", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string resourceGroupSiteSitesApiVersion); + _resourceGroupSiteSitesRestClient = new SitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, resourceGroupSiteSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 SiteData 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 Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _resourceGroupSiteSitesClientDiagnostics.CreateScope("ResourceGroupSiteResource.Get"); + scope.Start(); + try + { + var response = await _resourceGroupSiteSitesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ResourceGroupSiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _resourceGroupSiteSitesClientDiagnostics.CreateScope("ResourceGroupSiteResource.Get"); + scope.Start(); + try + { + var response = _resourceGroupSiteSitesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ResourceGroupSiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Delete + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _resourceGroupSiteSitesClientDiagnostics.CreateScope("ResourceGroupSiteResource.Delete"); + scope.Start(); + try + { + var response = await _resourceGroupSiteSitesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _resourceGroupSiteSitesRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new SiteManagerArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Delete + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _resourceGroupSiteSitesClientDiagnostics.CreateScope("ResourceGroupSiteResource.Delete"); + scope.Start(); + try + { + var response = _resourceGroupSiteSitesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var uri = _resourceGroupSiteSitesRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new SiteManagerArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Update + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _resourceGroupSiteSitesClientDiagnostics.CreateScope("ResourceGroupSiteResource.Update"); + scope.Start(); + try + { + var response = await _resourceGroupSiteSitesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, properties, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ResourceGroupSiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Update + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _resourceGroupSiteSitesClientDiagnostics.CreateScope("ResourceGroupSiteResource.Update"); + scope.Start(); + try + { + var response = _resourceGroupSiteSitesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, properties, cancellationToken); + return Response.FromValue(new ResourceGroupSiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/RestOperations/SitesBySubscriptionRestOperations.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/RestOperations/SitesBySubscriptionRestOperations.cs new file mode 100644 index 000000000000..b5e94332f361 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/RestOperations/SitesBySubscriptionRestOperations.cs @@ -0,0 +1,533 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SiteManager.Models; + +namespace Azure.ResourceManager.SiteManager +{ + internal partial class SitesBySubscriptionRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SitesBySubscriptionRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SitesBySubscriptionRestOperations(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 ?? "2024-02-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Edge/sites", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + 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.Edge/sites", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Site resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + SiteListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteListResult.DeserializeSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Site resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + SiteListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteListResult.DeserializeSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string siteName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string siteName) + { + 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.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateGetRequest(subscriptionId, siteName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SiteData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateGetRequest(subscriptionId, siteName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SiteData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string siteName, SiteData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string siteName, SiteData 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("/providers/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site resource. + /// Resource create parameters. + /// 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 siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, siteName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site resource. + /// Resource create parameters. + /// 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 siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, siteName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string siteName, SiteUpdate properties) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string siteName, SiteUpdate properties) + { + 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("/providers/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, 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(properties, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site resource. + /// The resource properties to be updated. + /// 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 siteName, SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateUpdateRequest(subscriptionId, siteName, properties); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site resource. + /// The resource properties to be updated. + /// 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 siteName, SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateUpdateRequest(subscriptionId, siteName, properties); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string siteName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string siteName) + { + 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("/providers/Microsoft.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateDeleteRequest(subscriptionId, siteName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Site. + /// The ID of the target subscription. The value must be an UUID. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateDeleteRequest(subscriptionId, siteName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + 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; + } + + /// List Site resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + SiteListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteListResult.DeserializeSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Site resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + SiteListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteListResult.DeserializeSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/RestOperations/SitesRestOperations.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/RestOperations/SitesRestOperations.cs new file mode 100644 index 000000000000..5e5d78d744a4 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/RestOperations/SitesRestOperations.cs @@ -0,0 +1,577 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SiteManager.Models; + +namespace Azure.ResourceManager.SiteManager +{ + internal partial class SitesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SitesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SitesRestOperations(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 ?? "2024-02-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string siteName) + { + 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.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string siteName) + { + 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.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, siteName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SiteData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, siteName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SiteData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string siteName, SiteData data) + { + 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.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string siteName, SiteData 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.Edge/sites/", false); + uri.AppendPath(siteName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site resource. + /// Resource create parameters. + /// 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 siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, siteName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site resource. + /// Resource create parameters. + /// 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 siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, siteName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string siteName, SiteUpdate properties) + { + 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.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string siteName, SiteUpdate properties) + { + 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.Edge/sites/", false); + uri.AppendPath(siteName, 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(properties, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site resource. + /// The resource properties to be updated. + /// 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 siteName, SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, siteName, properties); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site resource. + /// The resource properties to be updated. + /// 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 siteName, SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, siteName, properties); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteData.DeserializeSiteData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string siteName) + { + 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.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string siteName) + { + 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.Edge/sites/", false); + uri.AppendPath(siteName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, siteName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Site. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, siteName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + 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.Edge/sites", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(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.Edge/sites", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Site resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteListResult.DeserializeSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Site resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteListResult.DeserializeSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(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; + } + + /// List Site resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(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 = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SiteListResult.DeserializeSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Site resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(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 = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SiteListResult.DeserializeSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteData.Serialization.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteData.Serialization.cs new file mode 100644 index 000000000000..a7d463851997 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SiteManager.Models; + +namespace Azure.ResourceManager.SiteManager +{ + public partial class SiteData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + SiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteData(document.RootElement, options); + } + + internal static SiteData DeserializeSiteData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SiteProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SiteProperties.DeserializeSiteProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SiteData)} does not support writing '{options.Format}' format."); + } + } + + SiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSiteData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteData.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteData.cs new file mode 100644 index 000000000000..a8eeede0bd0c --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SiteData.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; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SiteManager.Models; + +namespace Azure.ResourceManager.SiteManager +{ + /// + /// A class representing the Site data model. + /// Site as ARM Resource + /// + public partial class SiteData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SiteData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal SiteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SiteProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public SiteProperties Properties { get; set; } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SubscriptionSiteCollection.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SubscriptionSiteCollection.cs new file mode 100644 index 000000000000..ff0fafd47b88 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SubscriptionSiteCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.SiteManager +{ + /// + /// 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 GetSubscriptionSites method from an instance of . + /// + public partial class SubscriptionSiteCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _subscriptionSiteSitesBySubscriptionClientDiagnostics; + private readonly SitesBySubscriptionRestOperations _subscriptionSiteSitesBySubscriptionRestClient; + + /// Initializes a new instance of the class for mocking. + protected SubscriptionSiteCollection() + { + } + + /// 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 SubscriptionSiteCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _subscriptionSiteSitesBySubscriptionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SiteManager", SubscriptionSiteResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SubscriptionSiteResource.ResourceType, out string subscriptionSiteSitesBySubscriptionApiVersion); + _subscriptionSiteSitesBySubscriptionRestClient = new SitesBySubscriptionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, subscriptionSiteSitesBySubscriptionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SubscriptionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); + } + + /// + /// Create a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Name of Site resource. + /// Resource create parameters. + /// 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 siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _subscriptionSiteSitesBySubscriptionClientDiagnostics.CreateScope("SubscriptionSiteCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _subscriptionSiteSitesBySubscriptionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, siteName, data, cancellationToken).ConfigureAwait(false); + var operation = new SiteManagerArmOperation(new SubscriptionSiteOperationSource(Client), _subscriptionSiteSitesBySubscriptionClientDiagnostics, Pipeline, _subscriptionSiteSitesBySubscriptionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, siteName, 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 Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Name of Site resource. + /// Resource create parameters. + /// 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 siteName, SiteData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _subscriptionSiteSitesBySubscriptionClientDiagnostics.CreateScope("SubscriptionSiteCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _subscriptionSiteSitesBySubscriptionRestClient.CreateOrUpdate(Id.SubscriptionId, siteName, data, cancellationToken); + var operation = new SiteManagerArmOperation(new SubscriptionSiteOperationSource(Client), _subscriptionSiteSitesBySubscriptionClientDiagnostics, Pipeline, _subscriptionSiteSitesBySubscriptionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, siteName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _subscriptionSiteSitesBySubscriptionClientDiagnostics.CreateScope("SubscriptionSiteCollection.Get"); + scope.Start(); + try + { + var response = await _subscriptionSiteSitesBySubscriptionRestClient.GetAsync(Id.SubscriptionId, siteName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SubscriptionSiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _subscriptionSiteSitesBySubscriptionClientDiagnostics.CreateScope("SubscriptionSiteCollection.Get"); + scope.Start(); + try + { + var response = _subscriptionSiteSitesBySubscriptionRestClient.Get(Id.SubscriptionId, siteName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SubscriptionSiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Site resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites + /// + /// + /// Operation Id + /// Site_List + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _subscriptionSiteSitesBySubscriptionRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _subscriptionSiteSitesBySubscriptionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SubscriptionSiteResource(Client, SiteData.DeserializeSiteData(e)), _subscriptionSiteSitesBySubscriptionClientDiagnostics, Pipeline, "SubscriptionSiteCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Site resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites + /// + /// + /// Operation Id + /// Site_List + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _subscriptionSiteSitesBySubscriptionRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _subscriptionSiteSitesBySubscriptionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SubscriptionSiteResource(Client, SiteData.DeserializeSiteData(e)), _subscriptionSiteSitesBySubscriptionClientDiagnostics, Pipeline, "SubscriptionSiteCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site 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 siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _subscriptionSiteSitesBySubscriptionClientDiagnostics.CreateScope("SubscriptionSiteCollection.Exists"); + scope.Start(); + try + { + var response = await _subscriptionSiteSitesBySubscriptionRestClient.GetAsync(Id.SubscriptionId, siteName, 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}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _subscriptionSiteSitesBySubscriptionClientDiagnostics.CreateScope("SubscriptionSiteCollection.Exists"); + scope.Start(); + try + { + var response = _subscriptionSiteSitesBySubscriptionRestClient.Get(Id.SubscriptionId, siteName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _subscriptionSiteSitesBySubscriptionClientDiagnostics.CreateScope("SubscriptionSiteCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _subscriptionSiteSitesBySubscriptionRestClient.GetAsync(Id.SubscriptionId, siteName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SubscriptionSiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Site resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string siteName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(siteName, nameof(siteName)); + + using var scope = _subscriptionSiteSitesBySubscriptionClientDiagnostics.CreateScope("SubscriptionSiteCollection.GetIfExists"); + scope.Start(); + try + { + var response = _subscriptionSiteSitesBySubscriptionRestClient.Get(Id.SubscriptionId, siteName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SubscriptionSiteResource(Client, response.Value), 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/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SubscriptionSiteResource.Serialization.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SubscriptionSiteResource.Serialization.cs new file mode 100644 index 000000000000..f7b859676a15 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SubscriptionSiteResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SiteManager +{ + public partial class SubscriptionSiteResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SubscriptionSiteResource.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SubscriptionSiteResource.cs new file mode 100644 index 000000000000..a39f0d085580 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Generated/SubscriptionSiteResource.cs @@ -0,0 +1,343 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SiteManager.Models; + +namespace Azure.ResourceManager.SiteManager +{ + /// + /// A Class representing a SubscriptionSite 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 GetSubscriptionSiteResource method. + /// Otherwise you can get one from its parent resource using the GetSubscriptionSite method. + /// + public partial class SubscriptionSiteResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The siteName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string siteName) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _subscriptionSiteSitesBySubscriptionClientDiagnostics; + private readonly SitesBySubscriptionRestOperations _subscriptionSiteSitesBySubscriptionRestClient; + private readonly SiteData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Edge/sites"; + + /// Initializes a new instance of the class for mocking. + protected SubscriptionSiteResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SubscriptionSiteResource(ArmClient client, SiteData 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 SubscriptionSiteResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _subscriptionSiteSitesBySubscriptionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SiteManager", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string subscriptionSiteSitesBySubscriptionApiVersion); + _subscriptionSiteSitesBySubscriptionRestClient = new SitesBySubscriptionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, subscriptionSiteSitesBySubscriptionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 SiteData 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 Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _subscriptionSiteSitesBySubscriptionClientDiagnostics.CreateScope("SubscriptionSiteResource.Get"); + scope.Start(); + try + { + var response = await _subscriptionSiteSitesBySubscriptionRestClient.GetAsync(Id.SubscriptionId, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SubscriptionSiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Get + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _subscriptionSiteSitesBySubscriptionClientDiagnostics.CreateScope("SubscriptionSiteResource.Get"); + scope.Start(); + try + { + var response = _subscriptionSiteSitesBySubscriptionRestClient.Get(Id.SubscriptionId, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SubscriptionSiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Delete + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _subscriptionSiteSitesBySubscriptionClientDiagnostics.CreateScope("SubscriptionSiteResource.Delete"); + scope.Start(); + try + { + var response = await _subscriptionSiteSitesBySubscriptionRestClient.DeleteAsync(Id.SubscriptionId, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _subscriptionSiteSitesBySubscriptionRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new SiteManagerArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Delete + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _subscriptionSiteSitesBySubscriptionClientDiagnostics.CreateScope("SubscriptionSiteResource.Delete"); + scope.Start(); + try + { + var response = _subscriptionSiteSitesBySubscriptionRestClient.Delete(Id.SubscriptionId, Id.Name, cancellationToken); + var uri = _subscriptionSiteSitesBySubscriptionRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new SiteManagerArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Update + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _subscriptionSiteSitesBySubscriptionClientDiagnostics.CreateScope("SubscriptionSiteResource.Update"); + scope.Start(); + try + { + var response = await _subscriptionSiteSitesBySubscriptionRestClient.UpdateAsync(Id.SubscriptionId, Id.Name, properties, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SubscriptionSiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName} + /// + /// + /// Operation Id + /// Site_Update + /// + /// + /// Default Api Version + /// 2024-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(SiteUpdate properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _subscriptionSiteSitesBySubscriptionClientDiagnostics.CreateScope("SubscriptionSiteResource.Update"); + scope.Start(); + try + { + var response = _subscriptionSiteSitesBySubscriptionRestClient.Update(Id.SubscriptionId, Id.Name, properties, cancellationToken); + return Response.FromValue(new SubscriptionSiteResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Properties/AssemblyInfo.cs b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..ae2291871033 --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.SiteManager.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("SiteManager")] diff --git a/sdk/sitemanager/Azure.ResourceManager.SiteManager/tsp-location.yaml b/sdk/sitemanager/Azure.ResourceManager.SiteManager/tsp-location.yaml new file mode 100644 index 000000000000..71a670fa6c1b --- /dev/null +++ b/sdk/sitemanager/Azure.ResourceManager.SiteManager/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/edge/Microsoft.Edge.Sites.Management +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/sitemanager/ci.mgmt.yml b/sdk/sitemanager/ci.mgmt.yml new file mode 100644 index 000000000000..b64b81600c03 --- /dev/null +++ b/sdk/sitemanager/ci.mgmt.yml @@ -0,0 +1,26 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/sitemanager /ci.mgmt.yml + - sdk/sitemanager /Azure.ResourceManager.SiteManager / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: sitemanager + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.SiteManager + safeName: AzureResourceManagerSiteManager diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/Configuration.json b/sdk/standbypool/Azure.ResourceManager.StandbyPool/Configuration.json new file mode 100644 index 000000000000..0a2d1af62ece --- /dev/null +++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/Configuration.json @@ -0,0 +1,12 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.StandbyPool", + "library-name": "Azure.ResourceManager.StandbyPool", + "flavor": "azure", + "use-model-reader-writer": true, + "shared-source-folders": [ + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared", + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "azure-arm": true +} diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/tsp-location.yaml b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tsp-location.yaml index cb68b5fb577a..20531046ae61 100644 --- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/tsp-location.yaml +++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tsp-location.yaml @@ -1,3 +1,4 @@ -directory: specification\standbypool\StandbyPool.Management -commit: 3519c80fe510a268f6e59a29ccac8a53fdec15b6 -repo: Azure/azure-rest-api-specs \ No newline at end of file +directory: specification/standbypool/StandbyPool.Management +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/tspCodeModel.json b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tspCodeModel.json new file mode 100644 index 000000000000..a364e35b72d6 --- /dev/null +++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tspCodeModel.json @@ -0,0 +1,16301 @@ +{ + "$id": "1", + "Name": "Microsoft.StandbyPool", + "ApiVersions": [ + "2024-03-01", + "2025-03-01" + ], + "Enums": [ + { + "$id": "2", + "kind": "enum", + "name": "PoolContainerGroupState", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolContainerGroupState", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "Running", + "value": "Running", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "The container group is up and running.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "The container group is creating.", + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "The container group is deleting.", + "decorators": [] + } + ], + "namespace": "Microsoft.StandbyPool", + "doc": "The state of the pooled container groups.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "10", + "kind": "enum", + "name": "HealthStateCode", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.HealthStateCode", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "12", + "kind": "enumvalue", + "name": "healthy", + "value": "HealthState/healthy", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "10" + }, + "doc": "StandbyPool is in healthy state.", + "decorators": [] + }, + { + "$id": "14", + "kind": "enumvalue", + "name": "degraded", + "value": "HealthState/degraded", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "10" + }, + "doc": "StandbyPool is in degraded state.", + "decorators": [] + } + ], + "namespace": "Microsoft.StandbyPool", + "doc": "StandbyPool health state.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "16", + "kind": "enum", + "name": "StandbyProvisioningState", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ProvisioningState", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "18", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "16" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "16" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "22", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "16" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + }, + { + "$id": "24", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "16" + }, + "doc": "Resource is being deleted.", + "decorators": [] + } + ], + "namespace": "Microsoft.StandbyPool", + "doc": "Provisioning state", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "26", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "28", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "26" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "26" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "32", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "26" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "34", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "26" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "36", + "kind": "enum", + "name": "StandbyRefillPolicy", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.RefillPolicy", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "38", + "kind": "enumvalue", + "name": "always", + "value": "always", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "36" + }, + "doc": "A refill policy that standby pool is automatically refilled to maintain maxReadyCapacity.", + "decorators": [] + } + ], + "namespace": "Microsoft.StandbyPool", + "doc": "Refill policy of standby pool", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "40", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "42", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "44", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "48", + "kind": "enum", + "name": "PoolVirtualMachineState", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolVirtualMachineState", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "50", + "kind": "enumvalue", + "name": "Running", + "value": "Running", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The virtual machine is up and running.", + "decorators": [] + }, + { + "$id": "52", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The virtual machine is creating.", + "decorators": [] + }, + { + "$id": "54", + "kind": "enumvalue", + "name": "Starting", + "value": "Starting", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The virtual machine is starting.", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The virtual machine is deleting.", + "decorators": [] + }, + { + "$id": "58", + "kind": "enumvalue", + "name": "Deallocated", + "value": "Deallocated", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The virtual machine has released the lease on the underlying hardware and is powered off.", + "decorators": [] + }, + { + "$id": "60", + "kind": "enumvalue", + "name": "Deallocating", + "value": "Deallocating", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The virtual machine is releasing the lease on the underlying hardware and is powered off.", + "decorators": [] + }, + { + "$id": "62", + "kind": "enumvalue", + "name": "Hibernated", + "value": "Hibernated", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The virtual machine has released the lease on the underlying hardware and is powered off. Memory contents of the VM are stored in the OS disk. When started again, applications and processes that were previously running in your VM resume from the state prior to hibernation.", + "decorators": [] + }, + { + "$id": "64", + "kind": "enumvalue", + "name": "Hibernating", + "value": "Hibernating", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "The virtual machine is hibernating.", + "decorators": [] + } + ], + "namespace": "Microsoft.StandbyPool", + "doc": "The state of the pooled virtual machines.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "66", + "kind": "enum", + "name": "StandbyVirtualMachineState", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.VirtualMachineState", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "68", + "kind": "enumvalue", + "name": "Running", + "value": "Running", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "doc": "The virtual machine is up and running.", + "decorators": [] + }, + { + "$id": "70", + "kind": "enumvalue", + "name": "Deallocated", + "value": "Deallocated", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "doc": "The virtual machine has released the lease on the underlying hardware and is powered off.", + "decorators": [] + }, + { + "$id": "72", + "kind": "enumvalue", + "name": "Hibernated", + "value": "Hibernated", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "doc": "The virtual machine has released the lease on the underlying hardware and is powered off. Memory contents of the VM are stored in the OS disk. When started again, applications and processes that were previously running in your VM resume from the state prior to hibernation.", + "decorators": [] + } + ], + "namespace": "Microsoft.StandbyPool", + "doc": "State of standby virtual machines", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "74", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "76", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "74" + }, + "doc": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "78", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "74" + }, + "doc": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "80", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "74" + }, + "doc": "Indicates the operation is initiated by a user or system.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "82", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "84", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "82" + }, + "doc": "Actions are for internal-only APIs.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.CommonTypes", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "86", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.Versions", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "88", + "kind": "enumvalue", + "name": "2024-03-01", + "value": "2024-03-01", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "86" + }, + "doc": "API Version 2024-03-01.", + "decorators": [] + }, + { + "$id": "90", + "kind": "enumvalue", + "name": "2025-03-01", + "value": "2025-03-01", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "86" + }, + "doc": "API Version 2025-03-01.", + "decorators": [] + } + ], + "namespace": "Microsoft.StandbyPool", + "doc": "Supported API Versions for Microsoft.StandbyPool", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "Models": [ + { + "$id": "92", + "kind": "model", + "name": "StandbyContainerGroupPoolRuntimeView", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResource", + "usage": "Output,Json", + "doc": "Contains information about a standby container group pool as last known by the StandbyPool resource provider.", + "decorators": [], + "baseModel": { + "$id": "93", + "kind": "model", + "name": "ProxyResource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ProxyResource", + "usage": "Output,Json", + "doc": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "decorators": [], + "baseModel": { + "$id": "94", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "95", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "type": { + "$id": "96", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", + "serializationOptions": { + "$id": "98", + "json": { + "$id": "99", + "name": "id" + } + } + }, + { + "$id": "100", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name", + "serializationOptions": { + "$id": "102", + "json": { + "$id": "103", + "name": "name" + } + } + }, + { + "$id": "104", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "105", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "106", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type", + "serializationOptions": { + "$id": "107", + "json": { + "$id": "108", + "name": "type" + } + } + }, + { + "$id": "109", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "110", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "111", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy", + "serializationOptions": { + "$id": "113", + "json": { + "$id": "114", + "name": "createdBy" + } + } + }, + { + "$id": "115", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "26" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "116", + "json": { + "$id": "117", + "name": "createdByType" + } + } + }, + { + "$id": "118", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "119", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "120", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt", + "serializationOptions": { + "$id": "121", + "json": { + "$id": "122", + "name": "createdAt" + } + } + }, + { + "$id": "123", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "124", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy", + "serializationOptions": { + "$id": "125", + "json": { + "$id": "126", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "127", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "26" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "128", + "json": { + "$id": "129", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "130", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "131", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "132", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt", + "serializationOptions": { + "$id": "133", + "json": { + "$id": "134", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "135", + "json": { + "$id": "136", + "name": "systemData" + } + } + } + ] + }, + "properties": [] + }, + "properties": [ + { + "$id": "137", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "138", + "kind": "model", + "name": "StandbyContainerGroupPoolRuntimeViewProperties", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResourceProperties", + "usage": "Output,Json", + "doc": "Contains information about a standby pool as last known by the StandbyPool resource provider.", + "decorators": [], + "properties": [ + { + "$id": "139", + "kind": "property", + "name": "instanceCountSummary", + "serializedName": "instanceCountSummary", + "doc": "A list containing the counts of container groups in each possible state, as known by the StandbyPool resource provider.", + "type": { + "$id": "140", + "kind": "array", + "name": "ArrayContainerGroupInstanceCountSummary", + "valueType": { + "$id": "141", + "kind": "model", + "name": "ContainerGroupInstanceCountSummary", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupInstanceCountSummary", + "usage": "Output,Json", + "doc": "Displays the counts of container groups in each state, as known by the StandbyPool resource provider.", + "decorators": [], + "properties": [ + { + "$id": "142", + "kind": "property", + "name": "zone", + "serializedName": "zone", + "doc": "The zone that the provided counts are in. It will not have a value if zones are not enabled.", + "type": { + "$id": "143", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupInstanceCountSummary.zone", + "serializationOptions": { + "$id": "144", + "json": { + "$id": "145", + "name": "zone" + } + } + }, + { + "$id": "146", + "kind": "property", + "name": "instanceCountsByState", + "serializedName": "instanceCountsByState", + "doc": "The count of pooled container groups in each state for the given zone.", + "type": { + "$id": "147", + "kind": "array", + "name": "ArrayPoolContainerGroupStateCount", + "valueType": { + "$id": "148", + "kind": "model", + "name": "PoolContainerGroupStateCount", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolContainerGroupStateCount", + "usage": "Output,Json", + "doc": "Displays the counts of pooled container groups in each state, as known by the StandbyPool resource provider.", + "decorators": [], + "properties": [ + { + "$id": "149", + "kind": "property", + "name": "state", + "serializedName": "state", + "doc": "The state that the pooled container groups count is for.", + "type": { + "$ref": "2" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolContainerGroupStateCount.state", + "serializationOptions": { + "$id": "150", + "json": { + "$id": "151", + "name": "state" + } + } + }, + { + "$id": "152", + "kind": "property", + "name": "count", + "serializedName": "count", + "doc": "The count of pooled container groups in the given state.", + "type": { + "$id": "153", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolContainerGroupStateCount.count", + "serializationOptions": { + "$id": "154", + "json": { + "$id": "155", + "name": "count" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupInstanceCountSummary.instanceCountsByState", + "serializationOptions": { + "$id": "156", + "json": { + "$id": "157", + "name": "instanceCountsByState" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResourceProperties.instanceCountSummary", + "serializationOptions": { + "$id": "158", + "json": { + "$id": "159", + "name": "instanceCountSummary" + } + } + }, + { + "$id": "160", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Display status of the standby pool", + "type": { + "$id": "161", + "kind": "model", + "name": "PoolStatus", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolStatus", + "usage": "Output,Json", + "doc": "Displays StandbyPool status.", + "decorators": [], + "properties": [ + { + "$id": "162", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "Displays the healthy state of the StandbyPool.", + "type": { + "$ref": "10" + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolStatus.code", + "serializationOptions": { + "$id": "163", + "json": { + "$id": "164", + "name": "code" + } + } + }, + { + "$id": "165", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "Displays the StandbyPool health state details.", + "type": { + "$id": "166", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolStatus.message", + "serializationOptions": { + "$id": "167", + "json": { + "$id": "168", + "name": "message" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResourceProperties.status", + "serializationOptions": { + "$id": "169", + "json": { + "$id": "170", + "name": "status" + } + } + }, + { + "$id": "171", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Displays the provisioning state of the standby pool", + "type": { + "$ref": "16" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResourceProperties.provisioningState", + "serializationOptions": { + "$id": "172", + "json": { + "$id": "173", + "name": "provisioningState" + } + } + }, + { + "$id": "174", + "kind": "property", + "name": "prediction", + "serializedName": "prediction", + "doc": "Displays prediction information of the standby pool", + "type": { + "$id": "175", + "kind": "model", + "name": "StandbyContainerGroupPoolPrediction", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolPrediction", + "usage": "Output,Json", + "doc": "Displays prediction information of the standby pool.", + "decorators": [], + "properties": [ + { + "$id": "176", + "kind": "property", + "name": "forecastValues", + "serializedName": "forecastValues", + "doc": "Displays the forecast information of the standby pool.", + "type": { + "$id": "177", + "kind": "model", + "name": "StandbyContainerGroupPoolForecastValues", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolForecastValues", + "usage": "Output,Json", + "doc": "Displays the forecast information of the standby pool.", + "decorators": [], + "properties": [ + { + "$id": "178", + "kind": "property", + "name": "instancesRequestedCount", + "serializedName": "instancesRequestedCount", + "doc": "Displays the predicted count of instances to be requested from the standby pool.", + "type": { + "$id": "179", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "180", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolForecastValues.instancesRequestedCount", + "serializationOptions": { + "$id": "181", + "json": { + "$id": "182", + "name": "instancesRequestedCount" + } + } + } + ] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolPrediction.forecastValues", + "serializationOptions": { + "$id": "183", + "json": { + "$id": "184", + "name": "forecastValues" + } + } + }, + { + "$id": "185", + "kind": "property", + "name": "forecastStartTime", + "serializedName": "forecastStartTime", + "doc": "Displays the UTC timestamp of when the prediction was retrieved for the standby pool.", + "type": { + "$id": "186", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolPrediction.forecastStartTime", + "serializationOptions": { + "$id": "188", + "json": { + "$id": "189", + "name": "forecastStartTime" + } + } + }, + { + "$id": "190", + "kind": "property", + "name": "forecastInfo", + "serializedName": "forecastInfo", + "doc": "Displays additional information for the prediction of the standby pool.", + "type": { + "$id": "191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolPrediction.forecastInfo", + "serializationOptions": { + "$id": "192", + "json": { + "$id": "193", + "name": "forecastInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResourceProperties.prediction", + "serializationOptions": { + "$id": "194", + "json": { + "$id": "195", + "name": "prediction" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResource.properties", + "serializationOptions": { + "$id": "196", + "json": { + "$id": "197", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "138" + }, + { + "$ref": "141" + }, + { + "$ref": "148" + }, + { + "$ref": "161" + }, + { + "$ref": "175" + }, + { + "$ref": "177" + }, + { + "$ref": "93" + }, + { + "$ref": "94" + }, + { + "$ref": "110" + }, + { + "$id": "198", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Error,Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "199", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "200", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "201", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "202", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", + "serializationOptions": { + "$id": "203", + "json": { + "$id": "204", + "name": "code" + } + } + }, + { + "$id": "205", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "206", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", + "serializationOptions": { + "$id": "207", + "json": { + "$id": "208", + "name": "message" + } + } + }, + { + "$id": "209", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "210", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", + "serializationOptions": { + "$id": "211", + "json": { + "$id": "212", + "name": "target" + } + } + }, + { + "$id": "213", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "214", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "200" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "215", + "json": { + "$id": "216", + "name": "details" + } + } + }, + { + "$id": "217", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "218", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "219", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "220", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", + "serializationOptions": { + "$id": "222", + "json": { + "$id": "223", + "name": "type" + } + } + }, + { + "$id": "224", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "225", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Json,Exception,LroPolling", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", + "serializationOptions": { + "$id": "226", + "json": { + "$id": "227", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "228", + "json": { + "$id": "229", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "230", + "json": { + "$id": "231", + "name": "error" + } + } + } + ] + }, + { + "$ref": "200" + }, + { + "$ref": "219" + }, + { + "$ref": "225" + }, + { + "$id": "232", + "kind": "model", + "name": "StandbyContainerGroupPoolRuntimeViewResourceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a StandbyContainerGroupPoolRuntimeViewResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "233", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The StandbyContainerGroupPoolRuntimeViewResource items on this page", + "type": { + "$id": "234", + "kind": "array", + "name": "ArrayStandbyContainerGroupPoolRuntimeViewResource", + "valueType": { + "$ref": "92" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "235", + "json": { + "$id": "236", + "name": "value" + } + } + }, + { + "$id": "237", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "238", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "239", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "240", + "json": { + "$id": "241", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "242", + "kind": "model", + "name": "StandbyContainerGroupPool", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "A StandbyContainerGroupPoolResource.", + "decorators": [], + "baseModel": { + "$id": "243", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$ref": "94" + }, + "properties": [ + { + "$id": "244", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "245", + "kind": "dict", + "keyType": { + "$id": "246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags", + "serializationOptions": { + "$id": "248", + "json": { + "$id": "249", + "name": "tags" + } + } + }, + { + "$id": "250", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "251", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location", + "serializationOptions": { + "$id": "252", + "json": { + "$id": "253", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "254", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "255", + "kind": "model", + "name": "StandbyContainerGroupPoolProperties", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResourceProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Details of the StandbyContainerGroupPool.", + "decorators": [], + "properties": [ + { + "$id": "256", + "kind": "property", + "name": "elasticityProfile", + "serializedName": "elasticityProfile", + "doc": "Specifies elasticity profile of standby container group pools.", + "type": { + "$id": "257", + "kind": "model", + "name": "StandbyContainerGroupPoolElasticityProfile", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolElasticityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the elasticity profile of the standby container group pools.", + "decorators": [], + "properties": [ + { + "$id": "258", + "kind": "property", + "name": "maxReadyCapacity", + "serializedName": "maxReadyCapacity", + "doc": "Specifies maximum number of standby container groups in the standby pool.", + "type": { + "$id": "259", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolElasticityProfile.maxReadyCapacity", + "serializationOptions": { + "$id": "260", + "json": { + "$id": "261", + "name": "maxReadyCapacity" + } + } + }, + { + "$id": "262", + "kind": "property", + "name": "refillPolicy", + "serializedName": "refillPolicy", + "doc": "Specifies refill policy of the pool.", + "type": { + "$ref": "36" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolElasticityProfile.refillPolicy", + "serializationOptions": { + "$id": "263", + "json": { + "$id": "264", + "name": "refillPolicy" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResourceProperties.elasticityProfile", + "serializationOptions": { + "$id": "265", + "json": { + "$id": "266", + "name": "elasticityProfile" + } + } + }, + { + "$id": "267", + "kind": "property", + "name": "containerGroupProperties", + "serializedName": "containerGroupProperties", + "doc": "Specifies container group properties of standby container group pools.", + "type": { + "$id": "268", + "kind": "model", + "name": "StandbyContainerGroupProperties", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Details of the ContainerGroupProperties.", + "decorators": [], + "properties": [ + { + "$id": "269", + "kind": "property", + "name": "containerGroupProfile", + "serializedName": "containerGroupProfile", + "doc": "Specifies container group profile of standby container groups.", + "type": { + "$id": "270", + "kind": "model", + "name": "StandbyContainerGroupProfile", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Details of the ContainerGroupProfile.", + "decorators": [], + "properties": [ + { + "$id": "271", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Specifies container group profile id of standby container groups.", + "type": { + "$id": "272", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupProfile.id", + "serializationOptions": { + "$id": "274", + "json": { + "$id": "275", + "name": "id" + } + } + }, + { + "$id": "276", + "kind": "property", + "name": "revision", + "serializedName": "revision", + "doc": "Specifies revision of container group profile.", + "type": { + "$id": "277", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupProfile.revision", + "serializationOptions": { + "$id": "278", + "json": { + "$id": "279", + "name": "revision" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupProperties.containerGroupProfile", + "serializationOptions": { + "$id": "280", + "json": { + "$id": "281", + "name": "containerGroupProfile" + } + } + }, + { + "$id": "282", + "kind": "property", + "name": "subnetIds", + "serializedName": "subnetIds", + "doc": "Specifies subnet Ids for container group.", + "type": { + "$id": "283", + "kind": "array", + "name": "ArraySubnet", + "valueType": { + "$id": "284", + "kind": "model", + "name": "Subnet", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.Subnet", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Subnet of container group", + "decorators": [], + "properties": [ + { + "$id": "285", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Specifies ARM resource id of the subnet.", + "type": { + "$id": "286", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.Subnet.id", + "serializationOptions": { + "$id": "288", + "json": { + "$id": "289", + "name": "id" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupProperties.subnetIds", + "serializationOptions": { + "$id": "290", + "json": { + "$id": "291", + "name": "subnetIds" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResourceProperties.containerGroupProperties", + "serializationOptions": { + "$id": "292", + "json": { + "$id": "293", + "name": "containerGroupProperties" + } + } + }, + { + "$id": "294", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "Specifies zones of standby container group pools.", + "type": { + "$id": "295", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "296", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResourceProperties.zones", + "serializationOptions": { + "$id": "297", + "json": { + "$id": "298", + "name": "zones" + } + } + }, + { + "$id": "299", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "16" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResourceProperties.provisioningState", + "serializationOptions": { + "$id": "300", + "json": { + "$id": "301", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResource.properties", + "serializationOptions": { + "$id": "302", + "json": { + "$id": "303", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "255" + }, + { + "$ref": "257" + }, + { + "$ref": "268" + }, + { + "$ref": "270" + }, + { + "$ref": "284" + }, + { + "$ref": "243" + }, + { + "$id": "304", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "305", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "40" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "306", + "json": { + "$id": "307", + "name": "status" + } + } + }, + { + "$id": "308", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "310", + "json": { + "$id": "311", + "name": "name" + } + } + }, + { + "$id": "312", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "313", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "314", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", + "serializationOptions": { + "$id": "315", + "json": { + "$id": "316", + "name": "startTime" + } + } + }, + { + "$id": "317", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "318", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", + "serializationOptions": { + "$id": "320", + "json": { + "$id": "321", + "name": "endTime" + } + } + }, + { + "$id": "322", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "323", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "324", + "json": { + "$id": "325", + "name": "percentComplete" + } + } + }, + { + "$id": "326", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "200" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "327", + "json": { + "$id": "328", + "name": "error" + } + } + } + ] + }, + { + "$id": "329", + "kind": "model", + "name": "StandbyContainerGroupPoolResourceUpdate", + "namespace": "Azure.ResourceManager.Foundations", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the StandbyContainerGroupPoolResource.", + "decorators": [], + "properties": [ + { + "$id": "330", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "331", + "kind": "dict", + "keyType": { + "$id": "332", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.tags", + "serializationOptions": { + "$id": "334", + "json": { + "$id": "335", + "name": "tags" + } + } + }, + { + "$id": "336", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "337", + "kind": "model", + "name": "StandbyContainerGroupPoolResourceUpdateProperties", + "namespace": "Azure.ResourceManager.Foundations", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the StandbyContainerGroupPoolResource.", + "decorators": [], + "properties": [ + { + "$id": "338", + "kind": "property", + "name": "elasticityProfile", + "serializedName": "elasticityProfile", + "doc": "Specifies elasticity profile of standby container group pools.", + "type": { + "$ref": "257" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.elasticityProfile", + "serializationOptions": { + "$id": "339", + "json": { + "$id": "340", + "name": "elasticityProfile" + } + } + }, + { + "$id": "341", + "kind": "property", + "name": "containerGroupProperties", + "serializedName": "containerGroupProperties", + "doc": "Specifies container group properties of standby container group pools.", + "type": { + "$ref": "268" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.containerGroupProperties", + "serializationOptions": { + "$id": "342", + "json": { + "$id": "343", + "name": "containerGroupProperties" + } + } + }, + { + "$id": "344", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "Specifies zones of standby container group pools.", + "type": { + "$id": "345", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "346", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.zones", + "serializationOptions": { + "$id": "347", + "json": { + "$id": "348", + "name": "zones" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "349", + "json": { + "$id": "350", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "337" + }, + { + "$id": "351", + "kind": "model", + "name": "StandbyContainerGroupPoolResourceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a StandbyContainerGroupPoolResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "352", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The StandbyContainerGroupPoolResource items on this page", + "type": { + "$id": "353", + "kind": "array", + "name": "ArrayStandbyContainerGroupPoolResource", + "valueType": { + "$ref": "242" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "354", + "json": { + "$id": "355", + "name": "value" + } + } + }, + { + "$id": "356", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "357", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "358", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "359", + "json": { + "$id": "360", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "361", + "kind": "model", + "name": "StandbyVirtualMachinePoolRuntimeView", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResource", + "usage": "Output,Json", + "doc": "Contains information about a standby virtual machine pool as last known by the StandbyPool resource provider.", + "decorators": [], + "baseModel": { + "$ref": "93" + }, + "properties": [ + { + "$id": "362", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "363", + "kind": "model", + "name": "StandbyVirtualMachinePoolRuntimeViewProperties", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResourceProperties", + "usage": "Output,Json", + "doc": "Contains information about a standby pool as last known by the StandbyPool resource provider.", + "decorators": [], + "properties": [ + { + "$id": "364", + "kind": "property", + "name": "instanceCountSummary", + "serializedName": "instanceCountSummary", + "doc": "A list containing the counts of virtual machines in each possible power state for each zone if enabled, as known by the StandbyPool resource provider. If zones are not enabled on the attached VMSS, the list will contain a single entry without zone values. Note: any resources in the Running state may still be installing extensions / not fully provisioned.", + "type": { + "$id": "365", + "kind": "array", + "name": "ArrayVirtualMachineInstanceCountSummary", + "valueType": { + "$id": "366", + "kind": "model", + "name": "StandbyVirtualMachineInstanceCountSummary", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.VirtualMachineInstanceCountSummary", + "usage": "Output,Json", + "doc": "Contains the counts of VMs in each power state in a given zone, fault domain, as known by the StandbyPool resource provider. Note: any resources in the Running state may still be installing extensions / not fully provisioned.", + "decorators": [], + "properties": [ + { + "$id": "367", + "kind": "property", + "name": "zone", + "serializedName": "zone", + "doc": "The zone that the provided counts are in. It will not have a value if zones are not enabled on the attached VMSS.", + "type": { + "$id": "368", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.VirtualMachineInstanceCountSummary.zone", + "serializationOptions": { + "$id": "369", + "json": { + "$id": "370", + "name": "zone" + } + } + }, + { + "$id": "371", + "kind": "property", + "name": "instanceCountsByState", + "serializedName": "instanceCountsByState", + "doc": "The count of pooled virtual machines in each state for the given zone.", + "type": { + "$id": "372", + "kind": "array", + "name": "ArrayPoolVirtualMachineStateCount", + "valueType": { + "$id": "373", + "kind": "model", + "name": "PoolVirtualMachineStateCount", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolVirtualMachineStateCount", + "usage": "Output,Json", + "doc": "Displays the counts of pooled virtual machines in each state, as known by the StandbyPool resource provider.", + "decorators": [], + "properties": [ + { + "$id": "374", + "kind": "property", + "name": "state", + "serializedName": "state", + "doc": "The state that the pooled virtual machines count is for.", + "type": { + "$ref": "48" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolVirtualMachineStateCount.state", + "serializationOptions": { + "$id": "375", + "json": { + "$id": "376", + "name": "state" + } + } + }, + { + "$id": "377", + "kind": "property", + "name": "count", + "serializedName": "count", + "doc": "The count of pooled virtual machines in the given state.", + "type": { + "$id": "378", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolVirtualMachineStateCount.count", + "serializationOptions": { + "$id": "379", + "json": { + "$id": "380", + "name": "count" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.VirtualMachineInstanceCountSummary.instanceCountsByState", + "serializationOptions": { + "$id": "381", + "json": { + "$id": "382", + "name": "instanceCountsByState" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResourceProperties.instanceCountSummary", + "serializationOptions": { + "$id": "383", + "json": { + "$id": "384", + "name": "instanceCountSummary" + } + } + }, + { + "$id": "385", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Display status of the standby pool", + "type": { + "$ref": "161" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResourceProperties.status", + "serializationOptions": { + "$id": "386", + "json": { + "$id": "387", + "name": "status" + } + } + }, + { + "$id": "388", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Displays the provisioning state of the standby pool", + "type": { + "$ref": "16" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResourceProperties.provisioningState", + "serializationOptions": { + "$id": "389", + "json": { + "$id": "390", + "name": "provisioningState" + } + } + }, + { + "$id": "391", + "kind": "property", + "name": "prediction", + "serializedName": "prediction", + "doc": "Displays prediction information of the standby pool", + "type": { + "$id": "392", + "kind": "model", + "name": "StandbyVirtualMachinePoolPrediction", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolPrediction", + "usage": "Output,Json", + "doc": "Displays prediction information of the standby pool.", + "decorators": [], + "properties": [ + { + "$id": "393", + "kind": "property", + "name": "forecastValues", + "serializedName": "forecastValues", + "doc": "Displays the forecast information of the standby pool.", + "type": { + "$id": "394", + "kind": "model", + "name": "StandbyVirtualMachinePoolForecastValues", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolForecastValues", + "usage": "Output,Json", + "doc": "Displays the forecast information of the standby pool.", + "decorators": [], + "properties": [ + { + "$id": "395", + "kind": "property", + "name": "instancesRequestedCount", + "serializedName": "instancesRequestedCount", + "doc": "Displays the predicted count of instances to be requested from the standby pool.", + "type": { + "$id": "396", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "397", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolForecastValues.instancesRequestedCount", + "serializationOptions": { + "$id": "398", + "json": { + "$id": "399", + "name": "instancesRequestedCount" + } + } + } + ] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolPrediction.forecastValues", + "serializationOptions": { + "$id": "400", + "json": { + "$id": "401", + "name": "forecastValues" + } + } + }, + { + "$id": "402", + "kind": "property", + "name": "forecastStartTime", + "serializedName": "forecastStartTime", + "doc": "Displays the UTC timestamp of when the prediction was retrieved for the standby pool.", + "type": { + "$id": "403", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "404", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolPrediction.forecastStartTime", + "serializationOptions": { + "$id": "405", + "json": { + "$id": "406", + "name": "forecastStartTime" + } + } + }, + { + "$id": "407", + "kind": "property", + "name": "forecastInfo", + "serializedName": "forecastInfo", + "doc": "Displays additional information for the prediction of the standby pool.", + "type": { + "$id": "408", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolPrediction.forecastInfo", + "serializationOptions": { + "$id": "409", + "json": { + "$id": "410", + "name": "forecastInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResourceProperties.prediction", + "serializationOptions": { + "$id": "411", + "json": { + "$id": "412", + "name": "prediction" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResource.properties", + "serializationOptions": { + "$id": "413", + "json": { + "$id": "414", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "363" + }, + { + "$ref": "366" + }, + { + "$ref": "373" + }, + { + "$ref": "392" + }, + { + "$ref": "394" + }, + { + "$id": "415", + "kind": "model", + "name": "StandbyVirtualMachinePoolRuntimeViewResourceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a StandbyVirtualMachinePoolRuntimeViewResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "416", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The StandbyVirtualMachinePoolRuntimeViewResource items on this page", + "type": { + "$id": "417", + "kind": "array", + "name": "ArrayStandbyVirtualMachinePoolRuntimeViewResource", + "valueType": { + "$ref": "361" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "418", + "json": { + "$id": "419", + "name": "value" + } + } + }, + { + "$id": "420", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "421", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "422", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "423", + "json": { + "$id": "424", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "425", + "kind": "model", + "name": "StandbyVirtualMachine", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachineResource", + "usage": "Output,Json", + "doc": "Concrete proxy resource types can be created by aliasing this type using a specific property type.", + "decorators": [], + "baseModel": { + "$ref": "93" + }, + "properties": [ + { + "$id": "426", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "427", + "kind": "model", + "name": "StandbyVirtualMachineProperties", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachineResourceProperties", + "usage": "Output,Json", + "doc": "Details of the StandbyVirtualMachine.", + "decorators": [], + "properties": [ + { + "$id": "428", + "kind": "property", + "name": "virtualMachineResourceId", + "serializedName": "virtualMachineResourceId", + "doc": "Resource id of the virtual machine.", + "type": { + "$id": "429", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "430", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachineResourceProperties.virtualMachineResourceId", + "serializationOptions": { + "$id": "431", + "json": { + "$id": "432", + "name": "virtualMachineResourceId" + } + } + }, + { + "$id": "433", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "16" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachineResourceProperties.provisioningState", + "serializationOptions": { + "$id": "434", + "json": { + "$id": "435", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachineResource.properties", + "serializationOptions": { + "$id": "436", + "json": { + "$id": "437", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "427" + }, + { + "$id": "438", + "kind": "model", + "name": "StandbyVirtualMachineResourceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a StandbyVirtualMachineResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "439", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The StandbyVirtualMachineResource items on this page", + "type": { + "$id": "440", + "kind": "array", + "name": "ArrayStandbyVirtualMachineResource", + "valueType": { + "$ref": "425" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "441", + "json": { + "$id": "442", + "name": "value" + } + } + }, + { + "$id": "443", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "444", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "445", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "446", + "json": { + "$id": "447", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "448", + "kind": "model", + "name": "StandbyVirtualMachinePool", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "A StandbyVirtualMachinePoolResource.", + "decorators": [], + "baseModel": { + "$ref": "243" + }, + "properties": [ + { + "$id": "449", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "450", + "kind": "model", + "name": "StandbyVirtualMachinePoolProperties", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResourceProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Details of the StandbyVirtualMachinePool.", + "decorators": [], + "properties": [ + { + "$id": "451", + "kind": "property", + "name": "elasticityProfile", + "serializedName": "elasticityProfile", + "doc": "Specifies the elasticity profile of the standby virtual machine pools.", + "type": { + "$id": "452", + "kind": "model", + "name": "StandbyVirtualMachinePoolElasticityProfile", + "namespace": "Microsoft.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolElasticityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Details of the elasticity profile.", + "decorators": [], + "properties": [ + { + "$id": "453", + "kind": "property", + "name": "maxReadyCapacity", + "serializedName": "maxReadyCapacity", + "doc": "Specifies the maximum number of virtual machines in the standby virtual machine pool.", + "type": { + "$id": "454", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolElasticityProfile.maxReadyCapacity", + "serializationOptions": { + "$id": "455", + "json": { + "$id": "456", + "name": "maxReadyCapacity" + } + } + }, + { + "$id": "457", + "kind": "property", + "name": "minReadyCapacity", + "serializedName": "minReadyCapacity", + "doc": "Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity.", + "type": { + "$id": "458", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolElasticityProfile.minReadyCapacity", + "serializationOptions": { + "$id": "459", + "json": { + "$id": "460", + "name": "minReadyCapacity" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResourceProperties.elasticityProfile", + "serializationOptions": { + "$id": "461", + "json": { + "$id": "462", + "name": "elasticityProfile" + } + } + }, + { + "$id": "463", + "kind": "property", + "name": "virtualMachineState", + "serializedName": "virtualMachineState", + "doc": "Specifies the desired state of virtual machines in the pool.", + "type": { + "$ref": "66" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResourceProperties.virtualMachineState", + "serializationOptions": { + "$id": "464", + "json": { + "$id": "465", + "name": "virtualMachineState" + } + } + }, + { + "$id": "466", + "kind": "property", + "name": "attachedVirtualMachineScaleSetId", + "serializedName": "attachedVirtualMachineScaleSetId", + "doc": "Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to.", + "type": { + "$id": "467", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "468", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResourceProperties.attachedVirtualMachineScaleSetId", + "serializationOptions": { + "$id": "469", + "json": { + "$id": "470", + "name": "attachedVirtualMachineScaleSetId" + } + } + }, + { + "$id": "471", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "16" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResourceProperties.provisioningState", + "serializationOptions": { + "$id": "472", + "json": { + "$id": "473", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResource.properties", + "serializationOptions": { + "$id": "474", + "json": { + "$id": "475", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "450" + }, + { + "$ref": "452" + }, + { + "$id": "476", + "kind": "model", + "name": "StandbyVirtualMachinePoolResourceUpdate", + "namespace": "Azure.ResourceManager.Foundations", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the StandbyVirtualMachinePoolResource.", + "decorators": [], + "properties": [ + { + "$id": "477", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "478", + "kind": "dict", + "keyType": { + "$id": "479", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "480", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.tags", + "serializationOptions": { + "$id": "481", + "json": { + "$id": "482", + "name": "tags" + } + } + }, + { + "$id": "483", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "484", + "kind": "model", + "name": "StandbyVirtualMachinePoolResourceUpdateProperties", + "namespace": "Azure.ResourceManager.Foundations", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the StandbyVirtualMachinePoolResource.", + "decorators": [], + "properties": [ + { + "$id": "485", + "kind": "property", + "name": "elasticityProfile", + "serializedName": "elasticityProfile", + "doc": "Specifies the elasticity profile of the standby virtual machine pools.", + "type": { + "$ref": "452" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.elasticityProfile", + "serializationOptions": { + "$id": "486", + "json": { + "$id": "487", + "name": "elasticityProfile" + } + } + }, + { + "$id": "488", + "kind": "property", + "name": "virtualMachineState", + "serializedName": "virtualMachineState", + "doc": "Specifies the desired state of virtual machines in the pool.", + "type": { + "$ref": "66" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.virtualMachineState", + "serializationOptions": { + "$id": "489", + "json": { + "$id": "490", + "name": "virtualMachineState" + } + } + }, + { + "$id": "491", + "kind": "property", + "name": "attachedVirtualMachineScaleSetId", + "serializedName": "attachedVirtualMachineScaleSetId", + "doc": "Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to.", + "type": { + "$id": "492", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.attachedVirtualMachineScaleSetId", + "serializationOptions": { + "$id": "494", + "json": { + "$id": "495", + "name": "attachedVirtualMachineScaleSetId" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "496", + "json": { + "$id": "497", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "484" + }, + { + "$id": "498", + "kind": "model", + "name": "StandbyVirtualMachinePoolResourceListResult", + "namespace": "Azure.ResourceManager", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a StandbyVirtualMachinePoolResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "499", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The StandbyVirtualMachinePoolResource items on this page", + "type": { + "$id": "500", + "kind": "array", + "name": "ArrayStandbyVirtualMachinePoolResource", + "valueType": { + "$ref": "448" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "501", + "json": { + "$id": "502", + "name": "value" + } + } + }, + { + "$id": "503", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "504", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "505", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "506", + "json": { + "$id": "507", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "508", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult", + "usage": "Output,Json", + "doc": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "decorators": [], + "properties": [ + { + "$id": "509", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "510", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "511", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation", + "usage": "Output,Json", + "doc": "Details of a REST API operation, returned from the Resource Provider Operations API", + "decorators": [], + "properties": [ + { + "$id": "512", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": { + "$id": "513", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name", + "serializationOptions": { + "$id": "514", + "json": { + "$id": "515", + "name": "name" + } + } + }, + { + "$id": "516", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.", + "type": { + "$id": "517", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction", + "serializationOptions": { + "$id": "518", + "json": { + "$id": "519", + "name": "isDataAction" + } + } + }, + { + "$id": "520", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "521", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.CommonTypes", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "522", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": { + "$id": "523", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider", + "serializationOptions": { + "$id": "524", + "json": { + "$id": "525", + "name": "provider" + } + } + }, + { + "$id": "526", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": { + "$id": "527", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource", + "serializationOptions": { + "$id": "528", + "json": { + "$id": "529", + "name": "resource" + } + } + }, + { + "$id": "530", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": { + "$id": "531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation", + "serializationOptions": { + "$id": "532", + "json": { + "$id": "533", + "name": "operation" + } + } + }, + { + "$id": "534", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "535", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description", + "serializationOptions": { + "$id": "536", + "json": { + "$id": "537", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "538", + "json": { + "$id": "539", + "name": "display" + } + } + }, + { + "$id": "540", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": { + "$ref": "74" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin", + "serializationOptions": { + "$id": "541", + "json": { + "$id": "542", + "name": "origin" + } + } + }, + { + "$id": "543", + "kind": "property", + "name": "actionType", + "serializedName": "actionType", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": { + "$ref": "82" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType", + "serializationOptions": { + "$id": "544", + "json": { + "$id": "545", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "546", + "json": { + "$id": "547", + "name": "value" + } + } + }, + { + "$id": "548", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "549", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "550", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.nextLink", + "serializationOptions": { + "$id": "551", + "json": { + "$id": "552", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "511" + }, + { + "$ref": "521" + } + ], + "Clients": [ + { + "$id": "553", + "Name": "StandbyPoolClient", + "Namespace": "Microsoft.StandbyPool", + "Operations": [], + "Protocol": { + "$id": "554" + }, + "Parameters": [ + { + "$id": "555", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "556", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "557", + "Type": { + "$id": "558", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.StandbyPool" + }, + { + "$id": "559", + "Name": "Operations", + "Namespace": "Microsoft.StandbyPool", + "Operations": [ + { + "$id": "560", + "Name": "list", + "ResourceName": "Operations", + "Doc": "List the operations for the provider", + "Accessibility": "internal", + "Parameters": [ + { + "$id": "561", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "563", + "Type": { + "$id": "564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "565", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "566", + "kind": "constant", + "valueType": { + "$id": "567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "568", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "508" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/providers/Microsoft.StandbyPool/operations", + "BufferResponse": true, + "Paging": { + "$id": "569", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "570", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "Decorators": [], + "Examples": [ + { + "$id": "571", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2025-03-01/Operations_List.json", + "parameters": [ + { + "$id": "572", + "parameter": { + "$ref": "561" + }, + "value": { + "$id": "573", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "2025-03-01" + } + } + ], + "responses": [ + { + "$id": "574", + "response": { + "$ref": "568" + }, + "statusCode": 200, + "bodyValue": { + "$id": "575", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "576", + "value": { + "$id": "577", + "kind": "array", + "type": { + "$ref": "510" + }, + "value": [ + { + "$id": "578", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "579", + "name": { + "$id": "580", + "kind": "string", + "type": { + "$ref": "513" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools/write" + }, + "isDataAction": { + "$id": "581", + "kind": "boolean", + "type": { + "$ref": "517" + }, + "value": true + }, + "display": { + "$id": "582", + "kind": "model", + "type": { + "$ref": "521" + }, + "value": { + "$id": "583", + "provider": { + "$id": "584", + "kind": "string", + "type": { + "$ref": "523" + }, + "value": "Microsoft.StandbyPool" + }, + "resource": { + "$id": "585", + "kind": "string", + "type": { + "$ref": "527" + }, + "value": "standbyContainerGroupPools" + }, + "operation": { + "$id": "586", + "kind": "string", + "type": { + "$ref": "531" + }, + "value": "StandbyContainerGroupPools_Create" + }, + "description": { + "$id": "587", + "kind": "string", + "type": { + "$ref": "535" + }, + "value": "Create a StandbyContainerGroupPools Resource" + } + } + }, + "origin": { + "$id": "588", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "user" + }, + "actionType": { + "$id": "589", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Internal" + } + } + } + ] + }, + "nextLink": { + "$id": "590", + "kind": "string", + "type": { + "$ref": "549" + }, + "value": "https://example.com/providers/Microsoft.StandbyPool/operations" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "591" + }, + "Parent": "StandbyPoolClient", + "Parameters": [ + { + "$id": "592", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "593", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "594", + "Type": { + "$id": "595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.Operations" + }, + { + "$id": "596", + "Name": "StandbyVirtualMachinePools", + "Namespace": "Microsoft.StandbyPool", + "Operations": [ + { + "$id": "597", + "Name": "get", + "ResourceName": "StandbyVirtualMachinePoolResource", + "Doc": "Get a StandbyVirtualMachinePoolResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "598", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "600", + "Type": { + "$id": "601", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "602", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "603", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "605", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "606", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "607", + "Name": "standbyVirtualMachinePoolName", + "NameInRequest": "standbyVirtualMachinePoolName", + "Doc": "Name of the standby virtual machine pool", + "Type": { + "$id": "608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "609", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "610", + "kind": "constant", + "valueType": { + "$id": "611", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "612", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "448" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.get", + "Decorators": [], + "Examples": [ + { + "$id": "613", + "kind": "http", + "name": "StandbyVirtualMachinePools_Get", + "description": "StandbyVirtualMachinePools_Get", + "filePath": "2025-03-01/StandbyVirtualMachinePools_Get.json", + "parameters": [ + { + "$id": "614", + "parameter": { + "$ref": "598" + }, + "value": { + "$id": "615", + "kind": "string", + "type": { + "$ref": "599" + }, + "value": "2025-03-01" + } + }, + { + "$id": "616", + "parameter": { + "$ref": "602" + }, + "value": { + "$id": "617", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "618", + "parameter": { + "$ref": "605" + }, + "value": { + "$id": "619", + "kind": "string", + "type": { + "$ref": "606" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "620", + "parameter": { + "$ref": "607" + }, + "value": { + "$id": "621", + "kind": "string", + "type": { + "$ref": "608" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "622", + "response": { + "$ref": "612" + }, + "statusCode": 200, + "bodyValue": { + "$id": "623", + "kind": "model", + "type": { + "$ref": "448" + }, + "value": { + "$id": "624", + "properties": { + "$id": "625", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "626", + "elasticityProfile": { + "$id": "627", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "628", + "maxReadyCapacity": { + "$id": "629", + "kind": "number", + "type": { + "$ref": "454" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "630", + "kind": "number", + "type": { + "$ref": "458" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "631", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "632", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "633", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "634", + "kind": "dict", + "type": { + "$ref": "245" + }, + "value": { + "$id": "635" + } + }, + "location": { + "$id": "636", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "West US" + }, + "id": { + "$id": "637", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "638", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "639", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "640", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "641", + "createdBy": { + "$id": "642", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "643", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "644", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "645", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "646", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "647", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "648", + "Name": "createOrUpdate", + "ResourceName": "StandbyVirtualMachinePoolResource", + "Doc": "Create a StandbyVirtualMachinePoolResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "649", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "650", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "651", + "Type": { + "$id": "652", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "653", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "654", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "656", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "657", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "658", + "Name": "standbyVirtualMachinePoolName", + "NameInRequest": "standbyVirtualMachinePoolName", + "Doc": "Name of the standby virtual machine pool", + "Type": { + "$id": "659", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "660", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "661", + "kind": "constant", + "valueType": { + "$id": "662", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "663", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "664", + "kind": "constant", + "valueType": { + "$id": "665", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "666", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "448" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "667", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "448" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "668", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "448" + }, + "Headers": [ + { + "$id": "669", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "670", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "671", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "672", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "448" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.createOrUpdate", + "Decorators": [ + { + "$id": "673", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "674", + "finalState": "azure-async-operation" + } + } + ], + "Examples": [ + { + "$id": "675", + "kind": "http", + "name": "StandbyVirtualMachinePools_CreateOrUpdate", + "description": "StandbyVirtualMachinePools_CreateOrUpdate", + "filePath": "2025-03-01/StandbyVirtualMachinePools_CreateOrUpdate.json", + "parameters": [ + { + "$id": "676", + "parameter": { + "$ref": "649" + }, + "value": { + "$id": "677", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "2025-03-01" + } + }, + { + "$id": "678", + "parameter": { + "$ref": "653" + }, + "value": { + "$id": "679", + "kind": "string", + "type": { + "$ref": "654" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "680", + "parameter": { + "$ref": "656" + }, + "value": { + "$id": "681", + "kind": "string", + "type": { + "$ref": "657" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "682", + "parameter": { + "$ref": "658" + }, + "value": { + "$id": "683", + "kind": "string", + "type": { + "$ref": "659" + }, + "value": "pool" + } + }, + { + "$id": "684", + "parameter": { + "$ref": "666" + }, + "value": { + "$id": "685", + "kind": "model", + "type": { + "$ref": "448" + }, + "value": { + "$id": "686", + "properties": { + "$id": "687", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "688", + "elasticityProfile": { + "$id": "689", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "690", + "maxReadyCapacity": { + "$id": "691", + "kind": "number", + "type": { + "$ref": "454" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "692", + "kind": "number", + "type": { + "$ref": "458" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "693", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "694", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + } + } + }, + "tags": { + "$id": "695", + "kind": "dict", + "type": { + "$ref": "245" + }, + "value": { + "$id": "696" + } + }, + "location": { + "$id": "697", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "West US" + } + } + } + } + ], + "responses": [ + { + "$id": "698", + "response": { + "$ref": "667" + }, + "statusCode": 200, + "bodyValue": { + "$id": "699", + "kind": "model", + "type": { + "$ref": "448" + }, + "value": { + "$id": "700", + "properties": { + "$id": "701", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "702", + "elasticityProfile": { + "$id": "703", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "704", + "maxReadyCapacity": { + "$id": "705", + "kind": "number", + "type": { + "$ref": "454" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "706", + "kind": "number", + "type": { + "$ref": "458" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "707", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "708", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "709", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "710", + "kind": "dict", + "type": { + "$ref": "245" + }, + "value": { + "$id": "711" + } + }, + "location": { + "$id": "712", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "West US" + }, + "id": { + "$id": "713", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "714", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "715", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "716", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "717", + "createdBy": { + "$id": "718", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "719", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "720", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "721", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "722", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "723", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + }, + { + "$id": "724", + "response": { + "$ref": "668" + }, + "statusCode": 201, + "bodyValue": { + "$id": "725", + "kind": "model", + "type": { + "$ref": "448" + }, + "value": { + "$id": "726", + "properties": { + "$id": "727", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "728", + "elasticityProfile": { + "$id": "729", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "730", + "maxReadyCapacity": { + "$id": "731", + "kind": "number", + "type": { + "$ref": "454" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "732", + "kind": "number", + "type": { + "$ref": "458" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "733", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "734", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "735", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "736", + "kind": "dict", + "type": { + "$ref": "245" + }, + "value": { + "$id": "737" + } + }, + "location": { + "$id": "738", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "West US" + }, + "id": { + "$id": "739", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "740", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "741", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "742", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "743", + "createdBy": { + "$id": "744", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "745", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "746", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "747", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "748", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "749", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "750", + "Name": "delete", + "ResourceName": "StandbyVirtualMachinePoolResource", + "Doc": "Delete a StandbyVirtualMachinePoolResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "751", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "752", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "753", + "Type": { + "$id": "754", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "755", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "756", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "757", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "758", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "759", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "760", + "Name": "standbyVirtualMachinePoolName", + "NameInRequest": "standbyVirtualMachinePoolName", + "Doc": "Name of the standby virtual machine pool", + "Type": { + "$id": "761", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "762", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "763", + "kind": "constant", + "valueType": { + "$id": "764", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "765", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "766", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "767", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "768", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "769", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "770", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", + "BufferResponse": true, + "LongRunning": { + "$id": "771", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "772", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.delete", + "Decorators": [], + "Examples": [ + { + "$id": "773", + "kind": "http", + "name": "StandbyVirtualMachinePools_Delete", + "description": "StandbyVirtualMachinePools_Delete", + "filePath": "2025-03-01/StandbyVirtualMachinePools_Delete.json", + "parameters": [ + { + "$id": "774", + "parameter": { + "$ref": "751" + }, + "value": { + "$id": "775", + "kind": "string", + "type": { + "$ref": "752" + }, + "value": "2025-03-01" + } + }, + { + "$id": "776", + "parameter": { + "$ref": "755" + }, + "value": { + "$id": "777", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "778", + "parameter": { + "$ref": "758" + }, + "value": { + "$id": "779", + "kind": "string", + "type": { + "$ref": "759" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "780", + "parameter": { + "$ref": "760" + }, + "value": { + "$id": "781", + "kind": "string", + "type": { + "$ref": "761" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "782", + "response": { + "$ref": "765" + }, + "statusCode": 202 + }, + { + "$id": "783", + "response": { + "$ref": "770" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "784", + "Name": "update", + "ResourceName": "StandbyVirtualMachinePoolResource", + "Doc": "Update a StandbyVirtualMachinePoolResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "785", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "786", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "787", + "Type": { + "$id": "788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "789", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "790", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "791", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "792", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "793", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "794", + "Name": "standbyVirtualMachinePoolName", + "NameInRequest": "standbyVirtualMachinePoolName", + "Doc": "Name of the standby virtual machine pool", + "Type": { + "$id": "795", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "796", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "797", + "kind": "constant", + "valueType": { + "$id": "798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "799", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "800", + "kind": "constant", + "valueType": { + "$id": "801", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "802", + "Name": "properties", + "NameInRequest": "properties", + "Doc": "The resource properties to be updated.", + "Type": { + "$ref": "476" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "803", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "448" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.update", + "Decorators": [], + "Examples": [ + { + "$id": "804", + "kind": "http", + "name": "StandbyVirtualMachinePools_Update", + "description": "StandbyVirtualMachinePools_Update", + "filePath": "2025-03-01/StandbyVirtualMachinePools_Update.json", + "parameters": [ + { + "$id": "805", + "parameter": { + "$ref": "785" + }, + "value": { + "$id": "806", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "2025-03-01" + } + }, + { + "$id": "807", + "parameter": { + "$ref": "789" + }, + "value": { + "$id": "808", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "809", + "parameter": { + "$ref": "792" + }, + "value": { + "$id": "810", + "kind": "string", + "type": { + "$ref": "793" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "811", + "parameter": { + "$ref": "794" + }, + "value": { + "$id": "812", + "kind": "string", + "type": { + "$ref": "795" + }, + "value": "pool" + } + }, + { + "$id": "813", + "parameter": { + "$ref": "802" + }, + "value": { + "$id": "814", + "kind": "model", + "type": { + "$ref": "476" + }, + "value": { + "$id": "815", + "tags": { + "$id": "816", + "kind": "dict", + "type": { + "$ref": "478" + }, + "value": { + "$id": "817" + } + }, + "properties": { + "$id": "818", + "kind": "model", + "type": { + "$ref": "484" + }, + "value": { + "$id": "819", + "elasticityProfile": { + "$id": "820", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "821", + "maxReadyCapacity": { + "$id": "822", + "kind": "number", + "type": { + "$ref": "454" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "823", + "kind": "number", + "type": { + "$ref": "458" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "824", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "825", + "kind": "string", + "type": { + "$ref": "492" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "826", + "response": { + "$ref": "803" + }, + "statusCode": 200, + "bodyValue": { + "$id": "827", + "kind": "model", + "type": { + "$ref": "448" + }, + "value": { + "$id": "828", + "properties": { + "$id": "829", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "830", + "elasticityProfile": { + "$id": "831", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "832", + "maxReadyCapacity": { + "$id": "833", + "kind": "number", + "type": { + "$ref": "454" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "834", + "kind": "number", + "type": { + "$ref": "458" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "835", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "836", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "837", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "838", + "kind": "dict", + "type": { + "$ref": "245" + }, + "value": { + "$id": "839" + } + }, + "location": { + "$id": "840", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "West US" + }, + "id": { + "$id": "841", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "842", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "843", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "844", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "845", + "createdBy": { + "$id": "846", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "847", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "848", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "849", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "850", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "851", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "852", + "Name": "listByResourceGroup", + "ResourceName": "StandbyVirtualMachinePoolResource", + "Doc": "List StandbyVirtualMachinePoolResource resources by resource group", + "Accessibility": "public", + "Parameters": [ + { + "$id": "853", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "854", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "855", + "Type": { + "$id": "856", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "857", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "858", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "859", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "860", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "861", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "862", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "863", + "kind": "constant", + "valueType": { + "$id": "864", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "865", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "498" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools", + "BufferResponse": true, + "Paging": { + "$id": "866", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "867", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "868", + "kind": "http", + "name": "StandbyVirtualMachinePools_ListByResourceGroup", + "description": "StandbyVirtualMachinePools_ListByResourceGroup", + "filePath": "2025-03-01/StandbyVirtualMachinePools_ListByResourceGroup.json", + "parameters": [ + { + "$id": "869", + "parameter": { + "$ref": "853" + }, + "value": { + "$id": "870", + "kind": "string", + "type": { + "$ref": "854" + }, + "value": "2025-03-01" + } + }, + { + "$id": "871", + "parameter": { + "$ref": "857" + }, + "value": { + "$id": "872", + "kind": "string", + "type": { + "$ref": "858" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "873", + "parameter": { + "$ref": "860" + }, + "value": { + "$id": "874", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "rgstandbypool" + } + } + ], + "responses": [ + { + "$id": "875", + "response": { + "$ref": "865" + }, + "statusCode": 200, + "bodyValue": { + "$id": "876", + "kind": "model", + "type": { + "$ref": "498" + }, + "value": { + "$id": "877", + "value": { + "$id": "878", + "kind": "array", + "type": { + "$ref": "500" + }, + "value": [ + { + "$id": "879", + "kind": "model", + "type": { + "$ref": "448" + }, + "value": { + "$id": "880", + "properties": { + "$id": "881", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "882", + "elasticityProfile": { + "$id": "883", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "884", + "maxReadyCapacity": { + "$id": "885", + "kind": "number", + "type": { + "$ref": "454" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "886", + "kind": "number", + "type": { + "$ref": "458" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "887", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "888", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "889", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "890", + "kind": "dict", + "type": { + "$ref": "245" + }, + "value": { + "$id": "891" + } + }, + "location": { + "$id": "892", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "West US" + }, + "id": { + "$id": "893", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "894", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "895", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "896", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "897", + "createdBy": { + "$id": "898", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "899", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "900", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "901", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "902", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "903", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "904", + "kind": "string", + "type": { + "$ref": "504" + }, + "value": "https://example.com/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools" + } + } + } + } + ] + } + ] + }, + { + "$id": "905", + "Name": "listBySubscription", + "ResourceName": "StandbyVirtualMachinePoolResource", + "Doc": "List StandbyVirtualMachinePoolResource resources by subscription ID", + "Accessibility": "public", + "Parameters": [ + { + "$id": "906", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "908", + "Type": { + "$id": "909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "910", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "911", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "912", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "913", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "914", + "kind": "constant", + "valueType": { + "$id": "915", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "916", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "498" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools", + "BufferResponse": true, + "Paging": { + "$id": "917", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "918", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listBySubscription", + "Decorators": [], + "Examples": [ + { + "$id": "919", + "kind": "http", + "name": "StandbyVirtualMachinePools_ListBySubscription", + "description": "StandbyVirtualMachinePools_ListBySubscription", + "filePath": "2025-03-01/StandbyVirtualMachinePools_ListBySubscription.json", + "parameters": [ + { + "$id": "920", + "parameter": { + "$ref": "906" + }, + "value": { + "$id": "921", + "kind": "string", + "type": { + "$ref": "907" + }, + "value": "2025-03-01" + } + }, + { + "$id": "922", + "parameter": { + "$ref": "910" + }, + "value": { + "$id": "923", + "kind": "string", + "type": { + "$ref": "911" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + } + ], + "responses": [ + { + "$id": "924", + "response": { + "$ref": "916" + }, + "statusCode": 200, + "bodyValue": { + "$id": "925", + "kind": "model", + "type": { + "$ref": "498" + }, + "value": { + "$id": "926", + "value": { + "$id": "927", + "kind": "array", + "type": { + "$ref": "500" + }, + "value": [ + { + "$id": "928", + "kind": "model", + "type": { + "$ref": "448" + }, + "value": { + "$id": "929", + "properties": { + "$id": "930", + "kind": "model", + "type": { + "$ref": "450" + }, + "value": { + "$id": "931", + "elasticityProfile": { + "$id": "932", + "kind": "model", + "type": { + "$ref": "452" + }, + "value": { + "$id": "933", + "maxReadyCapacity": { + "$id": "934", + "kind": "number", + "type": { + "$ref": "454" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "935", + "kind": "number", + "type": { + "$ref": "458" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "936", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "937", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "938", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "939", + "kind": "dict", + "type": { + "$ref": "245" + }, + "value": { + "$id": "940" + } + }, + "location": { + "$id": "941", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "West US" + }, + "id": { + "$id": "942", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "943", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "944", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "945", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "946", + "createdBy": { + "$id": "947", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "948", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "949", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "950", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "951", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "952", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "953", + "kind": "string", + "type": { + "$ref": "504" + }, + "value": "https://example.com/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "954" + }, + "Parent": "StandbyPoolClient", + "Parameters": [ + { + "$id": "955", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "956", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "957", + "Type": { + "$id": "958", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools" + }, + { + "$id": "959", + "Name": "StandbyVirtualMachines", + "Namespace": "Microsoft.StandbyPool", + "Operations": [ + { + "$id": "960", + "Name": "get", + "ResourceName": "StandbyVirtualMachineResource", + "Doc": "Get a StandbyVirtualMachineResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "961", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "962", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "963", + "Type": { + "$id": "964", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "965", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "966", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "967", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "968", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "969", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "970", + "Name": "standbyVirtualMachinePoolName", + "NameInRequest": "standbyVirtualMachinePoolName", + "Doc": "Name of the standby virtual machine pool", + "Type": { + "$id": "971", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "972", + "Name": "standbyVirtualMachineName", + "NameInRequest": "standbyVirtualMachineName", + "Doc": "Name of the standby virtual machine", + "Type": { + "$id": "973", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "974", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "975", + "kind": "constant", + "valueType": { + "$id": "976", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "977", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "425" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines/{standbyVirtualMachineName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachines.get", + "Decorators": [], + "Examples": [ + { + "$id": "978", + "kind": "http", + "name": "StandbyVirtualMachines_Get", + "description": "StandbyVirtualMachines_Get", + "filePath": "2025-03-01/StandbyVirtualMachines_Get.json", + "parameters": [ + { + "$id": "979", + "parameter": { + "$ref": "961" + }, + "value": { + "$id": "980", + "kind": "string", + "type": { + "$ref": "962" + }, + "value": "2025-03-01" + } + }, + { + "$id": "981", + "parameter": { + "$ref": "965" + }, + "value": { + "$id": "982", + "kind": "string", + "type": { + "$ref": "966" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "983", + "parameter": { + "$ref": "968" + }, + "value": { + "$id": "984", + "kind": "string", + "type": { + "$ref": "969" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "985", + "parameter": { + "$ref": "970" + }, + "value": { + "$id": "986", + "kind": "string", + "type": { + "$ref": "971" + }, + "value": "pool" + } + }, + { + "$id": "987", + "parameter": { + "$ref": "972" + }, + "value": { + "$id": "988", + "kind": "string", + "type": { + "$ref": "973" + }, + "value": "virtualMachine" + } + } + ], + "responses": [ + { + "$id": "989", + "response": { + "$ref": "977" + }, + "statusCode": 200, + "bodyValue": { + "$id": "990", + "kind": "model", + "type": { + "$ref": "425" + }, + "value": { + "$id": "991", + "properties": { + "$id": "992", + "kind": "model", + "type": { + "$ref": "427" + }, + "value": { + "$id": "993", + "virtualMachineResourceId": { + "$id": "994", + "kind": "string", + "type": { + "$ref": "429" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachines/virtualMachine" + }, + "provisioningState": { + "$id": "995", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "996", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/standbyVirtualMachines/virtualMachine" + }, + "name": { + "$id": "997", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "998", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools/virtualMachines" + }, + "systemData": { + "$id": "999", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "1000", + "createdBy": { + "$id": "1001", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1002", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "1003", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1004", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1005", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1006", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1007", + "Name": "listByStandbyVirtualMachinePoolResource", + "ResourceName": "StandbyVirtualMachineResource", + "Doc": "List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1008", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1009", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1010", + "Type": { + "$id": "1011", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1012", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1013", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1014", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1015", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1016", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1017", + "Name": "standbyVirtualMachinePoolName", + "NameInRequest": "standbyVirtualMachinePoolName", + "Doc": "Name of the standby virtual machine pool", + "Type": { + "$id": "1018", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1019", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1020", + "kind": "constant", + "valueType": { + "$id": "1021", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1022", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "438" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines", + "BufferResponse": true, + "Paging": { + "$id": "1023", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "1024", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachines.listByStandbyVirtualMachinePoolResource", + "Decorators": [], + "Examples": [ + { + "$id": "1025", + "kind": "http", + "name": "StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource", + "description": "StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource", + "filePath": "2025-03-01/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json", + "parameters": [ + { + "$id": "1026", + "parameter": { + "$ref": "1008" + }, + "value": { + "$id": "1027", + "kind": "string", + "type": { + "$ref": "1009" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1028", + "parameter": { + "$ref": "1012" + }, + "value": { + "$id": "1029", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1030", + "parameter": { + "$ref": "1015" + }, + "value": { + "$id": "1031", + "kind": "string", + "type": { + "$ref": "1016" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1032", + "parameter": { + "$ref": "1017" + }, + "value": { + "$id": "1033", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "1034", + "response": { + "$ref": "1022" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1035", + "kind": "model", + "type": { + "$ref": "438" + }, + "value": { + "$id": "1036", + "value": { + "$id": "1037", + "kind": "array", + "type": { + "$ref": "440" + }, + "value": [ + { + "$id": "1038", + "kind": "model", + "type": { + "$ref": "425" + }, + "value": { + "$id": "1039", + "properties": { + "$id": "1040", + "kind": "model", + "type": { + "$ref": "427" + }, + "value": { + "$id": "1041", + "virtualMachineResourceId": { + "$id": "1042", + "kind": "string", + "type": { + "$ref": "429" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachines/virtualMachine" + }, + "provisioningState": { + "$id": "1043", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1044", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/standbyVirtualMachines/virtualMachine" + }, + "name": { + "$id": "1045", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "1046", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools/virtualMachines" + }, + "systemData": { + "$id": "1047", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "1048", + "createdBy": { + "$id": "1049", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1050", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "1051", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1052", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1053", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1054", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1055", + "kind": "string", + "type": { + "$ref": "444" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "1056" + }, + "Parent": "StandbyPoolClient", + "Parameters": [ + { + "$id": "1057", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "1058", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "1059", + "Type": { + "$id": "1060", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachines" + }, + { + "$id": "1061", + "Name": "StandbyVirtualMachinePoolRuntimeViews", + "Namespace": "Microsoft.StandbyPool", + "Operations": [ + { + "$id": "1062", + "Name": "get", + "ResourceName": "StandbyVirtualMachinePoolRuntimeViewResource", + "Doc": "Get a StandbyVirtualMachinePoolRuntimeViewResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1063", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1064", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1065", + "Type": { + "$id": "1066", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1067", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1068", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1069", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1070", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1071", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1072", + "Name": "standbyVirtualMachinePoolName", + "NameInRequest": "standbyVirtualMachinePoolName", + "Doc": "Name of the standby virtual machine pool", + "Type": { + "$id": "1073", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1074", + "Name": "runtimeView", + "NameInRequest": "runtimeView", + "Doc": "The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.", + "Type": { + "$id": "1075", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1076", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1077", + "kind": "constant", + "valueType": { + "$id": "1078", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1079", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "361" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews/{runtimeView}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.get", + "Decorators": [], + "Examples": [ + { + "$id": "1080", + "kind": "http", + "name": "StandbyVirtualMachinePoolRuntimeViews_Get", + "description": "StandbyVirtualMachinePoolRuntimeViews_Get", + "filePath": "2025-03-01/StandbyVirtualMachinePoolRuntimeViews_Get.json", + "parameters": [ + { + "$id": "1081", + "parameter": { + "$ref": "1063" + }, + "value": { + "$id": "1082", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1083", + "parameter": { + "$ref": "1067" + }, + "value": { + "$id": "1084", + "kind": "string", + "type": { + "$ref": "1068" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1085", + "parameter": { + "$ref": "1070" + }, + "value": { + "$id": "1086", + "kind": "string", + "type": { + "$ref": "1071" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1087", + "parameter": { + "$ref": "1072" + }, + "value": { + "$id": "1088", + "kind": "string", + "type": { + "$ref": "1073" + }, + "value": "pool" + } + }, + { + "$id": "1089", + "parameter": { + "$ref": "1074" + }, + "value": { + "$id": "1090", + "kind": "string", + "type": { + "$ref": "1075" + }, + "value": "latest" + } + } + ], + "responses": [ + { + "$id": "1091", + "response": { + "$ref": "1079" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1092", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1093", + "properties": { + "$id": "1094", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "1095", + "instanceCountSummary": { + "$id": "1096", + "kind": "array", + "type": { + "$ref": "365" + }, + "value": [ + { + "$id": "1097", + "kind": "model", + "type": { + "$ref": "366" + }, + "value": { + "$id": "1098", + "zone": { + "$id": "1099", + "kind": "number", + "type": { + "$ref": "368" + }, + "value": 1 + }, + "instanceCountsByState": { + "$id": "1100", + "kind": "array", + "type": { + "$ref": "372" + }, + "value": [ + { + "$id": "1101", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1102", + "state": { + "$id": "1103", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Creating" + }, + "count": { + "$id": "1104", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 100 + } + } + }, + { + "$id": "1105", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1106", + "state": { + "$id": "1107", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Running" + }, + "count": { + "$id": "1108", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 20 + } + } + }, + { + "$id": "1109", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1110", + "state": { + "$id": "1111", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1112", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 10 + } + } + }, + { + "$id": "1113", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1114", + "state": { + "$id": "1115", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1116", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 100 + } + } + }, + { + "$id": "1117", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1118", + "state": { + "$id": "1119", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Starting" + }, + "count": { + "$id": "1120", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1121", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1122", + "state": { + "$id": "1123", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deleting" + }, + "count": { + "$id": "1124", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1125", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1126", + "state": { + "$id": "1127", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1128", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1129", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1130", + "state": { + "$id": "1131", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1132", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + } + ] + } + } + }, + { + "$id": "1133", + "kind": "model", + "type": { + "$ref": "366" + }, + "value": { + "$id": "1134", + "zone": { + "$id": "1135", + "kind": "number", + "type": { + "$ref": "368" + }, + "value": 2 + }, + "instanceCountsByState": { + "$id": "1136", + "kind": "array", + "type": { + "$ref": "372" + }, + "value": [ + { + "$id": "1137", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1138", + "state": { + "$id": "1139", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Creating" + }, + "count": { + "$id": "1140", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 100 + } + } + }, + { + "$id": "1141", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1142", + "state": { + "$id": "1143", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Running" + }, + "count": { + "$id": "1144", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 20 + } + } + }, + { + "$id": "1145", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1146", + "state": { + "$id": "1147", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1148", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 10 + } + } + }, + { + "$id": "1149", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1150", + "state": { + "$id": "1151", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1152", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 100 + } + } + }, + { + "$id": "1153", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1154", + "state": { + "$id": "1155", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Starting" + }, + "count": { + "$id": "1156", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1157", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1158", + "state": { + "$id": "1159", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deleting" + }, + "count": { + "$id": "1160", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1161", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1162", + "state": { + "$id": "1163", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1164", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1165", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1166", + "state": { + "$id": "1167", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1168", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + } + ] + } + } + }, + { + "$id": "1169", + "kind": "model", + "type": { + "$ref": "366" + }, + "value": { + "$id": "1170", + "zone": { + "$id": "1171", + "kind": "number", + "type": { + "$ref": "368" + }, + "value": 3 + }, + "instanceCountsByState": { + "$id": "1172", + "kind": "array", + "type": { + "$ref": "372" + }, + "value": [ + { + "$id": "1173", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1174", + "state": { + "$id": "1175", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Creating" + }, + "count": { + "$id": "1176", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 100 + } + } + }, + { + "$id": "1177", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1178", + "state": { + "$id": "1179", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Running" + }, + "count": { + "$id": "1180", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 20 + } + } + }, + { + "$id": "1181", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1182", + "state": { + "$id": "1183", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1184", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 10 + } + } + }, + { + "$id": "1185", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1186", + "state": { + "$id": "1187", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1188", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 100 + } + } + }, + { + "$id": "1189", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1190", + "state": { + "$id": "1191", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Starting" + }, + "count": { + "$id": "1192", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1193", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1194", + "state": { + "$id": "1195", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deleting" + }, + "count": { + "$id": "1196", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1197", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1198", + "state": { + "$id": "1199", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1200", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1201", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1202", + "state": { + "$id": "1203", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1204", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + } + ] + } + } + } + ] + }, + "provisioningState": { + "$id": "1205", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + }, + "status": { + "$id": "1206", + "kind": "model", + "type": { + "$ref": "161" + }, + "value": { + "$id": "1207", + "code": { + "$id": "1208", + "kind": "string", + "type": { + "$ref": "10" + }, + "value": "HealthState/healthy" + }, + "message": { + "$id": "1209", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "The pool is healthy." + } + } + }, + "prediction": { + "$id": "1210", + "kind": "model", + "type": { + "$ref": "392" + }, + "value": { + "$id": "1211", + "forecastValues": { + "$id": "1212", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "1213", + "instancesRequestedCount": { + "$id": "1214", + "kind": "array", + "type": { + "$ref": "396" + }, + "value": [ + { + "$id": "1215", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 24 + }, + { + "$id": "1216", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 10 + }, + { + "$id": "1217", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 200 + }, + { + "$id": "1218", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 12 + }, + { + "$id": "1219", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 5 + }, + { + "$id": "1220", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 10 + }, + { + "$id": "1221", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 15 + }, + { + "$id": "1222", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 23 + }, + { + "$id": "1223", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 56 + }, + { + "$id": "1224", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 38 + }, + { + "$id": "1225", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 12 + }, + { + "$id": "1226", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 19 + } + ] + } + } + }, + "forecastStartTime": { + "$id": "1227", + "kind": "string", + "type": { + "$ref": "403" + }, + "value": "2025-02-14T01:34:59.228Z" + }, + "forecastInfo": { + "$id": "1228", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}" + } + } + } + } + }, + "id": { + "$id": "1229", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/runtimeViews/latest" + }, + "name": { + "$id": "1230", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "1231", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools/runtimeViews" + }, + "systemData": { + "$id": "1232", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "1233", + "createdBy": { + "$id": "1234", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1235", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "1236", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2024-02-14T23:31:59.679Z" + }, + "lastModifiedBy": { + "$id": "1237", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1238", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1239", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2024-02-14T23:31:59.679Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1240", + "Name": "listByStandbyPool", + "ResourceName": "StandbyVirtualMachinePoolRuntimeViewResource", + "Doc": "List StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1241", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1243", + "Type": { + "$id": "1244", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1245", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1246", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1248", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1250", + "Name": "standbyVirtualMachinePoolName", + "NameInRequest": "standbyVirtualMachinePoolName", + "Doc": "Name of the standby virtual machine pool", + "Type": { + "$id": "1251", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1252", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1253", + "kind": "constant", + "valueType": { + "$id": "1254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1255", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "415" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews", + "BufferResponse": true, + "Paging": { + "$id": "1256", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "1257", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.listByStandbyPool", + "Decorators": [], + "Examples": [ + { + "$id": "1258", + "kind": "http", + "name": "StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool", + "description": "StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool", + "filePath": "2025-03-01/StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool.json", + "parameters": [ + { + "$id": "1259", + "parameter": { + "$ref": "1241" + }, + "value": { + "$id": "1260", + "kind": "string", + "type": { + "$ref": "1242" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1261", + "parameter": { + "$ref": "1245" + }, + "value": { + "$id": "1262", + "kind": "string", + "type": { + "$ref": "1246" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1263", + "parameter": { + "$ref": "1248" + }, + "value": { + "$id": "1264", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1265", + "parameter": { + "$ref": "1250" + }, + "value": { + "$id": "1266", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "1267", + "response": { + "$ref": "1255" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1268", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1269", + "value": { + "$id": "1270", + "kind": "array", + "type": { + "$ref": "417" + }, + "value": [ + { + "$id": "1271", + "kind": "model", + "type": { + "$ref": "361" + }, + "value": { + "$id": "1272", + "properties": { + "$id": "1273", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "1274", + "instanceCountSummary": { + "$id": "1275", + "kind": "array", + "type": { + "$ref": "365" + }, + "value": [ + { + "$id": "1276", + "kind": "model", + "type": { + "$ref": "366" + }, + "value": { + "$id": "1277", + "zone": { + "$id": "1278", + "kind": "number", + "type": { + "$ref": "368" + }, + "value": 1 + }, + "instanceCountsByState": { + "$id": "1279", + "kind": "array", + "type": { + "$ref": "372" + }, + "value": [ + { + "$id": "1280", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1281", + "state": { + "$id": "1282", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Creating" + }, + "count": { + "$id": "1283", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 100 + } + } + }, + { + "$id": "1284", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1285", + "state": { + "$id": "1286", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Running" + }, + "count": { + "$id": "1287", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 20 + } + } + }, + { + "$id": "1288", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1289", + "state": { + "$id": "1290", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1291", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 10 + } + } + }, + { + "$id": "1292", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1293", + "state": { + "$id": "1294", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1295", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 100 + } + } + }, + { + "$id": "1296", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1297", + "state": { + "$id": "1298", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Starting" + }, + "count": { + "$id": "1299", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1300", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1301", + "state": { + "$id": "1302", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deleting" + }, + "count": { + "$id": "1303", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1304", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1305", + "state": { + "$id": "1306", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1307", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1308", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1309", + "state": { + "$id": "1310", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1311", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + } + ] + } + } + }, + { + "$id": "1312", + "kind": "model", + "type": { + "$ref": "366" + }, + "value": { + "$id": "1313", + "zone": { + "$id": "1314", + "kind": "number", + "type": { + "$ref": "368" + }, + "value": 2 + }, + "instanceCountsByState": { + "$id": "1315", + "kind": "array", + "type": { + "$ref": "372" + }, + "value": [ + { + "$id": "1316", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1317", + "state": { + "$id": "1318", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Creating" + }, + "count": { + "$id": "1319", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 100 + } + } + }, + { + "$id": "1320", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1321", + "state": { + "$id": "1322", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Running" + }, + "count": { + "$id": "1323", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 20 + } + } + }, + { + "$id": "1324", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1325", + "state": { + "$id": "1326", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1327", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 10 + } + } + }, + { + "$id": "1328", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1329", + "state": { + "$id": "1330", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1331", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 100 + } + } + }, + { + "$id": "1332", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1333", + "state": { + "$id": "1334", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Starting" + }, + "count": { + "$id": "1335", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1336", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1337", + "state": { + "$id": "1338", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deleting" + }, + "count": { + "$id": "1339", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1340", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1341", + "state": { + "$id": "1342", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1343", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1344", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1345", + "state": { + "$id": "1346", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1347", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + } + ] + } + } + }, + { + "$id": "1348", + "kind": "model", + "type": { + "$ref": "366" + }, + "value": { + "$id": "1349", + "zone": { + "$id": "1350", + "kind": "number", + "type": { + "$ref": "368" + }, + "value": 3 + }, + "instanceCountsByState": { + "$id": "1351", + "kind": "array", + "type": { + "$ref": "372" + }, + "value": [ + { + "$id": "1352", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1353", + "state": { + "$id": "1354", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Creating" + }, + "count": { + "$id": "1355", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 100 + } + } + }, + { + "$id": "1356", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1357", + "state": { + "$id": "1358", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Running" + }, + "count": { + "$id": "1359", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 20 + } + } + }, + { + "$id": "1360", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1361", + "state": { + "$id": "1362", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1363", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 10 + } + } + }, + { + "$id": "1364", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1365", + "state": { + "$id": "1366", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1367", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 100 + } + } + }, + { + "$id": "1368", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1369", + "state": { + "$id": "1370", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Starting" + }, + "count": { + "$id": "1371", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1372", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1373", + "state": { + "$id": "1374", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Deleting" + }, + "count": { + "$id": "1375", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1376", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1377", + "state": { + "$id": "1378", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1379", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + }, + { + "$id": "1380", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "1381", + "state": { + "$id": "1382", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1383", + "kind": "number", + "type": { + "$ref": "378" + }, + "value": 0 + } + } + } + ] + } + } + } + ] + }, + "provisioningState": { + "$id": "1384", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + }, + "status": { + "$id": "1385", + "kind": "model", + "type": { + "$ref": "161" + }, + "value": { + "$id": "1386", + "code": { + "$id": "1387", + "kind": "string", + "type": { + "$ref": "10" + }, + "value": "HealthState/healthy" + }, + "message": { + "$id": "1388", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "The pool is healthy." + } + } + }, + "prediction": { + "$id": "1389", + "kind": "model", + "type": { + "$ref": "392" + }, + "value": { + "$id": "1390", + "forecastValues": { + "$id": "1391", + "kind": "model", + "type": { + "$ref": "394" + }, + "value": { + "$id": "1392", + "instancesRequestedCount": { + "$id": "1393", + "kind": "array", + "type": { + "$ref": "396" + }, + "value": [ + { + "$id": "1394", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 24 + }, + { + "$id": "1395", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 10 + }, + { + "$id": "1396", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 200 + }, + { + "$id": "1397", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 12 + }, + { + "$id": "1398", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 5 + }, + { + "$id": "1399", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 10 + }, + { + "$id": "1400", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 15 + }, + { + "$id": "1401", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 23 + }, + { + "$id": "1402", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 56 + }, + { + "$id": "1403", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 38 + }, + { + "$id": "1404", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 12 + }, + { + "$id": "1405", + "kind": "number", + "type": { + "$ref": "397" + }, + "value": 19 + } + ] + } + } + }, + "forecastStartTime": { + "$id": "1406", + "kind": "string", + "type": { + "$ref": "403" + }, + "value": "2025-02-14T01:34:59.228Z" + }, + "forecastInfo": { + "$id": "1407", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}" + } + } + } + } + }, + "id": { + "$id": "1408", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/runtimeViews/latest" + }, + "name": { + "$id": "1409", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "1410", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools/runtimeViews" + }, + "systemData": { + "$id": "1411", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "1412", + "createdBy": { + "$id": "1413", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1414", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "1415", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1416", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1417", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1418", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1419", + "kind": "string", + "type": { + "$ref": "421" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "1420" + }, + "Parent": "StandbyPoolClient", + "Parameters": [ + { + "$id": "1421", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "1422", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "1423", + "Type": { + "$id": "1424", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews" + }, + { + "$id": "1425", + "Name": "StandbyContainerGroupPools", + "Namespace": "Microsoft.StandbyPool", + "Operations": [ + { + "$id": "1426", + "Name": "get", + "ResourceName": "StandbyContainerGroupPoolResource", + "Doc": "Get a StandbyContainerGroupPoolResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1427", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1428", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1429", + "Type": { + "$id": "1430", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1431", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1432", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1433", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1434", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1435", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1436", + "Name": "standbyContainerGroupPoolName", + "NameInRequest": "standbyContainerGroupPoolName", + "Doc": "Name of the standby container group pool", + "Type": { + "$id": "1437", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1438", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1439", + "kind": "constant", + "valueType": { + "$id": "1440", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1441", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "242" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.get", + "Decorators": [], + "Examples": [ + { + "$id": "1442", + "kind": "http", + "name": "StandbyContainerGroupPools_Get", + "description": "StandbyContainerGroupPools_Get", + "filePath": "2025-03-01/StandbyContainerGroupPools_Get.json", + "parameters": [ + { + "$id": "1443", + "parameter": { + "$ref": "1427" + }, + "value": { + "$id": "1444", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1445", + "parameter": { + "$ref": "1431" + }, + "value": { + "$id": "1446", + "kind": "string", + "type": { + "$ref": "1432" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1447", + "parameter": { + "$ref": "1434" + }, + "value": { + "$id": "1448", + "kind": "string", + "type": { + "$ref": "1435" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1449", + "parameter": { + "$ref": "1436" + }, + "value": { + "$id": "1450", + "kind": "string", + "type": { + "$ref": "1437" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "1451", + "response": { + "$ref": "1441" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1452", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1453", + "properties": { + "$id": "1454", + "kind": "model", + "type": { + "$ref": "255" + }, + "value": { + "$id": "1455", + "elasticityProfile": { + "$id": "1456", + "kind": "model", + "type": { + "$ref": "257" + }, + "value": { + "$id": "1457", + "maxReadyCapacity": { + "$id": "1458", + "kind": "number", + "type": { + "$ref": "259" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1459", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1460", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1461", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1462", + "containerGroupProfile": { + "$id": "1463", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "1464", + "id": { + "$id": "1465", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1466", + "kind": "number", + "type": { + "$ref": "277" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1467", + "kind": "array", + "type": { + "$ref": "283" + }, + "value": [ + { + "$id": "1468", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "1469", + "id": { + "$id": "1470", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1471", + "kind": "array", + "type": { + "$ref": "295" + }, + "value": [ + { + "$id": "1472", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "1" + }, + { + "$id": "1473", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "2" + }, + { + "$id": "1474", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1475", + "kind": "dict", + "type": { + "$ref": "245" + }, + "value": { + "$id": "1476" + } + }, + "location": { + "$id": "1477", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "West US" + }, + "id": { + "$id": "1478", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1479", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "1480", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1481", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "1482", + "createdBy": { + "$id": "1483", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1484", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "1485", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1486", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1487", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1488", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1489", + "Name": "createOrUpdate", + "ResourceName": "StandbyContainerGroupPoolResource", + "Doc": "Create a StandbyContainerGroupPoolResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1490", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1491", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1492", + "Type": { + "$id": "1493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1494", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1495", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1496", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1497", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1499", + "Name": "standbyContainerGroupPoolName", + "NameInRequest": "standbyContainerGroupPoolName", + "Doc": "Name of the standby container group pool", + "Type": { + "$id": "1500", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1501", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "1502", + "kind": "constant", + "valueType": { + "$id": "1503", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1504", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1505", + "kind": "constant", + "valueType": { + "$id": "1506", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1507", + "Name": "resource", + "NameInRequest": "resource", + "Doc": "Resource create parameters.", + "Type": { + "$ref": "242" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1508", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "242" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + }, + { + "$id": "1509", + "StatusCodes": [ + 201 + ], + "BodyType": { + "$ref": "242" + }, + "Headers": [ + { + "$id": "1510", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "1511", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PUT", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "LongRunning": { + "$id": "1512", + "FinalStateVia": 0, + "FinalResponse": { + "$id": "1513", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "242" + } + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.createOrUpdate", + "Decorators": [ + { + "$id": "1514", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "1515", + "finalState": "azure-async-operation" + } + } + ], + "Examples": [ + { + "$id": "1516", + "kind": "http", + "name": "StandbyContainerGroupPools_CreateOrUpdate", + "description": "StandbyContainerGroupPools_CreateOrUpdate", + "filePath": "2025-03-01/StandbyContainerGroupPools_CreateOrUpdate.json", + "parameters": [ + { + "$id": "1517", + "parameter": { + "$ref": "1490" + }, + "value": { + "$id": "1518", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1519", + "parameter": { + "$ref": "1494" + }, + "value": { + "$id": "1520", + "kind": "string", + "type": { + "$ref": "1495" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1521", + "parameter": { + "$ref": "1497" + }, + "value": { + "$id": "1522", + "kind": "string", + "type": { + "$ref": "1498" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1523", + "parameter": { + "$ref": "1499" + }, + "value": { + "$id": "1524", + "kind": "string", + "type": { + "$ref": "1500" + }, + "value": "pool" + } + }, + { + "$id": "1525", + "parameter": { + "$ref": "1507" + }, + "value": { + "$id": "1526", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1527", + "properties": { + "$id": "1528", + "kind": "model", + "type": { + "$ref": "255" + }, + "value": { + "$id": "1529", + "elasticityProfile": { + "$id": "1530", + "kind": "model", + "type": { + "$ref": "257" + }, + "value": { + "$id": "1531", + "maxReadyCapacity": { + "$id": "1532", + "kind": "number", + "type": { + "$ref": "259" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1533", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "always" + } + } + }, + "containerGroupProperties": { + "$id": "1534", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1535", + "containerGroupProfile": { + "$id": "1536", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "1537", + "id": { + "$id": "1538", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1539", + "kind": "number", + "type": { + "$ref": "277" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1540", + "kind": "array", + "type": { + "$ref": "283" + }, + "value": [ + { + "$id": "1541", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "1542", + "id": { + "$id": "1543", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1544", + "kind": "array", + "type": { + "$ref": "295" + }, + "value": [ + { + "$id": "1545", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "1" + }, + { + "$id": "1546", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "2" + }, + { + "$id": "1547", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1548", + "kind": "dict", + "type": { + "$ref": "245" + }, + "value": { + "$id": "1549" + } + }, + "location": { + "$id": "1550", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "West US" + } + } + } + } + ], + "responses": [ + { + "$id": "1551", + "response": { + "$ref": "1508" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1552", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1553", + "properties": { + "$id": "1554", + "kind": "model", + "type": { + "$ref": "255" + }, + "value": { + "$id": "1555", + "elasticityProfile": { + "$id": "1556", + "kind": "model", + "type": { + "$ref": "257" + }, + "value": { + "$id": "1557", + "maxReadyCapacity": { + "$id": "1558", + "kind": "number", + "type": { + "$ref": "259" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1559", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1560", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1561", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1562", + "containerGroupProfile": { + "$id": "1563", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "1564", + "id": { + "$id": "1565", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1566", + "kind": "number", + "type": { + "$ref": "277" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1567", + "kind": "array", + "type": { + "$ref": "283" + }, + "value": [ + { + "$id": "1568", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "1569", + "id": { + "$id": "1570", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1571", + "kind": "array", + "type": { + "$ref": "295" + }, + "value": [ + { + "$id": "1572", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "1" + }, + { + "$id": "1573", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "2" + }, + { + "$id": "1574", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1575", + "kind": "dict", + "type": { + "$ref": "245" + }, + "value": { + "$id": "1576" + } + }, + "location": { + "$id": "1577", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "West US" + }, + "id": { + "$id": "1578", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1579", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "1580", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1581", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "1582", + "createdBy": { + "$id": "1583", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1584", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "1585", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1586", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1587", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1588", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + }, + { + "$id": "1589", + "response": { + "$ref": "1509" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1590", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1591", + "properties": { + "$id": "1592", + "kind": "model", + "type": { + "$ref": "255" + }, + "value": { + "$id": "1593", + "elasticityProfile": { + "$id": "1594", + "kind": "model", + "type": { + "$ref": "257" + }, + "value": { + "$id": "1595", + "maxReadyCapacity": { + "$id": "1596", + "kind": "number", + "type": { + "$ref": "259" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1597", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1598", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1599", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1600", + "containerGroupProfile": { + "$id": "1601", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "1602", + "id": { + "$id": "1603", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1604", + "kind": "number", + "type": { + "$ref": "277" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1605", + "kind": "array", + "type": { + "$ref": "283" + }, + "value": [ + { + "$id": "1606", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "1607", + "id": { + "$id": "1608", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1609", + "kind": "array", + "type": { + "$ref": "295" + }, + "value": [ + { + "$id": "1610", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "1" + }, + { + "$id": "1611", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "2" + }, + { + "$id": "1612", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1613", + "kind": "dict", + "type": { + "$ref": "245" + }, + "value": { + "$id": "1614" + } + }, + "location": { + "$id": "1615", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "West US" + }, + "id": { + "$id": "1616", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1617", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "1618", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1619", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "1620", + "createdBy": { + "$id": "1621", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1622", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "1623", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1624", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1625", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1626", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1627", + "Name": "delete", + "ResourceName": "StandbyContainerGroupPoolResource", + "Doc": "Delete a StandbyContainerGroupPoolResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1628", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1629", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1630", + "Type": { + "$id": "1631", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1632", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1633", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1634", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1635", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1636", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1637", + "Name": "standbyContainerGroupPoolName", + "NameInRequest": "standbyContainerGroupPoolName", + "Doc": "Name of the standby container group pool", + "Type": { + "$id": "1638", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1639", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1640", + "kind": "constant", + "valueType": { + "$id": "1641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1642", + "StatusCodes": [ + 202 + ], + "Headers": [ + { + "$id": "1643", + "Name": "location", + "NameInResponse": "Location", + "Doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "Type": { + "$id": "1644", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1645", + "Name": "retryAfter", + "NameInResponse": "Retry-After", + "Doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "Type": { + "$id": "1646", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "IsErrorResponse": false + }, + { + "$id": "1647", + "StatusCodes": [ + 204 + ], + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "DELETE", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", + "BufferResponse": true, + "LongRunning": { + "$id": "1648", + "FinalStateVia": 1, + "FinalResponse": { + "$id": "1649", + "StatusCodes": [ + 204 + ] + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.delete", + "Decorators": [], + "Examples": [ + { + "$id": "1650", + "kind": "http", + "name": "StandbyContainerGroupPools_Delete", + "description": "StandbyContainerGroupPools_Delete", + "filePath": "2025-03-01/StandbyContainerGroupPools_Delete.json", + "parameters": [ + { + "$id": "1651", + "parameter": { + "$ref": "1628" + }, + "value": { + "$id": "1652", + "kind": "string", + "type": { + "$ref": "1629" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1653", + "parameter": { + "$ref": "1632" + }, + "value": { + "$id": "1654", + "kind": "string", + "type": { + "$ref": "1633" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1655", + "parameter": { + "$ref": "1635" + }, + "value": { + "$id": "1656", + "kind": "string", + "type": { + "$ref": "1636" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1657", + "parameter": { + "$ref": "1637" + }, + "value": { + "$id": "1658", + "kind": "string", + "type": { + "$ref": "1638" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "1659", + "response": { + "$ref": "1642" + }, + "statusCode": 202 + }, + { + "$id": "1660", + "response": { + "$ref": "1647" + }, + "statusCode": 204 + } + ] + } + ] + }, + { + "$id": "1661", + "Name": "update", + "ResourceName": "StandbyContainerGroupPoolResource", + "Doc": "Update a StandbyContainerGroupPoolResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1662", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1663", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1664", + "Type": { + "$id": "1665", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1666", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1667", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1668", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1669", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1671", + "Name": "standbyContainerGroupPoolName", + "NameInRequest": "standbyContainerGroupPoolName", + "Doc": "Name of the standby container group pool", + "Type": { + "$id": "1672", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1673", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Doc": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "1674", + "kind": "constant", + "valueType": { + "$id": "1675", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1676", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1677", + "kind": "constant", + "valueType": { + "$id": "1678", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1679", + "Name": "properties", + "NameInRequest": "properties", + "Doc": "The resource properties to be updated.", + "Type": { + "$ref": "329" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1680", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "242" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "PATCH", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.update", + "Decorators": [], + "Examples": [ + { + "$id": "1681", + "kind": "http", + "name": "StandbyContainerGroupPools_Update", + "description": "StandbyContainerGroupPools_Update", + "filePath": "2025-03-01/StandbyContainerGroupPools_Update.json", + "parameters": [ + { + "$id": "1682", + "parameter": { + "$ref": "1662" + }, + "value": { + "$id": "1683", + "kind": "string", + "type": { + "$ref": "1663" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1684", + "parameter": { + "$ref": "1666" + }, + "value": { + "$id": "1685", + "kind": "string", + "type": { + "$ref": "1667" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1686", + "parameter": { + "$ref": "1669" + }, + "value": { + "$id": "1687", + "kind": "string", + "type": { + "$ref": "1670" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1688", + "parameter": { + "$ref": "1671" + }, + "value": { + "$id": "1689", + "kind": "string", + "type": { + "$ref": "1672" + }, + "value": "pool" + } + }, + { + "$id": "1690", + "parameter": { + "$ref": "1679" + }, + "value": { + "$id": "1691", + "kind": "model", + "type": { + "$ref": "329" + }, + "value": { + "$id": "1692", + "tags": { + "$id": "1693", + "kind": "dict", + "type": { + "$ref": "331" + }, + "value": { + "$id": "1694" + } + }, + "properties": { + "$id": "1695", + "kind": "model", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1696", + "elasticityProfile": { + "$id": "1697", + "kind": "model", + "type": { + "$ref": "257" + }, + "value": { + "$id": "1698", + "maxReadyCapacity": { + "$id": "1699", + "kind": "number", + "type": { + "$ref": "259" + }, + "value": 1743 + }, + "refillPolicy": { + "$id": "1700", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "always" + } + } + }, + "containerGroupProperties": { + "$id": "1701", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1702", + "containerGroupProfile": { + "$id": "1703", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "1704", + "id": { + "$id": "1705", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1706", + "kind": "number", + "type": { + "$ref": "277" + }, + "value": 2 + } + } + }, + "subnetIds": { + "$id": "1707", + "kind": "array", + "type": { + "$ref": "283" + }, + "value": [ + { + "$id": "1708", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "1709", + "id": { + "$id": "1710", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1711", + "kind": "array", + "type": { + "$ref": "345" + }, + "value": [ + { + "$id": "1712", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "1" + }, + { + "$id": "1713", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "2" + }, + { + "$id": "1714", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "3" + } + ] + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1715", + "response": { + "$ref": "1680" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1716", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1717", + "properties": { + "$id": "1718", + "kind": "model", + "type": { + "$ref": "255" + }, + "value": { + "$id": "1719", + "elasticityProfile": { + "$id": "1720", + "kind": "model", + "type": { + "$ref": "257" + }, + "value": { + "$id": "1721", + "maxReadyCapacity": { + "$id": "1722", + "kind": "number", + "type": { + "$ref": "259" + }, + "value": 1743 + }, + "refillPolicy": { + "$id": "1723", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1724", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1725", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1726", + "containerGroupProfile": { + "$id": "1727", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "1728", + "id": { + "$id": "1729", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1730", + "kind": "number", + "type": { + "$ref": "277" + }, + "value": 2 + } + } + }, + "subnetIds": { + "$id": "1731", + "kind": "array", + "type": { + "$ref": "283" + }, + "value": [ + { + "$id": "1732", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "1733", + "id": { + "$id": "1734", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1735", + "kind": "array", + "type": { + "$ref": "295" + }, + "value": [ + { + "$id": "1736", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "1" + }, + { + "$id": "1737", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "2" + }, + { + "$id": "1738", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1739", + "kind": "dict", + "type": { + "$ref": "245" + }, + "value": { + "$id": "1740" + } + }, + "location": { + "$id": "1741", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "West US" + }, + "id": { + "$id": "1742", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1743", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "1744", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1745", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "1746", + "createdBy": { + "$id": "1747", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1748", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "1749", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1750", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1751", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1752", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "1753", + "Name": "listByResourceGroup", + "ResourceName": "StandbyContainerGroupPoolResource", + "Doc": "List StandbyContainerGroupPoolResource resources by resource group", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1754", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1755", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1756", + "Type": { + "$id": "1757", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1758", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1759", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1760", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1761", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1762", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1763", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1764", + "kind": "constant", + "valueType": { + "$id": "1765", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1766", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "351" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools", + "BufferResponse": true, + "Paging": { + "$id": "1767", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "1768", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.listByResourceGroup", + "Decorators": [], + "Examples": [ + { + "$id": "1769", + "kind": "http", + "name": "StandbyContainerGroupPools_ListByResourceGroup", + "description": "StandbyContainerGroupPools_ListByResourceGroup", + "filePath": "2025-03-01/StandbyContainerGroupPools_ListByResourceGroup.json", + "parameters": [ + { + "$id": "1770", + "parameter": { + "$ref": "1754" + }, + "value": { + "$id": "1771", + "kind": "string", + "type": { + "$ref": "1755" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1772", + "parameter": { + "$ref": "1758" + }, + "value": { + "$id": "1773", + "kind": "string", + "type": { + "$ref": "1759" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1774", + "parameter": { + "$ref": "1761" + }, + "value": { + "$id": "1775", + "kind": "string", + "type": { + "$ref": "1762" + }, + "value": "rgstandbypool" + } + } + ], + "responses": [ + { + "$id": "1776", + "response": { + "$ref": "1766" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1777", + "kind": "model", + "type": { + "$ref": "351" + }, + "value": { + "$id": "1778", + "value": { + "$id": "1779", + "kind": "array", + "type": { + "$ref": "353" + }, + "value": [ + { + "$id": "1780", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1781", + "properties": { + "$id": "1782", + "kind": "model", + "type": { + "$ref": "255" + }, + "value": { + "$id": "1783", + "elasticityProfile": { + "$id": "1784", + "kind": "model", + "type": { + "$ref": "257" + }, + "value": { + "$id": "1785", + "maxReadyCapacity": { + "$id": "1786", + "kind": "number", + "type": { + "$ref": "259" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1787", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1788", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1789", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1790", + "containerGroupProfile": { + "$id": "1791", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "1792", + "id": { + "$id": "1793", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1794", + "kind": "number", + "type": { + "$ref": "277" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1795", + "kind": "array", + "type": { + "$ref": "283" + }, + "value": [ + { + "$id": "1796", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "1797", + "id": { + "$id": "1798", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1799", + "kind": "array", + "type": { + "$ref": "295" + }, + "value": [ + { + "$id": "1800", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "1" + }, + { + "$id": "1801", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "2" + }, + { + "$id": "1802", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1803", + "kind": "dict", + "type": { + "$ref": "245" + }, + "value": { + "$id": "1804" + } + }, + "location": { + "$id": "1805", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "West US" + }, + "id": { + "$id": "1806", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1807", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "1808", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1809", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "1810", + "createdBy": { + "$id": "1811", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1812", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "1813", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1814", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1815", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1816", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1817", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + { + "$id": "1818", + "Name": "listBySubscription", + "ResourceName": "StandbyContainerGroupPoolResource", + "Doc": "List StandbyContainerGroupPoolResource resources by subscription ID", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1819", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1821", + "Type": { + "$id": "1822", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1823", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1824", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1825", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1826", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1827", + "kind": "constant", + "valueType": { + "$id": "1828", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1829", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "351" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools", + "BufferResponse": true, + "Paging": { + "$id": "1830", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "1831", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.listBySubscription", + "Decorators": [], + "Examples": [ + { + "$id": "1832", + "kind": "http", + "name": "StandbyContainerGroupPools_ListBySubscription", + "description": "StandbyContainerGroupPools_ListBySubscription", + "filePath": "2025-03-01/StandbyContainerGroupPools_ListBySubscription.json", + "parameters": [ + { + "$id": "1833", + "parameter": { + "$ref": "1819" + }, + "value": { + "$id": "1834", + "kind": "string", + "type": { + "$ref": "1820" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1835", + "parameter": { + "$ref": "1823" + }, + "value": { + "$id": "1836", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + } + ], + "responses": [ + { + "$id": "1837", + "response": { + "$ref": "1829" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1838", + "kind": "model", + "type": { + "$ref": "351" + }, + "value": { + "$id": "1839", + "value": { + "$id": "1840", + "kind": "array", + "type": { + "$ref": "353" + }, + "value": [ + { + "$id": "1841", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1842", + "properties": { + "$id": "1843", + "kind": "model", + "type": { + "$ref": "255" + }, + "value": { + "$id": "1844", + "elasticityProfile": { + "$id": "1845", + "kind": "model", + "type": { + "$ref": "257" + }, + "value": { + "$id": "1846", + "maxReadyCapacity": { + "$id": "1847", + "kind": "number", + "type": { + "$ref": "259" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1848", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1849", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1850", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1851", + "containerGroupProfile": { + "$id": "1852", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "1853", + "id": { + "$id": "1854", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1855", + "kind": "number", + "type": { + "$ref": "277" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1856", + "kind": "array", + "type": { + "$ref": "283" + }, + "value": [ + { + "$id": "1857", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "1858", + "id": { + "$id": "1859", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1860", + "kind": "array", + "type": { + "$ref": "295" + }, + "value": [ + { + "$id": "1861", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "1" + }, + { + "$id": "1862", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "2" + }, + { + "$id": "1863", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1864", + "kind": "dict", + "type": { + "$ref": "245" + }, + "value": { + "$id": "1865" + } + }, + "location": { + "$id": "1866", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "West US" + }, + "id": { + "$id": "1867", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1868", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "1869", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1870", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "1871", + "createdBy": { + "$id": "1872", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1873", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "1874", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1875", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1876", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1877", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1878", + "kind": "string", + "type": { + "$ref": "357" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "1879" + }, + "Parent": "StandbyPoolClient", + "Parameters": [ + { + "$id": "1880", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "1881", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "1882", + "Type": { + "$id": "1883", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools" + }, + { + "$id": "1884", + "Name": "StandbyContainerGroupPoolRuntimeViews", + "Namespace": "Microsoft.StandbyPool", + "Operations": [ + { + "$id": "1885", + "Name": "get", + "ResourceName": "StandbyContainerGroupPoolRuntimeViewResource", + "Doc": "Get a StandbyContainerGroupPoolRuntimeViewResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "1886", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "1887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "1888", + "Type": { + "$id": "1889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1890", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "1891", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1892", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1893", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "1894", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1895", + "Name": "standbyContainerGroupPoolName", + "NameInRequest": "standbyContainerGroupPoolName", + "Doc": "Name of the standby container group pool", + "Type": { + "$id": "1896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1897", + "Name": "runtimeView", + "NameInRequest": "runtimeView", + "Doc": "The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.", + "Type": { + "$id": "1898", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "1899", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "1900", + "kind": "constant", + "valueType": { + "$id": "1901", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "1902", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "92" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews/{runtimeView}", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.get", + "Decorators": [], + "Examples": [ + { + "$id": "1903", + "kind": "http", + "name": "StandbyContainerGroupPoolRuntimeViews_Get", + "description": "StandbyContainerGroupPoolRuntimeViews_Get", + "filePath": "2025-03-01/StandbyContainerGroupPoolRuntimeViews_Get.json", + "parameters": [ + { + "$id": "1904", + "parameter": { + "$ref": "1886" + }, + "value": { + "$id": "1905", + "kind": "string", + "type": { + "$ref": "1887" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1906", + "parameter": { + "$ref": "1890" + }, + "value": { + "$id": "1907", + "kind": "string", + "type": { + "$ref": "1891" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1908", + "parameter": { + "$ref": "1893" + }, + "value": { + "$id": "1909", + "kind": "string", + "type": { + "$ref": "1894" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1910", + "parameter": { + "$ref": "1895" + }, + "value": { + "$id": "1911", + "kind": "string", + "type": { + "$ref": "1896" + }, + "value": "pool" + } + }, + { + "$id": "1912", + "parameter": { + "$ref": "1897" + }, + "value": { + "$id": "1913", + "kind": "string", + "type": { + "$ref": "1898" + }, + "value": "latest" + } + } + ], + "responses": [ + { + "$id": "1914", + "response": { + "$ref": "1902" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1915", + "kind": "model", + "type": { + "$ref": "92" + }, + "value": { + "$id": "1916", + "properties": { + "$id": "1917", + "kind": "model", + "type": { + "$ref": "138" + }, + "value": { + "$id": "1918", + "instanceCountSummary": { + "$id": "1919", + "kind": "array", + "type": { + "$ref": "140" + }, + "value": [ + { + "$id": "1920", + "kind": "model", + "type": { + "$ref": "141" + }, + "value": { + "$id": "1921", + "zone": { + "$id": "1922", + "kind": "number", + "type": { + "$ref": "143" + }, + "value": 1 + }, + "instanceCountsByState": { + "$id": "1923", + "kind": "array", + "type": { + "$ref": "147" + }, + "value": [ + { + "$id": "1924", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "1925", + "state": { + "$id": "1926", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "count": { + "$id": "1927", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 100 + } + } + }, + { + "$id": "1928", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "1929", + "state": { + "$id": "1930", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Running" + }, + "count": { + "$id": "1931", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 20 + } + } + }, + { + "$id": "1932", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "1933", + "state": { + "$id": "1934", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Deleting" + }, + "count": { + "$id": "1935", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 21 + } + } + } + ] + } + } + }, + { + "$id": "1936", + "kind": "model", + "type": { + "$ref": "141" + }, + "value": { + "$id": "1937", + "zone": { + "$id": "1938", + "kind": "number", + "type": { + "$ref": "143" + }, + "value": 2 + }, + "instanceCountsByState": { + "$id": "1939", + "kind": "array", + "type": { + "$ref": "147" + }, + "value": [ + { + "$id": "1940", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "1941", + "state": { + "$id": "1942", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "count": { + "$id": "1943", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 100 + } + } + }, + { + "$id": "1944", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "1945", + "state": { + "$id": "1946", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Running" + }, + "count": { + "$id": "1947", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 500 + } + } + }, + { + "$id": "1948", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "1949", + "state": { + "$id": "1950", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Deleting" + }, + "count": { + "$id": "1951", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 20 + } + } + } + ] + } + } + }, + { + "$id": "1952", + "kind": "model", + "type": { + "$ref": "141" + }, + "value": { + "$id": "1953", + "zone": { + "$id": "1954", + "kind": "number", + "type": { + "$ref": "143" + }, + "value": 3 + }, + "instanceCountsByState": { + "$id": "1955", + "kind": "array", + "type": { + "$ref": "147" + }, + "value": [ + { + "$id": "1956", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "1957", + "state": { + "$id": "1958", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "count": { + "$id": "1959", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 100 + } + } + }, + { + "$id": "1960", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "1961", + "state": { + "$id": "1962", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Running" + }, + "count": { + "$id": "1963", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 20 + } + } + }, + { + "$id": "1964", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "1965", + "state": { + "$id": "1966", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Deleting" + }, + "count": { + "$id": "1967", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 7 + } + } + } + ] + } + } + } + ] + }, + "provisioningState": { + "$id": "1968", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + }, + "status": { + "$id": "1969", + "kind": "model", + "type": { + "$ref": "161" + }, + "value": { + "$id": "1970", + "code": { + "$id": "1971", + "kind": "string", + "type": { + "$ref": "10" + }, + "value": "HealthState/healthy" + }, + "message": { + "$id": "1972", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "The pool is healthy." + } + } + }, + "prediction": { + "$id": "1973", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "1974", + "forecastValues": { + "$id": "1975", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "1976", + "instancesRequestedCount": { + "$id": "1977", + "kind": "array", + "type": { + "$ref": "179" + }, + "value": [ + { + "$id": "1978", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 24 + }, + { + "$id": "1979", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 10 + }, + { + "$id": "1980", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 200 + }, + { + "$id": "1981", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 12 + }, + { + "$id": "1982", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 5 + }, + { + "$id": "1983", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 10 + }, + { + "$id": "1984", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 15 + }, + { + "$id": "1985", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 23 + }, + { + "$id": "1986", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 56 + }, + { + "$id": "1987", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 38 + }, + { + "$id": "1988", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 12 + }, + { + "$id": "1989", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 19 + } + ] + } + } + }, + "forecastStartTime": { + "$id": "1990", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2025-02-14T01:34:59.228Z" + }, + "forecastInfo": { + "$id": "1991", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}" + } + } + } + } + }, + "id": { + "$id": "1992", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool/runtimeViews/latest" + }, + "name": { + "$id": "1993", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "1994", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools/runtimeViews" + }, + "systemData": { + "$id": "1995", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "1996", + "createdBy": { + "$id": "1997", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1998", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "1999", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "2000", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "2001", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2002", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + { + "$id": "2003", + "Name": "listByStandbyPool", + "ResourceName": "StandbyContainerGroupPoolRuntimeViewResource", + "Doc": "List StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource", + "Accessibility": "public", + "Parameters": [ + { + "$id": "2004", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Doc": "The API version to use for this operation.", + "Type": { + "$id": "2005", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Query", + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "DefaultValue": { + "$id": "2006", + "Type": { + "$id": "2007", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "2025-03-01" + }, + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2008", + "Name": "subscriptionId", + "NameInRequest": "subscriptionId", + "Doc": "The ID of the target subscription. The value must be an UUID.", + "Type": { + "$id": "2009", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2010", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Client", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2011", + "Name": "resourceGroupName", + "NameInRequest": "resourceGroupName", + "Doc": "The name of the resource group. The name is case insensitive.", + "Type": { + "$id": "2012", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2013", + "Name": "standbyContainerGroupPoolName", + "NameInRequest": "standbyContainerGroupPoolName", + "Doc": "Name of the standby container group pool", + "Type": { + "$id": "2014", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "Location": "Path", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [], + "SkipUrlEncoding": false + }, + { + "$id": "2015", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "2016", + "kind": "constant", + "valueType": { + "$id": "2017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [], + "SkipUrlEncoding": false + } + ], + "Responses": [ + { + "$id": "2018", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "232" + }, + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "GET", + "Uri": "{endpoint}", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews", + "BufferResponse": true, + "Paging": { + "$id": "2019", + "ItemPropertySegments": [ + "value" + ], + "NextLink": { + "$id": "2020", + "ResponseSegments": [ + "nextLink" + ], + "ResponseLocation": "Body" + } + }, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.listByStandbyPool", + "Decorators": [], + "Examples": [ + { + "$id": "2021", + "kind": "http", + "name": "StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool", + "description": "StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool", + "filePath": "2025-03-01/StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool.json", + "parameters": [ + { + "$id": "2022", + "parameter": { + "$ref": "2004" + }, + "value": { + "$id": "2023", + "kind": "string", + "type": { + "$ref": "2005" + }, + "value": "2025-03-01" + } + }, + { + "$id": "2024", + "parameter": { + "$ref": "2008" + }, + "value": { + "$id": "2025", + "kind": "string", + "type": { + "$ref": "2009" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "2026", + "parameter": { + "$ref": "2011" + }, + "value": { + "$id": "2027", + "kind": "string", + "type": { + "$ref": "2012" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "2028", + "parameter": { + "$ref": "2013" + }, + "value": { + "$id": "2029", + "kind": "string", + "type": { + "$ref": "2014" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "2030", + "response": { + "$ref": "2018" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2031", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "$id": "2032", + "value": { + "$id": "2033", + "kind": "array", + "type": { + "$ref": "234" + }, + "value": [ + { + "$id": "2034", + "kind": "model", + "type": { + "$ref": "92" + }, + "value": { + "$id": "2035", + "properties": { + "$id": "2036", + "kind": "model", + "type": { + "$ref": "138" + }, + "value": { + "$id": "2037", + "instanceCountSummary": { + "$id": "2038", + "kind": "array", + "type": { + "$ref": "140" + }, + "value": [ + { + "$id": "2039", + "kind": "model", + "type": { + "$ref": "141" + }, + "value": { + "$id": "2040", + "zone": { + "$id": "2041", + "kind": "number", + "type": { + "$ref": "143" + }, + "value": 1 + }, + "instanceCountsByState": { + "$id": "2042", + "kind": "array", + "type": { + "$ref": "147" + }, + "value": [ + { + "$id": "2043", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "2044", + "state": { + "$id": "2045", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "count": { + "$id": "2046", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 100 + } + } + }, + { + "$id": "2047", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "2048", + "state": { + "$id": "2049", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Running" + }, + "count": { + "$id": "2050", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 20 + } + } + }, + { + "$id": "2051", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "2052", + "state": { + "$id": "2053", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Deleting" + }, + "count": { + "$id": "2054", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 21 + } + } + } + ] + } + } + }, + { + "$id": "2055", + "kind": "model", + "type": { + "$ref": "141" + }, + "value": { + "$id": "2056", + "zone": { + "$id": "2057", + "kind": "number", + "type": { + "$ref": "143" + }, + "value": 2 + }, + "instanceCountsByState": { + "$id": "2058", + "kind": "array", + "type": { + "$ref": "147" + }, + "value": [ + { + "$id": "2059", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "2060", + "state": { + "$id": "2061", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "count": { + "$id": "2062", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 100 + } + } + }, + { + "$id": "2063", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "2064", + "state": { + "$id": "2065", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Running" + }, + "count": { + "$id": "2066", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 500 + } + } + }, + { + "$id": "2067", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "2068", + "state": { + "$id": "2069", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Deleting" + }, + "count": { + "$id": "2070", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 20 + } + } + } + ] + } + } + }, + { + "$id": "2071", + "kind": "model", + "type": { + "$ref": "141" + }, + "value": { + "$id": "2072", + "zone": { + "$id": "2073", + "kind": "number", + "type": { + "$ref": "143" + }, + "value": 3 + }, + "instanceCountsByState": { + "$id": "2074", + "kind": "array", + "type": { + "$ref": "147" + }, + "value": [ + { + "$id": "2075", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "2076", + "state": { + "$id": "2077", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Creating" + }, + "count": { + "$id": "2078", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 100 + } + } + }, + { + "$id": "2079", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "2080", + "state": { + "$id": "2081", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Running" + }, + "count": { + "$id": "2082", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 20 + } + } + }, + { + "$id": "2083", + "kind": "model", + "type": { + "$ref": "148" + }, + "value": { + "$id": "2084", + "state": { + "$id": "2085", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Deleting" + }, + "count": { + "$id": "2086", + "kind": "number", + "type": { + "$ref": "153" + }, + "value": 7 + } + } + } + ] + } + } + } + ] + }, + "provisioningState": { + "$id": "2087", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Succeeded" + }, + "status": { + "$id": "2088", + "kind": "model", + "type": { + "$ref": "161" + }, + "value": { + "$id": "2089", + "code": { + "$id": "2090", + "kind": "string", + "type": { + "$ref": "10" + }, + "value": "HealthState/healthy" + }, + "message": { + "$id": "2091", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "The pool is healthy." + } + } + }, + "prediction": { + "$id": "2092", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "2093", + "forecastValues": { + "$id": "2094", + "kind": "model", + "type": { + "$ref": "177" + }, + "value": { + "$id": "2095", + "instancesRequestedCount": { + "$id": "2096", + "kind": "array", + "type": { + "$ref": "179" + }, + "value": [ + { + "$id": "2097", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 24 + }, + { + "$id": "2098", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 10 + }, + { + "$id": "2099", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 200 + }, + { + "$id": "2100", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 12 + }, + { + "$id": "2101", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 5 + }, + { + "$id": "2102", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 10 + }, + { + "$id": "2103", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 15 + }, + { + "$id": "2104", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 23 + }, + { + "$id": "2105", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 56 + }, + { + "$id": "2106", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 38 + }, + { + "$id": "2107", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 12 + }, + { + "$id": "2108", + "kind": "number", + "type": { + "$ref": "180" + }, + "value": 19 + } + ] + } + } + }, + "forecastStartTime": { + "$id": "2109", + "kind": "string", + "type": { + "$ref": "186" + }, + "value": "2025-02-14T01:34:59.228Z" + }, + "forecastInfo": { + "$id": "2110", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}" + } + } + } + } + }, + "id": { + "$id": "2111", + "kind": "string", + "type": { + "$ref": "96" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool/runtimeViews/latest" + }, + "name": { + "$id": "2112", + "kind": "string", + "type": { + "$ref": "101" + }, + "value": "pool" + }, + "type": { + "$id": "2113", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools/runtimeViews" + }, + "systemData": { + "$id": "2114", + "kind": "model", + "type": { + "$ref": "110" + }, + "value": { + "$id": "2115", + "createdBy": { + "$id": "2116", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "2117", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "createdAt": { + "$id": "2118", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "2119", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "2120", + "kind": "string", + "type": { + "$ref": "26" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2121", + "kind": "string", + "type": { + "$ref": "131" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "2122", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + } + ], + "Protocol": { + "$id": "2123" + }, + "Parent": "StandbyPoolClient", + "Parameters": [ + { + "$id": "2124", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Doc": "Service host", + "Type": { + "$id": "2125", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "2126", + "Type": { + "$id": "2127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "Value": "https://management.azure.com" + } + } + ], + "Decorators": [], + "CrossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews" + } + ], + "Auth": { + "$id": "2128", + "OAuth2": { + "$id": "2129", + "Scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..6d83bf7eebb6 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -9,9 +9,17 @@ trigger: paths: include: - sdk/storage/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Files/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/ exclude: - sdk/storage/Azure.ResourceManager.Storage/ diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.net8.0.cs b/sdk/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.net8.0.cs index 6ba77b806a8b..0fc04bdf06eb 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.net8.0.cs +++ b/sdk/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.net8.0.cs @@ -19,11 +19,31 @@ namespace Azure.ResourceManager.Terraform.Models { public static partial class ArmTerraformModelFactory { - public static Azure.ResourceManager.Terraform.Models.ExportQueryTerraform ExportQueryTerraform(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider? targetProvider = default(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider?), bool? isOutputFullPropertiesEnabled = default(bool?), bool? isMaskSensitiveEnabled = default(bool?), string query = null, string namePattern = null, bool? isRecursive = default(bool?)) { throw null; } + public static Azure.ResourceManager.Terraform.Models.ExportQueryTerraform ExportQueryTerraform(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider? targetProvider = default(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider?), bool? isOutputFullPropertiesEnabled = default(bool?), bool? isMaskSensitiveEnabled = default(bool?), string query = null, string namePattern = null, bool? isRecursive = default(bool?), string table = null, Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter? authorizationScopeFilter = default(Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter?)) { throw null; } public static Azure.ResourceManager.Terraform.Models.ExportResourceGroupTerraform ExportResourceGroupTerraform(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider? targetProvider = default(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider?), bool? isOutputFullPropertiesEnabled = default(bool?), bool? isMaskSensitiveEnabled = default(bool?), string resourceGroupName = null, string namePattern = null) { throw null; } - public static Azure.ResourceManager.Terraform.Models.TerraformExportResult TerraformExportResult(string configuration = null, System.Collections.Generic.IEnumerable skippedResourceIds = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.ResourceManager.Terraform.Models.TerraformExportResult TerraformExportResult(string configuration = null, string import = null, System.Collections.Generic.IEnumerable skippedResourceIds = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } public static Azure.ResourceManager.Terraform.Models.TerraformOperationStatus TerraformOperationStatus(Azure.ResourceManager.Terraform.Models.TerraformExportResult properties = null, Azure.ResourceManager.Terraform.Models.TerraformResourceProvisioningState status = default(Azure.ResourceManager.Terraform.Models.TerraformResourceProvisioningState), string name = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), double? percentComplete = default(double?), Azure.ResponseError error = null) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AuthorizationScopeFilter : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AuthorizationScopeFilter(string value) { throw null; } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeAboveAndBelow { get { throw null; } } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeAndAbove { get { throw null; } } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeAndBelow { get { throw null; } } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeExact { get { throw null; } } + public bool Equals(Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter 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.Terraform.Models.AuthorizationScopeFilter left, Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter right) { throw null; } + public static implicit operator Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter left, Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter right) { throw null; } + public override string ToString() { throw null; } + } public abstract partial class CommonExportProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected CommonExportProperties() { } @@ -40,9 +60,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ExportQueryTerraform : Azure.ResourceManager.Terraform.Models.CommonExportProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ExportQueryTerraform(string query) { } + public Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter? AuthorizationScopeFilter { get { throw null; } set { } } public bool? IsRecursive { get { throw null; } set { } } public string NamePattern { get { throw null; } set { } } public string Query { get { throw null; } } + public string Table { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Terraform.Models.ExportQueryTerraform System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -99,6 +121,7 @@ public partial class TerraformExportResult : System.ClientModel.Primitives.IJson internal TerraformExportResult() { } public string Configuration { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string Import { get { throw null; } } public System.Collections.Generic.IReadOnlyList SkippedResourceIds { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Terraform.Models.TerraformExportResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.netstandard2.0.cs b/sdk/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.netstandard2.0.cs index 6ba77b806a8b..0fc04bdf06eb 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.netstandard2.0.cs +++ b/sdk/terraform/Azure.ResourceManager.Terraform/api/Azure.ResourceManager.Terraform.netstandard2.0.cs @@ -19,11 +19,31 @@ namespace Azure.ResourceManager.Terraform.Models { public static partial class ArmTerraformModelFactory { - public static Azure.ResourceManager.Terraform.Models.ExportQueryTerraform ExportQueryTerraform(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider? targetProvider = default(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider?), bool? isOutputFullPropertiesEnabled = default(bool?), bool? isMaskSensitiveEnabled = default(bool?), string query = null, string namePattern = null, bool? isRecursive = default(bool?)) { throw null; } + public static Azure.ResourceManager.Terraform.Models.ExportQueryTerraform ExportQueryTerraform(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider? targetProvider = default(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider?), bool? isOutputFullPropertiesEnabled = default(bool?), bool? isMaskSensitiveEnabled = default(bool?), string query = null, string namePattern = null, bool? isRecursive = default(bool?), string table = null, Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter? authorizationScopeFilter = default(Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter?)) { throw null; } public static Azure.ResourceManager.Terraform.Models.ExportResourceGroupTerraform ExportResourceGroupTerraform(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider? targetProvider = default(Azure.ResourceManager.Terraform.Models.TargetTerraformProvider?), bool? isOutputFullPropertiesEnabled = default(bool?), bool? isMaskSensitiveEnabled = default(bool?), string resourceGroupName = null, string namePattern = null) { throw null; } - public static Azure.ResourceManager.Terraform.Models.TerraformExportResult TerraformExportResult(string configuration = null, System.Collections.Generic.IEnumerable skippedResourceIds = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.ResourceManager.Terraform.Models.TerraformExportResult TerraformExportResult(string configuration = null, string import = null, System.Collections.Generic.IEnumerable skippedResourceIds = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } public static Azure.ResourceManager.Terraform.Models.TerraformOperationStatus TerraformOperationStatus(Azure.ResourceManager.Terraform.Models.TerraformExportResult properties = null, Azure.ResourceManager.Terraform.Models.TerraformResourceProvisioningState status = default(Azure.ResourceManager.Terraform.Models.TerraformResourceProvisioningState), string name = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), double? percentComplete = default(double?), Azure.ResponseError error = null) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AuthorizationScopeFilter : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AuthorizationScopeFilter(string value) { throw null; } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeAboveAndBelow { get { throw null; } } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeAndAbove { get { throw null; } } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeAndBelow { get { throw null; } } + public static Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter AtScopeExact { get { throw null; } } + public bool Equals(Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter 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.Terraform.Models.AuthorizationScopeFilter left, Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter right) { throw null; } + public static implicit operator Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter left, Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter right) { throw null; } + public override string ToString() { throw null; } + } public abstract partial class CommonExportProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected CommonExportProperties() { } @@ -40,9 +60,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ExportQueryTerraform : Azure.ResourceManager.Terraform.Models.CommonExportProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ExportQueryTerraform(string query) { } + public Azure.ResourceManager.Terraform.Models.AuthorizationScopeFilter? AuthorizationScopeFilter { get { throw null; } set { } } public bool? IsRecursive { get { throw null; } set { } } public string NamePattern { get { throw null; } set { } } public string Query { get { throw null; } } + public string Table { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Terraform.Models.ExportQueryTerraform System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -99,6 +121,7 @@ public partial class TerraformExportResult : System.ClientModel.Primitives.IJson internal TerraformExportResult() { } public string Configuration { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string Import { get { throw null; } } public System.Collections.Generic.IReadOnlyList SkippedResourceIds { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Terraform.Models.TerraformExportResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/ArmTerraformModelFactory.cs b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/ArmTerraformModelFactory.cs index 72b56c7b2a60..ba1de21e590c 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/ArmTerraformModelFactory.cs +++ b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/ArmTerraformModelFactory.cs @@ -22,8 +22,10 @@ public static partial class ArmTerraformModelFactory /// The ARG where predicate. Note that you can combine multiple conditions in one `where` predicate, e.g. `resourceGroup =~ "my-rg" and type =~ "microsoft.network/virtualnetworks"`. /// The name pattern of the Terraform resources. /// Whether to recursively list child resources of the query result. + /// The ARG table name. + /// The ARG Scope Filter parameter. /// A new instance for mocking. - public static ExportQueryTerraform ExportQueryTerraform(TargetTerraformProvider? targetProvider = null, bool? isOutputFullPropertiesEnabled = null, bool? isMaskSensitiveEnabled = null, string query = null, string namePattern = null, bool? isRecursive = null) + public static ExportQueryTerraform ExportQueryTerraform(TargetTerraformProvider? targetProvider = null, bool? isOutputFullPropertiesEnabled = null, bool? isMaskSensitiveEnabled = null, string query = null, string namePattern = null, bool? isRecursive = null, string table = null, AuthorizationScopeFilter? authorizationScopeFilter = null) { return new ExportQueryTerraform( CommonExportType.ExportQuery, @@ -33,7 +35,9 @@ public static ExportQueryTerraform ExportQueryTerraform(TargetTerraformProvider? serializedAdditionalRawData: null, query, namePattern, - isRecursive); + isRecursive, + table, + authorizationScopeFilter); } /// Initializes a new instance of . @@ -79,15 +83,16 @@ public static TerraformOperationStatus TerraformOperationStatus(TerraformExportR /// Initializes a new instance of . /// The Terraform configuration content. + /// The Terraform import blocks for the current export, which users can use to run "terraform plan" with to import the resources. /// A list of Azure resources which are not exported to Terraform due to there is no corresponding resources in Terraform. /// A list of errors derived during exporting each resource. /// A new instance for mocking. - public static TerraformExportResult TerraformExportResult(string configuration = null, IEnumerable skippedResourceIds = null, IEnumerable errors = null) + public static TerraformExportResult TerraformExportResult(string configuration = null, string import = null, IEnumerable skippedResourceIds = null, IEnumerable errors = null) { skippedResourceIds ??= new List(); errors ??= new List(); - return new TerraformExportResult(configuration, skippedResourceIds?.ToList(), errors?.ToList(), serializedAdditionalRawData: null); + return new TerraformExportResult(configuration, import, skippedResourceIds?.ToList(), errors?.ToList(), serializedAdditionalRawData: null); } } } diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/AuthorizationScopeFilter.cs b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/AuthorizationScopeFilter.cs new file mode 100644 index 000000000000..70c537b28d37 --- /dev/null +++ b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/AuthorizationScopeFilter.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.Terraform.Models +{ + /// The Azure Resource Graph Authorization Scope Filter parameter. + public readonly partial struct AuthorizationScopeFilter : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AuthorizationScopeFilter(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AtScopeAndBelowValue = "AtScopeAndBelow"; + private const string AtScopeAndAboveValue = "AtScopeAndAbove"; + private const string AtScopeAboveAndBelowValue = "AtScopeAboveAndBelow"; + private const string AtScopeExactValue = "AtScopeExact"; + + /// Returns assignments for the given scope and all child scopes. + public static AuthorizationScopeFilter AtScopeAndBelow { get; } = new AuthorizationScopeFilter(AtScopeAndBelowValue); + /// Returns assignments for the given scope and all parent scopes, but not child scopes. + public static AuthorizationScopeFilter AtScopeAndAbove { get; } = new AuthorizationScopeFilter(AtScopeAndAboveValue); + /// Returns assignments for the given scope, all parent scopes, and all child scopes. + public static AuthorizationScopeFilter AtScopeAboveAndBelow { get; } = new AuthorizationScopeFilter(AtScopeAboveAndBelowValue); + /// Returns assignments only for the given scope; no parent or child scopes are included. + public static AuthorizationScopeFilter AtScopeExact { get; } = new AuthorizationScopeFilter(AtScopeExactValue); + /// Determines if two values are the same. + public static bool operator ==(AuthorizationScopeFilter left, AuthorizationScopeFilter right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AuthorizationScopeFilter left, AuthorizationScopeFilter right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AuthorizationScopeFilter(string value) => new AuthorizationScopeFilter(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AuthorizationScopeFilter other && Equals(other); + /// + public bool Equals(AuthorizationScopeFilter other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.Serialization.cs b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.Serialization.cs index 0fcb788785b7..261a97c122de 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.Serialization.cs +++ b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.Serialization.cs @@ -47,6 +47,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("recursive"u8); writer.WriteBooleanValue(IsRecursive.Value); } + if (Optional.IsDefined(Table)) + { + writer.WritePropertyName("table"u8); + writer.WriteStringValue(Table); + } + if (Optional.IsDefined(AuthorizationScopeFilter)) + { + writer.WritePropertyName("authorizationScopeFilter"u8); + writer.WriteStringValue(AuthorizationScopeFilter.Value.ToString()); + } } ExportQueryTerraform IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -72,6 +82,8 @@ internal static ExportQueryTerraform DeserializeExportQueryTerraform(JsonElement string query = default; string namePattern = default; bool? recursive = default; + string table = default; + AuthorizationScopeFilter? authorizationScopeFilter = default; CommonExportType type = default; TargetTerraformProvider? targetProvider = default; bool? fullProperties = default; @@ -99,6 +111,20 @@ internal static ExportQueryTerraform DeserializeExportQueryTerraform(JsonElement recursive = property.Value.GetBoolean(); continue; } + if (property.NameEquals("table"u8)) + { + table = property.Value.GetString(); + continue; + } + if (property.NameEquals("authorizationScopeFilter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authorizationScopeFilter = new AuthorizationScopeFilter(property.Value.GetString()); + continue; + } if (property.NameEquals("type"u8)) { type = new CommonExportType(property.Value.GetString()); @@ -145,7 +171,9 @@ internal static ExportQueryTerraform DeserializeExportQueryTerraform(JsonElement serializedAdditionalRawData, query, namePattern, - recursive); + recursive, + table, + authorizationScopeFilter); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.cs b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.cs index 2d7c71a05d0c..13812280ac56 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.cs +++ b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/ExportQueryTerraform.cs @@ -33,11 +33,15 @@ public ExportQueryTerraform(string query) /// The ARG where predicate. Note that you can combine multiple conditions in one `where` predicate, e.g. `resourceGroup =~ "my-rg" and type =~ "microsoft.network/virtualnetworks"`. /// The name pattern of the Terraform resources. /// Whether to recursively list child resources of the query result. - internal ExportQueryTerraform(CommonExportType type, TargetTerraformProvider? targetProvider, bool? isOutputFullPropertiesEnabled, bool? isMaskSensitiveEnabled, IDictionary serializedAdditionalRawData, string query, string namePattern, bool? isRecursive) : base(type, targetProvider, isOutputFullPropertiesEnabled, isMaskSensitiveEnabled, serializedAdditionalRawData) + /// The ARG table name. + /// The ARG Scope Filter parameter. + internal ExportQueryTerraform(CommonExportType type, TargetTerraformProvider? targetProvider, bool? isOutputFullPropertiesEnabled, bool? isMaskSensitiveEnabled, IDictionary serializedAdditionalRawData, string query, string namePattern, bool? isRecursive, string table, AuthorizationScopeFilter? authorizationScopeFilter) : base(type, targetProvider, isOutputFullPropertiesEnabled, isMaskSensitiveEnabled, serializedAdditionalRawData) { Query = query; NamePattern = namePattern; IsRecursive = isRecursive; + Table = table; + AuthorizationScopeFilter = authorizationScopeFilter; Type = type; } @@ -52,5 +56,9 @@ internal ExportQueryTerraform() public string NamePattern { get; set; } /// Whether to recursively list child resources of the query result. public bool? IsRecursive { get; set; } + /// The ARG table name. + public string Table { get; set; } + /// The ARG Scope Filter parameter. + public AuthorizationScopeFilter? AuthorizationScopeFilter { get; set; } } } diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.Serialization.cs b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.Serialization.cs index 614cffbb3768..21e7f51c7913 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.Serialization.cs +++ b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.Serialization.cs @@ -39,6 +39,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("configuration"u8); writer.WriteStringValue(Configuration); } + if (Optional.IsDefined(Import)) + { + writer.WritePropertyName("import"u8); + writer.WriteStringValue(Import); + } if (Optional.IsCollectionDefined(SkippedResourceIds)) { writer.WritePropertyName("skippedResources"u8); @@ -102,6 +107,7 @@ internal static TerraformExportResult DeserializeTerraformExportResult(JsonEleme return null; } string configuration = default; + string import = default; IReadOnlyList skippedResources = default; IReadOnlyList errors = default; IDictionary serializedAdditionalRawData = default; @@ -113,6 +119,11 @@ internal static TerraformExportResult DeserializeTerraformExportResult(JsonEleme configuration = property.Value.GetString(); continue; } + if (property.NameEquals("import"u8)) + { + import = property.Value.GetString(); + continue; + } if (property.NameEquals("skippedResources"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -154,7 +165,7 @@ internal static TerraformExportResult DeserializeTerraformExportResult(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new TerraformExportResult(configuration, skippedResources ?? new ChangeTrackingList(), errors ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new TerraformExportResult(configuration, import, skippedResources ?? new ChangeTrackingList(), errors ?? new ChangeTrackingList(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.cs b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.cs index 68a442fa99f7..2151ce67b5c2 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.cs +++ b/sdk/terraform/Azure.ResourceManager.Terraform/src/Generated/Models/TerraformExportResult.cs @@ -55,12 +55,14 @@ internal TerraformExportResult() /// Initializes a new instance of . /// The Terraform configuration content. + /// The Terraform import blocks for the current export, which users can use to run "terraform plan" with to import the resources. /// A list of Azure resources which are not exported to Terraform due to there is no corresponding resources in Terraform. /// A list of errors derived during exporting each resource. /// Keeps track of any properties unknown to the library. - internal TerraformExportResult(string configuration, IReadOnlyList skippedResourceIds, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + internal TerraformExportResult(string configuration, string import, IReadOnlyList skippedResourceIds, IReadOnlyList errors, IDictionary serializedAdditionalRawData) { Configuration = configuration; + Import = import; SkippedResourceIds = skippedResourceIds; Errors = errors; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -68,6 +70,8 @@ internal TerraformExportResult(string configuration, IReadOnlyList The Terraform configuration content. public string Configuration { get; } + /// The Terraform import blocks for the current export, which users can use to run "terraform plan" with to import the resources. + public string Import { get; } /// A list of Azure resources which are not exported to Terraform due to there is no corresponding resources in Terraform. public IReadOnlyList SkippedResourceIds { get; } /// A list of errors derived during exporting each resource. diff --git a/sdk/terraform/Azure.ResourceManager.Terraform/tsp-location.yaml b/sdk/terraform/Azure.ResourceManager.Terraform/tsp-location.yaml index d676e0dde7f9..38d4549010b1 100644 --- a/sdk/terraform/Azure.ResourceManager.Terraform/tsp-location.yaml +++ b/sdk/terraform/Azure.ResourceManager.Terraform/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/terraform/Microsoft.AzureTerraform.Management -commit: a4fc4c6bda9ff2315671bca69f9de40a43e2bd8c +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Azure.ResourceManager.SapVirtualInstances.sln b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Azure.ResourceManager.SapVirtualInstances.sln new file mode 100644 index 000000000000..fa67d228e160 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Azure.ResourceManager.SapVirtualInstances.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.SapVirtualInstances.Samples", "samples\Azure.ResourceManager.SapVirtualInstances.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.SapVirtualInstances", "src\Azure.ResourceManager.SapVirtualInstances.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.SapVirtualInstances.Tests", "tests\Azure.ResourceManager.SapVirtualInstances.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/CHANGELOG.md b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Directory.Build.props b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/README.md b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/README.md new file mode 100644 index 000000000000..bcc48b7af026 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure SapVirtualInstances management client library for .NET + +**[Describe the service briefly first.]** + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - 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. + +## Getting started + +### Install the package + +Install the Microsoft Azure SapVirtualInstances management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.SapVirtualInstances --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET 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/dev/mgmt_quickstart.md). +- [API References](https://learn.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://aka.ms/azuresdk-net-mgmt-samples) + +## 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 about Microsoft Azure SDK, see [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 +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action 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 other 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/assets.json b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/assets.json new file mode 100644 index 000000000000..e269976e380b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/sapvirtualinstances/Azure.ResourceManager.SapVirtualInstances", + "Tag": "" +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Azure.ResourceManager.SapVirtualInstances.Samples.csproj b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Azure.ResourceManager.SapVirtualInstances.Samples.csproj new file mode 100644 index 000000000000..5507e60845be --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Azure.ResourceManager.SapVirtualInstances.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs new file mode 100644 index 000000000000..70a19c898099 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapApplicationServerInstanceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SAPApplicationServerInstancesCreate() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Create.json + // this example is just showing the usage of "SAPApplicationServerInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation + string applicationInstanceName = "app01"; + SapApplicationServerInstanceData data = new SapApplicationServerInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapApplicationServerProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationInstanceName, data); + SapApplicationServerInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateSAPApplicationServerInstancesForHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_CreateForHaWithAvailabilitySet.json + // this example is just showing the usage of "SAPApplicationServerInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation + string applicationInstanceName = "app01"; + SapApplicationServerInstanceData data = new SapApplicationServerInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapApplicationServerProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationInstanceName, data); + SapApplicationServerInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPApplicationServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json + // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation + string applicationInstanceName = "app01"; + SapApplicationServerInstanceResource result = await collection.GetAsync(applicationInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SapApplicationServerInstancesListBySAPVirtualInstance() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_ListBySapVirtualInstance.json + // this example is just showing the usage of "SAPApplicationServerInstance_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation and iterate over the result + await foreach (SapApplicationServerInstanceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SAPApplicationServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json + // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation + string applicationInstanceName = "app01"; + bool result = await collection.ExistsAsync(applicationInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SAPApplicationServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json + // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation + string applicationInstanceName = "app01"; + NullableResponse response = await collection.GetIfExistsAsync(applicationInstanceName); + SapApplicationServerInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs new file mode 100644 index 000000000000..a754e7233cd3 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapApplicationServerInstanceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPApplicationServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json + // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + SapApplicationServerInstanceResource result = await sapApplicationServerInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SAPApplicationServerInstancesDelete() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Delete.json + // this example is just showing the usage of "SAPApplicationServerInstance_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + await sapApplicationServerInstance.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SAPApplicationServerInstancesUpdate() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Update.json + // this example is just showing the usage of "SAPApplicationServerInstance_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + SapApplicationServerInstancePatch patch = new SapApplicationServerInstancePatch + { + Tags = +{ +["tag1"] = "value1" +}, + }; + SapApplicationServerInstanceResource result = await sapApplicationServerInstance.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartTheSAPApplicationServerInstance() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StartInstance.json + // this example is just showing the usage of "SAPApplicationServerInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent(); + ArmOperation lro = await sapApplicationServerInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartVirtualMachineAndTheSAPApplicationServerInstanceOnIt() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StartInstanceVM.json + // this example is just showing the usage of "SAPApplicationServerInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent + { + StartVm = true, + }; + ArmOperation lro = await sapApplicationServerInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheSAPApplicationServerInstance() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstance.json + // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + }; + ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheSAPApplicationServerInstanceAndItSInfrastructure() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstanceInfrastructure.json + // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + DeallocateVm = true, + }; + ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopTheSAPApplicationServerInstance() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstanceSoft.json + // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + }; + ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopTheSAPApplicationServerInstanceAndItSInfrastructure() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstanceSoftInfrastructure.json + // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + DeallocateVm = true, + }; + ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs new file mode 100644 index 000000000000..6984bc34d5d5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapCentralServerInstanceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SapCentralServerInstancesCreate() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Create.json + // this example is just showing the usage of "SAPCentralServerInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation + string centralInstanceName = "centralServer"; + SapCentralServerInstanceData data = new SapCentralServerInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapCentralServerProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, centralInstanceName, data); + SapCentralServerInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateSAPCentralInstancesForHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_CreateForHaWithAvailabilitySet.json + // this example is just showing the usage of "SAPCentralServerInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation + string centralInstanceName = "centralServer"; + SapCentralServerInstanceData data = new SapCentralServerInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapCentralServerProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, centralInstanceName, data); + SapCentralServerInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SapCentralServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json + // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation + string centralInstanceName = "centralServer"; + SapCentralServerInstanceResource result = await collection.GetAsync(centralInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SAPCentralInstancesListBySAPVirtualInstance() + { + // Generated from example definition: 2024-09-01/SapCentralServerInstances_ListBySapVirtualInstance.json + // this example is just showing the usage of "SAPCentralServerInstance_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation and iterate over the result + await foreach (SapCentralServerInstanceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SapCentralServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json + // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation + string centralInstanceName = "centralServer"; + bool result = await collection.ExistsAsync(centralInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SapCentralServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json + // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation + string centralInstanceName = "centralServer"; + NullableResponse response = await collection.GetIfExistsAsync(centralInstanceName); + SapCentralServerInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceResource.cs new file mode 100644 index 000000000000..c51a9b913e79 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceResource.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapCentralServerInstanceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SapCentralServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json + // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + SapCentralServerInstanceResource result = await sapCentralServerInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SapCentralServerInstancesDelete() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Delete.json + // this example is just showing the usage of "SAPCentralServerInstance_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + await sapCentralServerInstance.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SapCentralServerInstancesUpdate() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Update.json + // this example is just showing the usage of "SAPCentralServerInstance_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + SapCentralServerInstancePatch patch = new SapCentralServerInstancePatch + { + Tags = +{ +["tag1"] = "value1" +}, + }; + SapCentralServerInstanceResource result = await sapCentralServerInstance.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartTheSAPCentralServicesInstance() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_StartInstance.json + // this example is just showing the usage of "SAPCentralServerInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent(); + ArmOperation lro = await sapCentralServerInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartTheVirtualMachineSAndTheSAPCentralServicesInstanceOnIt() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_StartInstanceVM.json + // this example is just showing the usage of "SAPCentralServerInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent + { + StartVm = true, + }; + ArmOperation lro = await sapCentralServerInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheSAPCentralServicesInstance() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_StopInstance.json + // this example is just showing the usage of "SAPCentralServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 1200L, + }; + ArmOperation lro = await sapCentralServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheSAPCentralServicesInstanceAndItsUnderlyingVirtualMachineS() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_StopInstanceVM.json + // this example is just showing the usage of "SAPCentralServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + DeallocateVm = true, + }; + ArmOperation lro = await sapCentralServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs new file mode 100644 index 000000000000..57e19fd4683b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapDatabaseInstanceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SAPDatabaseInstancesCreate() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Create.json + // this example is just showing the usage of "SAPDatabaseInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation + string databaseInstanceName = "databaseServer"; + SapDatabaseInstanceData data = new SapDatabaseInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapDatabaseProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseInstanceName, data); + SapDatabaseInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateSAPDatabaseInstancesForHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_CreateForHaWithAvailabilitySet.json + // this example is just showing the usage of "SAPDatabaseInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation + string databaseInstanceName = "databaseServer"; + SapDatabaseInstanceData data = new SapDatabaseInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapDatabaseProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseInstanceName, data); + SapDatabaseInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPDatabaseInstancesGet() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json + // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation + string databaseInstanceName = "databaseServer"; + SapDatabaseInstanceResource result = await collection.GetAsync(databaseInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SAPDatabaseInstancesListBySAPVirtualInstance() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_List.json + // this example is just showing the usage of "SAPDatabaseInstance_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation and iterate over the result + await foreach (SapDatabaseInstanceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SAPDatabaseInstancesGet() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json + // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation + string databaseInstanceName = "databaseServer"; + bool result = await collection.ExistsAsync(databaseInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SAPDatabaseInstancesGet() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json + // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation + string databaseInstanceName = "databaseServer"; + NullableResponse response = await collection.GetIfExistsAsync(databaseInstanceName); + SapDatabaseInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceResource.cs new file mode 100644 index 000000000000..de8c748921e3 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceResource.cs @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapDatabaseInstanceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPDatabaseInstancesGet() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json + // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "databaseServer"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + SapDatabaseInstanceResource result = await sapDatabaseInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SAPDatabaseInstancesDelete() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Delete.json + // this example is just showing the usage of "SAPDatabaseInstance_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "databaseServer"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + await sapDatabaseInstance.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SAPDatabaseInstancesUpdate() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Update.json + // this example is just showing the usage of "SAPDatabaseInstance_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "databaseServer"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + SapDatabaseInstancePatch patch = new SapDatabaseInstancePatch + { + Tags = +{ +["key1"] = "value1" +}, + }; + SapDatabaseInstanceResource result = await sapDatabaseInstance.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartTheDatabaseInstanceOfTheSAPSystem() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StartInstance.json + // this example is just showing the usage of "SAPDatabaseInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent(); + ArmOperation lro = await sapDatabaseInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartVirtualMachineAndTheDatabaseInstanceOfTheSAPSystemOnIt() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StartInstanceVM.json + // this example is just showing the usage of "SAPDatabaseInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent + { + StartVm = true, + }; + ArmOperation lro = await sapDatabaseInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheDatabaseInstanceOfTheSAPSystem() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstance.json + // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + }; + ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopTheDatabaseInstanceOfTheSAPSystem() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstanceSoft.json + // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + }; + ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopTheDatabaseInstanceOfTheSAPSystemAndTheUnderlyingVirtualMachineS() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstanceSoftVM.json + // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + DeallocateVm = true, + }; + ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheDatabaseInstanceOfTheSAPSystemAndTheUnderlyingVirtualMachineS() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstanceVM.json + // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + DeallocateVm = true, + }; + ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceCollection.cs new file mode 100644 index 000000000000..9bfc4d5ca023 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceCollection.cs @@ -0,0 +1,3485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapVirtualInstanceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DetectSAPSoftwareInstallationOnADistributedSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectDS.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("eastus2")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("{{resourcegrp}}", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_E4ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_E4ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 2L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 1L)) + { + IsSecondaryIPEnabled = true, + }, + SoftwareConfiguration = new ExternalInstallationSoftwareConfiguration + { + CentralServerVmId = "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "sap.bpaas.com", + }, + }), + Tags = +{ +["created by"] = "azureuser" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DetectSAPSoftwareInstallationOnAnHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectHaAvailabilitySet.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }, + SoftwareConfiguration = new ExternalInstallationSoftwareConfiguration + { + CentralServerVmId = "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DetectSAPSoftwareInstallationOnAnHASystemWithAvailabilityZone() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectHaAvailabilityZone.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }, + SoftwareConfiguration = new ExternalInstallationSoftwareConfiguration + { + CentralServerVmId = "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DetectSAPSoftwareInstallationOnASingleServerSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectSingleServer.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("X00-RG", "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + })) + { + IsSecondaryIPEnabled = true, + DatabaseType = SapDatabaseType.HANA, + }, + SoftwareConfiguration = new ExternalInstallationSoftwareConfiguration + { + CentralServerVmId = "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureOnlyForDistributedSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDS.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }), + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithDiskAndOSConfigurationForDistributedSystemRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsDSRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + DiskVolumeConfigurations = +{ +["backup"] = new DiskVolumeConfiguration +{ +Count = 2L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["hana/data"] = new DiskVolumeConfiguration +{ +Count = 4L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/log"] = new DiskVolumeConfiguration +{ +Count = 3L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/shared"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["os"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 64L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["usr/sap"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +} +}, + }), + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithDiskAndOSConfigurationForHASystemWithAvailabilitySetRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsHaAvailabilitySetRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + DiskVolumeConfigurations = +{ +["backup"] = new DiskVolumeConfiguration +{ +Count = 2L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["hana/data"] = new DiskVolumeConfiguration +{ +Count = 4L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/log"] = new DiskVolumeConfiguration +{ +Count = 3L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/shared"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["os"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 64L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["usr/sap"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +} +}, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithDiskAndOSConfigurationForHASystemWithAvailabilityZoneRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsHaAvailabilityZoneRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + DiskVolumeConfigurations = +{ +["backup"] = new DiskVolumeConfiguration +{ +Count = 2L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["hana/data"] = new DiskVolumeConfiguration +{ +Count = 4L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/log"] = new DiskVolumeConfiguration +{ +Count = 3L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/shared"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["os"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 64L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["usr/sap"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +} +}, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithDiskAndOSConfigurationsForSingleServerSystemRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsSingleServerRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("X00-RG", "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + })) + { + IsSecondaryIPEnabled = true, + DatabaseType = SapDatabaseType.HANA, + DiskVolumeConfigurations = +{ +["backup"] = new DiskVolumeConfiguration +{ +Count = 2L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["hana/data"] = new DiskVolumeConfiguration +{ +Count = 4L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/log"] = new DiskVolumeConfiguration +{ +Count = 3L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/shared"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["os"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 64L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["usr/sap"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +} +}, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureOnlyForHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraHaAvailabilitySet.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 5L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureOnlyForHASystemWithAvailabilityZone() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraHaAvailabilityZone.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithAzureComputeGalleryImage() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsComputeGalleryImage.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Id = new ResourceIdentifier("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Id = new ResourceIdentifier("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Id = new ResourceIdentifier("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForDistributedSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesDS.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + CustomResourceNames = new ThreeTierFullResourceNames + { + CentralServer = new CentralServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "ascsvm", +HostName = "ascshostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "ascsnic", +}}, +OSDiskName = "ascsosdisk", +DataDiskNames = +{ +["default"] = new string[]{"ascsdisk0"} +}, +}}, + }, + ApplicationServer = new ApplicationServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "appvm0", +HostName = "apphostName0", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic0", +}}, +OSDiskName = "app0osdisk", +DataDiskNames = +{ +["default"] = new string[]{"app0disk0"} +}, +}, new VirtualMachineResourceNames +{ +VmName = "appvm1", +HostName = "apphostName1", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic1", +}}, +OSDiskName = "app1osdisk", +DataDiskNames = +{ +["default"] = new string[]{"app1disk0"} +}, +}}, + AvailabilitySetName = "appAvSet", + }, + DatabaseServer = new DatabaseServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "dbvm", +HostName = "dbhostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "dbnic", +}}, +OSDiskName = "dbosdisk", +DataDiskNames = +{ +["hanaData"] = new string[]{"hanadata0", "hanadata1"}, +["hanaLog"] = new string[]{"hanalog0", "hanalog1", "hanalog2"}, +["hanaShared"] = new string[]{"hanashared0", "hanashared1"}, +["usrSap"] = new string[]{"usrsap0"} +}, +}}, + }, + SharedStorage = new SharedStorageResourceNames + { + SharedStorageAccountName = "storageacc", + SharedStorageAccountPrivateEndPointName = "peForxNFS", + }, + }, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesHaAvailabilitySet.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + CustomResourceNames = new ThreeTierFullResourceNames + { + CentralServer = new CentralServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "ascsvm", +HostName = "ascshostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "ascsnic", +}}, +OSDiskName = "ascsosdisk", +}, new VirtualMachineResourceNames +{ +VmName = "ersvm", +HostName = "ershostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "ersnic", +}}, +OSDiskName = "ersosdisk", +}}, + AvailabilitySetName = "csAvSet", + LoadBalancer = new LoadBalancerResourceNames + { + LoadBalancerName = "ascslb", + FrontendIPConfigurationNames = { "ascsip0", "ersip0" }, + BackendPoolNames = { "ascsBackendPool" }, + HealthProbeNames = { "ascsHealthProbe", "ersHealthProbe" }, + }, + }, + ApplicationServer = new ApplicationServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "appvm0", +HostName = "apphostName0", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic0", +}}, +OSDiskName = "app0osdisk", +DataDiskNames = +{ +["default"] = new string[]{"app0disk0"} +}, +}, new VirtualMachineResourceNames +{ +VmName = "appvm1", +HostName = "apphostName1", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic1", +}}, +OSDiskName = "app1osdisk", +DataDiskNames = +{ +["default"] = new string[]{"app1disk0"} +}, +}}, + AvailabilitySetName = "appAvSet", + }, + DatabaseServer = new DatabaseServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "dbvmpr", +HostName = "dbprhostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "dbprnic", +}}, +OSDiskName = "dbprosdisk", +DataDiskNames = +{ +["hanaData"] = new string[]{"hanadatapr0", "hanadatapr1"}, +["hanaLog"] = new string[]{"hanalogpr0", "hanalogpr1", "hanalogpr2"}, +["hanaShared"] = new string[]{"hanasharedpr0", "hanasharedpr1"}, +["usrSap"] = new string[]{"usrsappr0"} +}, +}, new VirtualMachineResourceNames +{ +VmName = "dbvmsr", +HostName = "dbsrhostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "dbsrnic", +}}, +OSDiskName = "dbsrosdisk", +DataDiskNames = +{ +["hanaData"] = new string[]{"hanadatasr0", "hanadatasr1"}, +["hanaLog"] = new string[]{"hanalogsr0", "hanalogsr1", "hanalogsr2"}, +["hanaShared"] = new string[]{"hanasharedsr0", "hanasharedsr1"}, +["usrSap"] = new string[]{"usrsapsr0"} +}, +}}, + AvailabilitySetName = "dbAvSet", + LoadBalancer = new LoadBalancerResourceNames + { + LoadBalancerName = "dblb", + FrontendIPConfigurationNames = { "dbip" }, + BackendPoolNames = { "dbBackendPool" }, + HealthProbeNames = { "dbHealthProbe" }, + }, + }, + SharedStorage = new SharedStorageResourceNames + { + SharedStorageAccountName = "storageacc", + SharedStorageAccountPrivateEndPointName = "peForxNFS", + }, + }, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForHASystemWithAvailabilityZone() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesHaAvailabilityZone.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + CustomResourceNames = new ThreeTierFullResourceNames + { + CentralServer = new CentralServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "ascsvm", +HostName = "ascshostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "ascsnic", +}}, +OSDiskName = "ascsosdisk", +}, new VirtualMachineResourceNames +{ +VmName = "ersvm", +HostName = "ershostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "ersnic", +}}, +OSDiskName = "ersosdisk", +}}, + LoadBalancer = new LoadBalancerResourceNames + { + LoadBalancerName = "ascslb", + FrontendIPConfigurationNames = { "ascsip0", "ersip0" }, + BackendPoolNames = { "ascsBackendPool" }, + HealthProbeNames = { "ascsHealthProbe", "ersHealthProbe" }, + }, + }, + ApplicationServer = new ApplicationServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "appvm0", +HostName = "apphostName0", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic0", +}}, +OSDiskName = "app0osdisk", +DataDiskNames = +{ +["default"] = new string[]{"app0disk0"} +}, +}, new VirtualMachineResourceNames +{ +VmName = "appvm1", +HostName = "apphostName1", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic1", +}}, +OSDiskName = "app1osdisk", +DataDiskNames = +{ +["default"] = new string[]{"app1disk0"} +}, +}}, + }, + DatabaseServer = new DatabaseServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "dbvmpr", +HostName = "dbprhostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "dbprnic", +}}, +OSDiskName = "dbprosdisk", +DataDiskNames = +{ +["hanaData"] = new string[]{"hanadatapr0", "hanadatapr1"}, +["hanaLog"] = new string[]{"hanalogpr0", "hanalogpr1", "hanalogpr2"}, +["hanaShared"] = new string[]{"hanasharedpr0", "hanasharedpr1"}, +["usrSap"] = new string[]{"usrsappr0"} +}, +}, new VirtualMachineResourceNames +{ +VmName = "dbvmsr", +HostName = "dbsrhostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "dbsrnic", +}}, +OSDiskName = "dbsrosdisk", +DataDiskNames = +{ +["hanaData"] = new string[]{"hanadatasr0", "hanadatasr1"}, +["hanaLog"] = new string[]{"hanalogsr0", "hanalogsr1", "hanalogsr2"}, +["hanaShared"] = new string[]{"hanasharedsr0", "hanasharedsr1"}, +["usrSap"] = new string[]{"usrsapsr0"} +}, +}}, + LoadBalancer = new LoadBalancerResourceNames + { + LoadBalancerName = "dblb", + FrontendIPConfigurationNames = { "dbip" }, + BackendPoolNames = { "dbBackendPool" }, + HealthProbeNames = { "dbHealthProbe" }, + }, + }, + SharedStorage = new SharedStorageResourceNames + { + SharedStorageAccountName = "storageacc", + SharedStorageAccountPrivateEndPointName = "peForxNFS", + }, + }, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForSingleServerSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesSingleServer.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("X00-RG", "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + })) + { + IsSecondaryIPEnabled = true, + DatabaseType = SapDatabaseType.HANA, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationForDistributedSystemRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsDSRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }), + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationForHASystemWithAvailabilitySetRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsHaAvailabilitySetRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationForHASystemWithAvailabilityZoneRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsHaAvailabilityZoneRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationForSingleServerSystemRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsSIngleServerRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("X00-RG", "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + })) + { + IsSecondaryIPEnabled = true, + DatabaseType = SapDatabaseType.HANA, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureOnlyForSingleServerSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraSingleServer.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("X00-RG", "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + })) + { + IsSecondaryIPEnabled = true, + DatabaseType = SapDatabaseType.HANA, + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithAnExistingSAPTransportDirectoryFileshare() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithExistingFileshare.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + StorageTransportFileShareConfiguration = new MountFileShareConfiguration("/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint", "/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint"), + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithANewSAPTransportDirectoryFileshare() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithNewFileshare.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + StorageTransportFileShareConfiguration = new CreateAndMountFileShareConfiguration + { + ResourceGroup = "rgName", + StorageAccountName = "storageName", + }, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithTrustedAccessEnabled() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithOsTrustedAccess.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }), + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }) + { + ManagedResourcesNetworkAccessType = ManagedResourcesNetworkAccessType.Private, + }, + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithoutASAPTransportDirectoryFileshare() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithoutFileshare.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + StorageTransportFileShareConfiguration = new SkipFileShareConfiguration(), + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_InstallSAPSoftwareOnDistributedSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInstallDS.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("eastus2")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("{{resourcegrp}}", new CentralServerConfiguration("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_E4ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "8.2", + Version = "8.2.2021091201", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_E4ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "8.2", + Version = "8.2.2021091201", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 2L), new DatabaseConfiguration("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "8.2", + Version = "8.2.2021091201", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 1L)) + { + IsSecondaryIPEnabled = true, + }, + SoftwareConfiguration = new SapInstallWithoutOSConfigSoftwareConfiguration("https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml", "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount", "SAP S/4HANA 1909 SPS 03"), + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "sap.bpaas.com", + }, + }), + Tags = +{ +["created by"] = "azureuser" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_InstallSAPSoftwareOnSingleServerSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInstallSingleServer.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("eastus2")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("test-rg", "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/testsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "SUSE", + Offer = "SLES-SAP", + Sku = "12-sp4-gen2", + Version = "2022.02.01", + }, new OSProfile + { + AdminUsername = "azureappadmin", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + })), + SoftwareConfiguration = new SapInstallWithoutOSConfigSoftwareConfiguration("https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml", "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount", "SAP S/4HANA 1909 SPS 03"), + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "sap.bpaas.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RegisterExistingSAPSystemAsVirtualInstanceForSAPSolutions() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateRegisterSapSolutions.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("northeurope")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DiscoveryConfiguration + { + CentralServerVmId = "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }), + Tags = +{ +["createdby"] = "abc@microsoft.com", +["test"] = "abc" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RegisterExistingSAPSystemAsVirtualInstanceForSAPSolutionsWithOptionalCustomizations() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateRegisterSapSolutionsCustom.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("northeurope")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DiscoveryConfiguration + { + CentralServerVmId = "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + ManagedRgStorageAccountName = "q20saacssgrs", + }), + Tags = +{ +["createdby"] = "abc@microsoft.com", +["test"] = "abc" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RegisterWithTrustedAccessEnabled() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateRegisterWithTrustedAccess.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("northeurope")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DiscoveryConfiguration + { + CentralServerVmId = "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }) + { + ManagedResourcesNetworkAccessType = ManagedResourcesNetworkAccessType.Private, + }, + Tags = +{ +["createdby"] = "abc@microsoft.com", +["test"] = "abc" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPVirtualInstancesGet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceResource result = await collection.GetAsync(sapVirtualInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPVirtualInstancesGetWithACSSInstallationBlocked() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceResource result = await collection.GetAsync(sapVirtualInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SAPVirtualInstancesListByResourceGroup() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_ListByResourceGroup.json + // this example is just showing the usage of "SAPVirtualInstance_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation and iterate over the result + await foreach (SapVirtualInstanceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SAPVirtualInstancesGet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + bool result = await collection.ExistsAsync(sapVirtualInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SAPVirtualInstancesGetWithACSSInstallationBlocked() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + bool result = await collection.ExistsAsync(sapVirtualInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SAPVirtualInstancesGet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + NullableResponse response = await collection.GetIfExistsAsync(sapVirtualInstanceName); + SapVirtualInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SAPVirtualInstancesGetWithACSSInstallationBlocked() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + NullableResponse response = await collection.GetIfExistsAsync(sapVirtualInstanceName); + SapVirtualInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceResource.cs new file mode 100644 index 000000000000..e9b0f6980c31 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceResource.cs @@ -0,0 +1,372 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapVirtualInstanceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPVirtualInstancesGet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + SapVirtualInstanceResource result = await sapVirtualInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPVirtualInstancesGetWithACSSInstallationBlocked() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + SapVirtualInstanceResource result = await sapVirtualInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SAPVirtualInstancesDelete() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Delete.json + // this example is just showing the usage of "SAPVirtualInstance_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + await sapVirtualInstance.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SAPVirtualInstancesUpdate() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Update.json + // this example is just showing the usage of "SAPVirtualInstance_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + SapVirtualInstancePatch patch = new SapVirtualInstancePatch + { + Tags = +{ +["key1"] = "svi1" +}, + Identity = new SAPVirtualInstanceIdentity(SAPVirtualInstanceIdentityType.None), + }; + ArmOperation lro = await sapVirtualInstance.UpdateAsync(WaitUntil.Completed, patch); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SAPVirtualInstancesTrustedAccessEnableUpdate() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_UpdateTrustedAccess.json + // this example is just showing the usage of "SAPVirtualInstance_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + SapVirtualInstancePatch patch = new SapVirtualInstancePatch + { + Tags = +{ +["key1"] = "svi1" +}, + Identity = new SAPVirtualInstanceIdentity(SAPVirtualInstanceIdentityType.None), + UpdateSapVirtualInstanceManagedResourcesNetworkAccessType = ManagedResourcesNetworkAccessType.Private, + }; + ArmOperation lro = await sapVirtualInstance.UpdateAsync(WaitUntil.Completed, patch); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_SAPVirtualInstancesStart() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Start.json + // this example is just showing the usage of "SAPVirtualInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent + { + StartVm = true, + }; + ArmOperation lro = await sapVirtualInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_SAPVirtualInstancesStartWithInfraOperations() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_StartWithInfraOperations.json + // this example is just showing the usage of "SAPVirtualInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent + { + StartVm = true, + }; + ArmOperation lro = await sapVirtualInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopOfSapVirtualInstancesStop() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_SoftStop.json + // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + }; + ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopTheVirtualMachineSAndTheSAPSystemOnIt() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_SoftStopVMAndSystem.json + // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + DeallocateVm = true, + }; + ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SAPVirtualInstancesStop() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Stop.json + // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + }; + ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheVirtualMachineSAndTheSAPSystemOnIt() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_StopVMAndSystem.json + // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + DeallocateVm = true, + }; + ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..69c4c67630cd --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,423 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSapVirtualInstances_SAPVirtualInstancesListBySubscription() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_ListBySubscription.json + // this example is just showing the usage of "SAPVirtualInstance_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (SapVirtualInstanceResource item in subscriptionResource.GetSapVirtualInstancesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForNonHADistributedSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_Distributed.json + // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSizingRecommendationContent content = new SapSizingRecommendationContent( + "eastus", + SapEnvironmentType.Prod, + SapProductType.S4HANA, + SapDeploymentType.ThreeTier, + 20000L, + 1024L, + SapDatabaseType.HANA) + { + DbScaleMethod = SapDatabaseScaleMethod.ScaleUp, + }; + SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForHAWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_HA_AvSet.json + // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSizingRecommendationContent content = new SapSizingRecommendationContent( + "eastus", + SapEnvironmentType.Prod, + SapProductType.S4HANA, + SapDeploymentType.ThreeTier, + 75000L, + 1024L, + SapDatabaseType.HANA) + { + DbScaleMethod = SapDatabaseScaleMethod.ScaleUp, + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }; + SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForHAWithAvailabilityZone() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_HA_AvZone.json + // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSizingRecommendationContent content = new SapSizingRecommendationContent( + "eastus", + SapEnvironmentType.Prod, + SapProductType.S4HANA, + SapDeploymentType.ThreeTier, + 75000L, + 1024L, + SapDatabaseType.HANA) + { + DbScaleMethod = SapDatabaseScaleMethod.ScaleUp, + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }; + SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForSingleServer() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_SingleServer.json + // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSizingRecommendationContent content = new SapSizingRecommendationContent( + "eastus", + SapEnvironmentType.NonProd, + SapProductType.S4HANA, + SapDeploymentType.SingleServer, + 60000L, + 2000L, + SapDatabaseType.HANA) + { + DbScaleMethod = SapDatabaseScaleMethod.ScaleUp, + }; + SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSKUsForDistributedNonHAEnvironment() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_Distributed.json + // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSupportedSkusContent content = new SapSupportedSkusContent("eastus", SapEnvironmentType.Prod, SapProductType.S4HANA, SapDeploymentType.ThreeTier, SapDatabaseType.HANA); + SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSKUsForDistributedHAEnvironmentWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_DistributedHA_AvSet.json + // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSupportedSkusContent content = new SapSupportedSkusContent("eastus", SapEnvironmentType.Prod, SapProductType.S4HANA, SapDeploymentType.ThreeTier, SapDatabaseType.HANA) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }; + SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSkusForHAWithAvailabilityZone() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_DistributedHA_AvZone.json + // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSupportedSkusContent content = new SapSupportedSkusContent("eastus", SapEnvironmentType.Prod, SapProductType.S4HANA, SapDeploymentType.ThreeTier, SapDatabaseType.HANA) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }; + SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSKUsForSingleServer() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_SingleServer.json + // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSupportedSkusContent content = new SapSupportedSkusContent("eastus", SapEnvironmentType.NonProd, SapProductType.S4HANA, SapDeploymentType.SingleServer, SapDatabaseType.HANA); + SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDiskConfigurationsSapVirtualInstance_SAPDiskConfigurationsForInputEnvironmentNonProd() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeDiskConfigurations_NonProd.json + // this example is just showing the usage of "SAPVirtualInstances_GetDiskConfigurations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapDiskConfigurationsContent content = new SapDiskConfigurationsContent( + "eastus", + SapEnvironmentType.NonProd, + SapProductType.S4HANA, + SapDatabaseType.HANA, + SapDeploymentType.ThreeTier, + "Standard_M32ts"); + SapDiskConfigurationsResult result = await subscriptionResource.GetDiskConfigurationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDiskConfigurationsSapVirtualInstance_SAPDiskConfigurationsForInputEnvironmentProd() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeDiskConfigurations_Prod.json + // this example is just showing the usage of "SAPVirtualInstances_GetDiskConfigurations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapDiskConfigurationsContent content = new SapDiskConfigurationsContent( + "eastus", + SapEnvironmentType.Prod, + SapProductType.S4HANA, + SapDatabaseType.HANA, + SapDeploymentType.ThreeTier, + "Standard_M32ts"); + SapDiskConfigurationsResult result = await subscriptionResource.GetDiskConfigurationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAvailabilityZoneDetailsSapVirtualInstance_SAPAvailabilityZoneDetailsInEastUs() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeAvailabilityZoneDetails_eastus.json + // this example is just showing the usage of "SAPVirtualInstances_GetAvailabilityZoneDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("eastus"); + SapAvailabilityZoneDetailsContent content = new SapAvailabilityZoneDetailsContent("eastus", SapProductType.S4HANA, SapDatabaseType.HANA); + SapAvailabilityZoneDetailsResult result = await subscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAvailabilityZoneDetailsSapVirtualInstance_SAPAvailabilityZoneDetailsInNorthEurope() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeAvailabilityZoneDetails_northeurope.json + // this example is just showing the usage of "SAPVirtualInstances_GetAvailabilityZoneDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("northeurope"); + SapAvailabilityZoneDetailsContent content = new SapAvailabilityZoneDetailsContent("northeurope", SapProductType.S4HANA, SapDatabaseType.HANA); + SapAvailabilityZoneDetailsResult result = await subscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Azure.ResourceManager.SapVirtualInstances.csproj b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Azure.ResourceManager.SapVirtualInstances.csproj new file mode 100644 index 000000000000..03db45f9d8cf --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Azure.ResourceManager.SapVirtualInstances.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider SapVirtualInstances. + 1.0.0-beta.1 + azure;management;arm;resource manager;sapvirtualinstances + Azure.ResourceManager.SapVirtualInstances + + diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ArmSapVirtualInstancesModelFactory.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ArmSapVirtualInstancesModelFactory.cs new file mode 100644 index 000000000000..17829d826737 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ArmSapVirtualInstancesModelFactory.cs @@ -0,0 +1,565 @@ +// 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; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Model factory for models. + public static partial class ArmSapVirtualInstancesModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static SapApplicationServerInstanceData SapApplicationServerInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SapApplicationServerProperties properties = null) + { + tags ??= new Dictionary(); + + return new SapApplicationServerInstanceData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Application server Instance Number. + /// Application server Subnet. + /// Application server instance SAP hostname. + /// Application server instance SAP Kernel Version. + /// Application server instance SAP Kernel Patch level. + /// Application server instance SAP IP Address. + /// Application server instance gateway Port. + /// Application server instance ICM HTTP Port. + /// Application server instance ICM HTTPS Port. + /// Application server instance dispatcher status. + /// The Load Balancer details such as LoadBalancer ID attached to Application Server Virtual Machines. + /// The list of virtual machines. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the provisioning states. + /// Defines the Application Instance errors. + /// A new instance for mocking. + public static SapApplicationServerProperties SapApplicationServerProperties(string instanceNo = null, string subnet = null, string hostname = null, string kernelVersion = null, string kernelPatch = null, string ipAddress = null, long? gatewayPort = null, long? icmHttpPort = null, long? icmHttpsPort = null, string dispatcherStatus = null, ResourceIdentifier loadBalancerDetailsId = null, IEnumerable vmDetails = null, SapVirtualInstanceStatus? status = null, SapHealthState? health = null, SapVirtualInstanceProvisioningState? provisioningState = null, ErrorInformation errorsProperties = null) + { + vmDetails ??= new List(); + + return new SapApplicationServerProperties( + instanceNo, + subnet, + hostname, + kernelVersion, + kernelPatch, + ipAddress, + gatewayPort, + icmHttpPort, + icmHttpsPort, + dispatcherStatus, + loadBalancerDetailsId != null ? ResourceManagerModelFactory.SubResource(loadBalancerDetailsId) : null, + vmDetails?.ToList(), + status, + health, + provisioningState, + errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Defines the type of application server VM. + /// The virtual machine id. + /// Storage details of all the Storage Accounts attached to the App Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// A new instance for mocking. + public static ApplicationServerVmDetails ApplicationServerVmDetails(ApplicationServerVirtualMachineType? type = null, string virtualMachineId = null, IEnumerable storageDetails = null) + { + storageDetails ??= new List(); + + return new ApplicationServerVmDetails(type, virtualMachineId, storageDetails?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Service specific error code which serves as the substatus for the HTTP error code. + /// Description of the error. + /// Internal error details. + /// A new instance for mocking. + public static ErrorInformation ErrorInformation(string code = null, string message = null, IEnumerable details = null) + { + details ??= new List(); + + return new ErrorInformation(code, message, details?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Fully qualified ID for the async operation. + /// Name of the async operation. + /// Operation status. + /// Percent of the operation that is complete. + /// The start time of the operation. + /// The end time of the operation. + /// The operations list. + /// If present, details of the operation error. + /// Fully qualified ID of the resource against which the original async operation was started. + /// A new instance for mocking. + public static OperationStatusResult OperationStatusResult(ResourceIdentifier id = null, string name = null, string status = null, double? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null, string resourceId = null) + { + operations ??= new List(); + + return new OperationStatusResult( + id, + name, + status, + percentComplete, + startOn, + endOn, + operations?.ToList(), + error, + resourceId, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static SapDatabaseInstanceData SapDatabaseInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SapDatabaseProperties properties = null) + { + tags ??= new Dictionary(); + + return new SapDatabaseInstanceData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Database subnet. + /// Database SID name. + /// Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL Server. + /// Database IP Address. + /// The Load Balancer details such as LoadBalancer ID attached to Database Virtual Machines. + /// The list of virtual machines corresponding to the Database resource. + /// Defines the SAP Instance status. + /// Defines the provisioning states. + /// Defines the errors related to Database resource. + /// A new instance for mocking. + public static SapDatabaseProperties SapDatabaseProperties(string subnet = null, string databaseSid = null, string databaseType = null, string ipAddress = null, ResourceIdentifier loadBalancerDetailsId = null, IEnumerable vmDetails = null, SapVirtualInstanceStatus? status = null, SapVirtualInstanceProvisioningState? provisioningState = null, ErrorInformation errorsProperties = null) + { + vmDetails ??= new List(); + + return new SapDatabaseProperties( + subnet, + databaseSid, + databaseType, + ipAddress, + loadBalancerDetailsId != null ? ResourceManagerModelFactory.SubResource(loadBalancerDetailsId) : null, + vmDetails?.ToList(), + status, + provisioningState, + errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The virtual machine id. + /// Defines the SAP Instance status. + /// Storage details of all the Storage Accounts attached to the Database Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// A new instance for mocking. + public static DatabaseVmDetails DatabaseVmDetails(string virtualMachineId = null, SapVirtualInstanceStatus? status = null, IEnumerable storageDetails = null) + { + storageDetails ??= new List(); + + return new DatabaseVmDetails(virtualMachineId, status, storageDetails?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static SapCentralServerInstanceData SapCentralServerInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SapCentralServerProperties properties = null) + { + tags ??= new Dictionary(); + + return new SapCentralServerInstanceData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The central services instance number. + /// The central services instance subnet. + /// Defines the SAP message server properties. + /// Defines the SAP Enqueue Server properties. + /// Defines the SAP Gateway Server properties. + /// Defines the SAP Enqueue Replication Server (ERS) properties. + /// The central services instance Kernel Version. + /// The central services instance Kernel Patch level. + /// The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual Machines. + /// The list of virtual machines corresponding to the Central Services instance. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the provisioning states. + /// Defines the errors related to SAP Central Services Instance resource. + /// A new instance for mocking. + public static SapCentralServerProperties SapCentralServerProperties(string instanceNo = null, string subnet = null, MessageServerProperties messageServerProperties = null, EnqueueServerProperties enqueueServerProperties = null, GatewayServerProperties gatewayServerProperties = null, EnqueueReplicationServerProperties enqueueReplicationServerProperties = null, string kernelVersion = null, string kernelPatch = null, ResourceIdentifier loadBalancerDetailsId = null, IEnumerable vmDetails = null, SapVirtualInstanceStatus? status = null, SapHealthState? health = null, SapVirtualInstanceProvisioningState? provisioningState = null, ErrorInformation errorsProperties = null) + { + vmDetails ??= new List(); + + return new SapCentralServerProperties( + instanceNo, + subnet, + messageServerProperties, + enqueueServerProperties, + gatewayServerProperties, + enqueueReplicationServerProperties, + kernelVersion, + kernelPatch, + loadBalancerDetailsId != null ? ResourceManagerModelFactory.SubResource(loadBalancerDetailsId) : null, + vmDetails?.ToList(), + status, + health, + provisioningState, + errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// message server port. + /// message server internal MS port. + /// message server HTTP Port. + /// message server HTTPS Port. + /// message server SAP Hostname. + /// message server IP Address. + /// Defines the health of SAP Instances. + /// A new instance for mocking. + public static MessageServerProperties MessageServerProperties(long? msPort = null, long? internalMsPort = null, long? httpPort = null, long? httpsPort = null, string hostname = null, string ipAddress = null, SapHealthState? health = null) + { + return new MessageServerProperties( + msPort, + internalMsPort, + httpPort, + httpsPort, + hostname, + ipAddress, + health, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Enqueue Server SAP Hostname. + /// Enqueue Server SAP IP Address. + /// Enqueue Server Port. + /// Defines the health of SAP Instances. + /// A new instance for mocking. + public static EnqueueServerProperties EnqueueServerProperties(string hostname = null, string ipAddress = null, long? port = null, SapHealthState? health = null) + { + return new EnqueueServerProperties(hostname, ipAddress, port, health, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gateway Port. + /// Defines the health of SAP Instances. + /// A new instance for mocking. + public static GatewayServerProperties GatewayServerProperties(long? port = null, SapHealthState? health = null) + { + return new GatewayServerProperties(port, health, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Defines the type of Enqueue Replication Server. + /// ERS Instance Number. + /// ERS SAP Hostname. + /// ERS SAP Kernel Version. + /// ERS SAP Kernel Patch level. + /// ERS SAP IP Address. + /// Defines the health of SAP Instances. + /// A new instance for mocking. + public static EnqueueReplicationServerProperties EnqueueReplicationServerProperties(EnqueueReplicationServerType? ersVersion = null, string instanceNo = null, string hostname = null, string kernelVersion = null, string kernelPatch = null, string ipAddress = null, SapHealthState? health = null) + { + return new EnqueueReplicationServerProperties( + ersVersion, + instanceNo, + hostname, + kernelVersion, + kernelPatch, + ipAddress, + health, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Defines the type of central server VM. + /// The virtual machine id. + /// Storage details of all the Storage Accounts attached to the ASCS Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// A new instance for mocking. + public static CentralServerVmDetails CentralServerVmDetails(CentralServerVirtualMachineType? type = null, string virtualMachineId = null, IEnumerable storageDetails = null) + { + storageDetails ??= new List(); + + return new CentralServerVmDetails(type, virtualMachineId, storageDetails?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// A new instance for mocking. + public static SapVirtualInstanceData SapVirtualInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SapVirtualInstanceProperties properties = null, SAPVirtualInstanceIdentity identity = null) + { + tags ??= new Dictionary(); + + return new SapVirtualInstanceData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + identity, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + /// + /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Managed resource group configuration. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the Virtual Instance for SAP state. + /// Defines the provisioning states. + /// Indicates any errors on the Virtual Instance for SAP solutions resource. + /// A new instance for mocking. + public static SapVirtualInstanceProperties SapVirtualInstanceProperties(SapEnvironmentType environment = default, SapProductType sapProduct = default, ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType = null, SapConfiguration configuration = null, string managedResourceGroupName = null, SapVirtualInstanceStatus? status = null, SapHealthState? health = null, SapVirtualInstanceState? state = null, SapVirtualInstanceProvisioningState? provisioningState = null, ErrorInformation errorsProperties = null) + { + return new SapVirtualInstanceProperties( + environment, + sapProduct, + managedResourcesNetworkAccessType, + configuration, + managedResourceGroupName != null ? new ManagedRGConfiguration(managedResourceGroupName, serializedAdditionalRawData: null) : null, + status, + health, + state, + provisioningState, + errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The virtual machine ID of the Central Server. + /// The custom storage account name for the storage account created by the service in the managed resource group created as part of VIS deployment.<br><br>Refer to the storage account naming rules [here](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage).<br><br>If not provided, the service will create the storage account with a random name. + /// The geo-location where the SAP system exists. + /// A new instance for mocking. + public static DiscoveryConfiguration DiscoveryConfiguration(string centralServerVmId = null, string managedRgStorageAccountName = null, string appLocation = null) + { + return new DiscoveryConfiguration(SapConfigurationType.Discovery, serializedAdditionalRawData: null, centralServerVmId, managedRgStorageAccountName, appLocation); + } + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The SAP Application Performance Standard measurement. + /// The database memory configuration. + /// The database type. + /// The DB scale method. + /// The high availability type. + /// A new instance for mocking. + public static SapSizingRecommendationContent SapSizingRecommendationContent(string appLocation = null, SapEnvironmentType environment = default, SapProductType sapProduct = default, SapDeploymentType deploymentType = default, long saps = default, long dbMemory = default, SapDatabaseType databaseType = default, SapDatabaseScaleMethod? dbScaleMethod = null, SapHighAvailabilityType? highAvailabilityType = null) + { + return new SapSizingRecommendationContent( + appLocation, + environment, + sapProduct, + deploymentType, + saps, + dbMemory, + databaseType, + dbScaleMethod, + highAvailabilityType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The recommended VM SKU for single server. + /// A new instance for mocking. + public static SingleServerRecommendationResult SingleServerRecommendationResult(string vmSku = null) + { + return new SingleServerRecommendationResult(SapDeploymentType.SingleServer, serializedAdditionalRawData: null, vmSku); + } + + /// Initializes a new instance of . + /// The database VM SKU. + /// The database server instance count. + /// The central server VM SKU. + /// The central server instance count. + /// The application server VM SKU. + /// The application server instance count. + /// A new instance for mocking. + public static ThreeTierRecommendationResult ThreeTierRecommendationResult(string dbVmSku = null, long? databaseInstanceCount = null, string centralServerVmSku = null, long? centralServerInstanceCount = null, string applicationServerVmSku = null, long? applicationServerInstanceCount = null) + { + return new ThreeTierRecommendationResult( + SapDeploymentType.ThreeTier, + serializedAdditionalRawData: null, + dbVmSku, + databaseInstanceCount, + centralServerVmSku, + centralServerInstanceCount, + applicationServerVmSku, + applicationServerInstanceCount); + } + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The database type. Eg: HANA, DB2, etc. + /// The high availability type. + /// A new instance for mocking. + public static SapSupportedSkusContent SapSupportedSkusContent(string appLocation = null, SapEnvironmentType environment = default, SapProductType sapProduct = default, SapDeploymentType deploymentType = default, SapDatabaseType databaseType = default, SapHighAvailabilityType? highAvailabilityType = null) + { + return new SapSupportedSkusContent( + appLocation, + environment, + sapProduct, + deploymentType, + databaseType, + highAvailabilityType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets the list of SAP supported SKUs. + /// A new instance for mocking. + public static SapSupportedResourceSkusResult SapSupportedResourceSkusResult(IEnumerable supportedSkus = null) + { + supportedSkus ??= new List(); + + return new SapSupportedResourceSkusResult(supportedSkus?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The VM Sku. + /// True if the Sku is certified for App server in the SAP system. + /// True if the Sku is certified for Database server in the SAP system. + /// A new instance for mocking. + public static SapSupportedSku SapSupportedSku(string vmSku = null, bool? isAppServerCertified = null, bool? isDatabaseCertified = null) + { + return new SapSupportedSku(vmSku, isAppServerCertified, isDatabaseCertified, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + /// A new instance for mocking. + public static SapDiskConfigurationsResult SapDiskConfigurationsResult(IReadOnlyDictionary volumeConfigurations = null) + { + volumeConfigurations ??= new Dictionary(); + + return new SapDiskConfigurationsResult(volumeConfigurations, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The recommended disk details for a given VM Sku. + /// The list of supported disks for a given VM Sku. + /// A new instance for mocking. + public static SapDiskConfiguration SapDiskConfiguration(DiskVolumeConfiguration recommendedConfiguration = null, IEnumerable supportedConfigurations = null) + { + supportedConfigurations ??= new List(); + + return new SapDiskConfiguration(recommendedConfiguration, supportedConfigurations?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS. + /// The disk size in GB. + /// The minimum supported disk count. + /// The maximum supported disk count. + /// The disk Iops. + /// The disk provisioned throughput in MBps. + /// The disk tier, e.g. P10, E10. + /// A new instance for mocking. + public static DiskDetails DiskDetails(DiskSkuName? skuName = null, long? sizeGB = null, long? minimumSupportedDiskCount = null, long? maximumSupportedDiskCount = null, long? iopsReadWrite = null, long? mbpsReadWrite = null, string diskTier = null) + { + return new DiskDetails( + skuName != null ? new DiskSku(skuName, serializedAdditionalRawData: null) : null, + sizeGB, + minimumSupportedDiskCount, + maximumSupportedDiskCount, + iopsReadWrite, + mbpsReadWrite, + diskTier, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets the list of availability zone pairs. + /// A new instance for mocking. + public static SapAvailabilityZoneDetailsResult SapAvailabilityZoneDetailsResult(IEnumerable availabilityZonePairs = null) + { + availabilityZonePairs ??= new List(); + + return new SapAvailabilityZoneDetailsResult(availabilityZonePairs?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The zone A. + /// The zone B. + /// A new instance for mocking. + public static SapAvailabilityZonePair SapAvailabilityZonePair(long? zoneA = null, long? zoneB = null) + { + return new SapAvailabilityZonePair(zoneA, zoneB, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesArmClient.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesArmClient.cs new file mode 100644 index 000000000000..aad5abbcbc9e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesArmClient.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableSapVirtualInstancesArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableSapVirtualInstancesArmClient() + { + } + + /// 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 MockableSapVirtualInstancesArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableSapVirtualInstancesArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual SapVirtualInstanceResource GetSapVirtualInstanceResource(ResourceIdentifier id) + { + SapVirtualInstanceResource.ValidateResourceId(id); + return new SapVirtualInstanceResource(Client, id); + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual SapCentralServerInstanceResource GetSapCentralServerInstanceResource(ResourceIdentifier id) + { + SapCentralServerInstanceResource.ValidateResourceId(id); + return new SapCentralServerInstanceResource(Client, id); + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual SapDatabaseInstanceResource GetSapDatabaseInstanceResource(ResourceIdentifier id) + { + SapDatabaseInstanceResource.ValidateResourceId(id); + return new SapDatabaseInstanceResource(Client, id); + } + + /// + /// 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 resource ID of the resource to get. + /// Returns a object. + public virtual SapApplicationServerInstanceResource GetSapApplicationServerInstanceResource(ResourceIdentifier id) + { + SapApplicationServerInstanceResource.ValidateResourceId(id); + return new SapApplicationServerInstanceResource(Client, id); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesResourceGroupResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesResourceGroupResource.cs new file mode 100644 index 000000000000..ca026e2cf97d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesResourceGroupResource.cs @@ -0,0 +1,105 @@ +// 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.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableSapVirtualInstancesResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableSapVirtualInstancesResourceGroupResource() + { + } + + /// 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 MockableSapVirtualInstancesResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of SapVirtualInstanceResources in the ResourceGroupResource. + /// An object representing collection of SapVirtualInstanceResources and their operations over a SapVirtualInstanceResource. + public virtual SapVirtualInstanceCollection GetSapVirtualInstances() + { + return GetCachedClient(client => new SapVirtualInstanceCollection(client, Id)); + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSapVirtualInstanceAsync(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + return await GetSapVirtualInstances().GetAsync(sapVirtualInstanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSapVirtualInstance(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + return GetSapVirtualInstances().Get(sapVirtualInstanceName, cancellationToken); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesSubscriptionResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesSubscriptionResource.cs new file mode 100644 index 000000000000..e11cf5279920 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesSubscriptionResource.cs @@ -0,0 +1,449 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableSapVirtualInstancesSubscriptionResource : ArmResource + { + private ClientDiagnostics _sapVirtualInstanceClientDiagnostics; + private SapVirtualInstancesRestOperations _sapVirtualInstanceRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableSapVirtualInstancesSubscriptionResource() + { + } + + /// 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 MockableSapVirtualInstancesSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics SapVirtualInstanceClientDiagnostics => _sapVirtualInstanceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", SapVirtualInstanceResource.ResourceType.Namespace, Diagnostics); + private SapVirtualInstancesRestOperations SapVirtualInstanceRestClient => _sapVirtualInstanceRestClient ??= new SapVirtualInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SapVirtualInstanceResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSapVirtualInstancesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SapVirtualInstanceRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SapVirtualInstanceRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapVirtualInstanceResource(Client, SapVirtualInstanceData.DeserializeSapVirtualInstanceData(e)), SapVirtualInstanceClientDiagnostics, Pipeline, "MockableSapVirtualInstancesSubscriptionResource.GetSapVirtualInstances", "value", "nextLink", cancellationToken); + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSapVirtualInstances(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SapVirtualInstanceRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SapVirtualInstanceRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapVirtualInstanceResource(Client, SapVirtualInstanceData.DeserializeSapVirtualInstanceData(e)), SapVirtualInstanceClientDiagnostics, Pipeline, "MockableSapVirtualInstancesSubscriptionResource.GetSapVirtualInstances", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the sizing recommendations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSizingRecommendations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetSizingRecommendationsSapVirtualInstanceAsync(AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetSizingRecommendationsSapVirtualInstance"); + scope.Start(); + try + { + var response = await SapVirtualInstanceRestClient.GetSizingRecommendationsAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the sizing recommendations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSizingRecommendations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response GetSizingRecommendationsSapVirtualInstance(AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetSizingRecommendationsSapVirtualInstance"); + scope.Start(); + try + { + var response = SapVirtualInstanceRestClient.GetSizingRecommendations(Id.SubscriptionId, location, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSapSupportedSku + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetSapSupportedSkuSapVirtualInstanceAsync(AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetSapSupportedSkuSapVirtualInstance"); + scope.Start(); + try + { + var response = await SapVirtualInstanceRestClient.GetSapSupportedSkuAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSapSupportedSku + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response GetSapSupportedSkuSapVirtualInstance(AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetSapSupportedSkuSapVirtualInstance"); + scope.Start(); + try + { + var response = SapVirtualInstanceRestClient.GetSapSupportedSku(Id.SubscriptionId, location, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetDiskConfigurations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetDiskConfigurationsSapVirtualInstanceAsync(AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetDiskConfigurationsSapVirtualInstance"); + scope.Start(); + try + { + var response = await SapVirtualInstanceRestClient.GetDiskConfigurationsAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetDiskConfigurations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response GetDiskConfigurationsSapVirtualInstance(AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetDiskConfigurationsSapVirtualInstance"); + scope.Start(); + try + { + var response = SapVirtualInstanceRestClient.GetDiskConfigurations(Id.SubscriptionId, location, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetAvailabilityZoneDetails + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetAvailabilityZoneDetailsSapVirtualInstanceAsync(AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstance"); + scope.Start(); + try + { + var response = await SapVirtualInstanceRestClient.GetAvailabilityZoneDetailsAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetAvailabilityZoneDetails + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response GetAvailabilityZoneDetailsSapVirtualInstance(AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstance"); + scope.Start(); + try + { + var response = SapVirtualInstanceRestClient.GetAvailabilityZoneDetails(Id.SubscriptionId, location, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/SapVirtualInstancesExtensions.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/SapVirtualInstancesExtensions.cs new file mode 100644 index 000000000000..4ec5c61ddb30 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/SapVirtualInstancesExtensions.cs @@ -0,0 +1,573 @@ +// 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.Core; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SapVirtualInstances.Mocking; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// A class to add extension methods to Azure.ResourceManager.SapVirtualInstances. + public static partial class SapVirtualInstancesExtensions + { + private static MockableSapVirtualInstancesArmClient GetMockableSapVirtualInstancesArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableSapVirtualInstancesArmClient(client0)); + } + + private static MockableSapVirtualInstancesResourceGroupResource GetMockableSapVirtualInstancesResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableSapVirtualInstancesResourceGroupResource(client, resource.Id)); + } + + private static MockableSapVirtualInstancesSubscriptionResource GetMockableSapVirtualInstancesSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableSapVirtualInstancesSubscriptionResource(client, resource.Id)); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SapVirtualInstanceResource GetSapVirtualInstanceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSapVirtualInstancesArmClient(client).GetSapVirtualInstanceResource(id); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SapCentralServerInstanceResource GetSapCentralServerInstanceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSapVirtualInstancesArmClient(client).GetSapCentralServerInstanceResource(id); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SapDatabaseInstanceResource GetSapDatabaseInstanceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSapVirtualInstancesArmClient(client).GetSapDatabaseInstanceResource(id); + } + + /// + /// 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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SapApplicationServerInstanceResource GetSapApplicationServerInstanceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSapVirtualInstancesArmClient(client).GetSapApplicationServerInstanceResource(id); + } + + /// + /// Gets a collection of SapVirtualInstanceResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of SapVirtualInstanceResources and their operations over a SapVirtualInstanceResource. + public static SapVirtualInstanceCollection GetSapVirtualInstances(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableSapVirtualInstancesResourceGroupResource(resourceGroupResource).GetSapVirtualInstances(); + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetSapVirtualInstanceAsync(this ResourceGroupResource resourceGroupResource, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableSapVirtualInstancesResourceGroupResource(resourceGroupResource).GetSapVirtualInstanceAsync(sapVirtualInstanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetSapVirtualInstance(this ResourceGroupResource resourceGroupResource, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableSapVirtualInstancesResourceGroupResource(resourceGroupResource).GetSapVirtualInstance(sapVirtualInstanceName, cancellationToken); + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetSapVirtualInstancesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSapVirtualInstancesAsync(cancellationToken); + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetSapVirtualInstances(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSapVirtualInstances(cancellationToken); + } + + /// + /// Gets the sizing recommendations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSizingRecommendations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static async Task> GetSizingRecommendationsSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSizingRecommendationsSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the sizing recommendations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSizingRecommendations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static Response GetSizingRecommendationsSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSizingRecommendationsSapVirtualInstance(location, content, cancellationToken); + } + + /// + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSapSupportedSku + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static async Task> GetSapSupportedSkuSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSapSupportedSkuSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSapSupportedSku + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static Response GetSapSupportedSkuSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSapSupportedSkuSapVirtualInstance(location, content, cancellationToken); + } + + /// + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetDiskConfigurations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static async Task> GetDiskConfigurationsSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetDiskConfigurationsSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetDiskConfigurations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static Response GetDiskConfigurationsSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetDiskConfigurationsSapVirtualInstance(location, content, cancellationToken); + } + + /// + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetAvailabilityZoneDetails + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static async Task> GetAvailabilityZoneDetailsSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetAvailabilityZoneDetailsSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetAvailabilityZoneDetails + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static Response GetAvailabilityZoneDetailsSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetAvailabilityZoneDetailsSapVirtualInstance(location, content, cancellationToken); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Argument.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..058a05ba4c78 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..dd179878f74f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingList.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..7579b8ecf8b4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// 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.Linq; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..06b96bb6c04f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Optional.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..6e81f2408f30 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Optional.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; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..041d71542846 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs new file mode 100644 index 000000000000..80727235dfe5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs @@ -0,0 +1,30 @@ +// 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.Core; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class OperationStatusResultOperationSource : IOperationSource + { + OperationStatusResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + return OperationStatusResult.DeserializeOperationStatusResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + return OperationStatusResult.DeserializeOperationStatusResult(document.RootElement); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapApplicationServerInstanceOperationSource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapApplicationServerInstanceOperationSource.cs new file mode 100644 index 000000000000..ef9b8e3e6b87 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapApplicationServerInstanceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class SapApplicationServerInstanceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SapApplicationServerInstanceOperationSource(ArmClient client) + { + _client = client; + } + + SapApplicationServerInstanceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new SapApplicationServerInstanceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new SapApplicationServerInstanceResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapCentralServerInstanceOperationSource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapCentralServerInstanceOperationSource.cs new file mode 100644 index 000000000000..6ba94563a78d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapCentralServerInstanceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class SapCentralServerInstanceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SapCentralServerInstanceOperationSource(ArmClient client) + { + _client = client; + } + + SapCentralServerInstanceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new SapCentralServerInstanceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new SapCentralServerInstanceResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapDatabaseInstanceOperationSource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapDatabaseInstanceOperationSource.cs new file mode 100644 index 000000000000..f0279d2ad390 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapDatabaseInstanceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class SapDatabaseInstanceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SapDatabaseInstanceOperationSource(ArmClient client) + { + _client = client; + } + + SapDatabaseInstanceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new SapDatabaseInstanceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new SapDatabaseInstanceResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstanceOperationSource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstanceOperationSource.cs new file mode 100644 index 000000000000..412f26aaf925 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstanceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class SapVirtualInstanceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SapVirtualInstanceOperationSource(ArmClient client) + { + _client = client; + } + + SapVirtualInstanceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new SapVirtualInstanceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new SapVirtualInstanceResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperation.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperation.cs new file mode 100644 index 000000000000..36f0f8397130 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperation.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ +#pragma warning disable SA1649 // File name should match first type name + internal class SapVirtualInstancesArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of SapVirtualInstancesArmOperation for mocking. + protected SapVirtualInstancesArmOperation() + { + } + + internal SapVirtualInstancesArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal SapVirtualInstancesArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "SapVirtualInstancesArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperationOfT.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperationOfT.cs new file mode 100644 index 000000000000..ca203c47d1af --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperationOfT.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ +#pragma warning disable SA1649 // File name should match first type name + internal class SapVirtualInstancesArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of SapVirtualInstancesArmOperation for mocking. + protected SapVirtualInstancesArmOperation() + { + } + + internal SapVirtualInstancesArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal SapVirtualInstancesArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "SapVirtualInstancesArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.Serialization.cs new file mode 100644 index 000000000000..230c9e837cba --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ApplicationServerConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + writer.WritePropertyName("instanceCount"u8); + writer.WriteNumberValue(InstanceCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApplicationServerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApplicationServerConfiguration(document.RootElement, options); + } + + internal static ApplicationServerConfiguration DeserializeApplicationServerConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subnetId = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; + long instanceCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("instanceCount"u8)) + { + instanceCount = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApplicationServerConfiguration(subnetId, virtualMachineConfiguration, instanceCount, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApplicationServerConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ApplicationServerConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApplicationServerConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApplicationServerConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.cs new file mode 100644 index 000000000000..f21ab55ca189 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the application server configuration. + public partial class ApplicationServerConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of app server instances. + /// or is null. + public ApplicationServerConfiguration(string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount) + { + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(virtualMachineConfiguration, nameof(virtualMachineConfiguration)); + + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + } + + /// Initializes a new instance of . + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of app server instances. + /// Keeps track of any properties unknown to the library. + internal ApplicationServerConfiguration(string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount, IDictionary serializedAdditionalRawData) + { + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApplicationServerConfiguration() + { + } + + /// The subnet id. + public string SubnetId { get; set; } + /// Gets or sets the virtual machine configuration. + public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } + /// The number of app server instances. + public long InstanceCount { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.Serialization.cs new file mode 100644 index 000000000000..962eccd45a18 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ApplicationServerFullResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerFullResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(VirtualMachines)) + { + writer.WritePropertyName("virtualMachines"u8); + writer.WriteStartArray(); + foreach (var item in VirtualMachines) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AvailabilitySetName)) + { + writer.WritePropertyName("availabilitySetName"u8); + writer.WriteStringValue(AvailabilitySetName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApplicationServerFullResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerFullResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApplicationServerFullResourceNames(document.RootElement, options); + } + + internal static ApplicationServerFullResourceNames DeserializeApplicationServerFullResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList virtualMachines = default; + string availabilitySetName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachines"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(item, options)); + } + virtualMachines = array; + continue; + } + if (property.NameEquals("availabilitySetName"u8)) + { + availabilitySetName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApplicationServerFullResourceNames(virtualMachines ?? new ChangeTrackingList(), availabilitySetName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApplicationServerFullResourceNames)} does not support writing '{options.Format}' format."); + } + } + + ApplicationServerFullResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApplicationServerFullResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApplicationServerFullResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.cs new file mode 100644 index 000000000000..2684ded71ef5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The full resource names object for application layer resources. The number of entries in this list should be equal to the number VMs to be created for application layer. + public partial class ApplicationServerFullResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ApplicationServerFullResourceNames() + { + VirtualMachines = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of virtual machine naming details. + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-App-AvSet. + /// Keeps track of any properties unknown to the library. + internal ApplicationServerFullResourceNames(IList virtualMachines, string availabilitySetName, IDictionary serializedAdditionalRawData) + { + VirtualMachines = virtualMachines; + AvailabilitySetName = availabilitySetName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of virtual machine naming details. + public IList VirtualMachines { get; } + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-App-AvSet. + public string AvailabilitySetName { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVirtualMachineType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVirtualMachineType.cs new file mode 100644 index 000000000000..67767c76873c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVirtualMachineType.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.SapVirtualInstances.Models +{ + /// Defines the type of application server VM. + public readonly partial struct ApplicationServerVirtualMachineType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ApplicationServerVirtualMachineType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string StandbyValue = "Standby"; + private const string UnknownValue = "Unknown"; + + /// Active Application server vm type. + public static ApplicationServerVirtualMachineType Active { get; } = new ApplicationServerVirtualMachineType(ActiveValue); + /// Standby Application server vm type. + public static ApplicationServerVirtualMachineType Standby { get; } = new ApplicationServerVirtualMachineType(StandbyValue); + /// Unknown Application server vm type. + public static ApplicationServerVirtualMachineType Unknown { get; } = new ApplicationServerVirtualMachineType(UnknownValue); + /// Determines if two values are the same. + public static bool operator ==(ApplicationServerVirtualMachineType left, ApplicationServerVirtualMachineType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApplicationServerVirtualMachineType left, ApplicationServerVirtualMachineType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ApplicationServerVirtualMachineType(string value) => new ApplicationServerVirtualMachineType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApplicationServerVirtualMachineType other && Equals(other); + /// + public bool Equals(ApplicationServerVirtualMachineType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.Serialization.cs new file mode 100644 index 000000000000..70852bf29f4f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ApplicationServerVmDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerVmDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(VirtualMachineId)) + { + writer.WritePropertyName("virtualMachineId"u8); + writer.WriteStringValue(VirtualMachineId); + } + if (options.Format != "W" && Optional.IsCollectionDefined(StorageDetails)) + { + writer.WritePropertyName("storageDetails"u8); + writer.WriteStartArray(); + foreach (var item in StorageDetails) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApplicationServerVmDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerVmDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApplicationServerVmDetails(document.RootElement, options); + } + + internal static ApplicationServerVmDetails DeserializeApplicationServerVmDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApplicationServerVirtualMachineType? type = default; + string virtualMachineId = default; + IReadOnlyList storageDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ApplicationServerVirtualMachineType(property.Value.GetString()); + continue; + } + if (property.NameEquals("virtualMachineId"u8)) + { + virtualMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + storageDetails = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApplicationServerVmDetails(type, virtualMachineId, storageDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApplicationServerVmDetails)} does not support writing '{options.Format}' format."); + } + } + + ApplicationServerVmDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApplicationServerVmDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApplicationServerVmDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.cs new file mode 100644 index 000000000000..e6ca6f6ac72e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.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.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The Application Server VM Details. + public partial class ApplicationServerVmDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ApplicationServerVmDetails() + { + StorageDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Defines the type of application server VM. + /// The virtual machine id. + /// Storage details of all the Storage Accounts attached to the App Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// Keeps track of any properties unknown to the library. + internal ApplicationServerVmDetails(ApplicationServerVirtualMachineType? type, string virtualMachineId, IReadOnlyList storageDetails, IDictionary serializedAdditionalRawData) + { + Type = type; + VirtualMachineId = virtualMachineId; + StorageDetails = storageDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Defines the type of application server VM. + public ApplicationServerVirtualMachineType? Type { get; } + /// The virtual machine id. + public string VirtualMachineId { get; } + /// Storage details of all the Storage Accounts attached to the App Virtual Machine. For e.g. NFS on AFS Shared Storage. + public IReadOnlyList StorageDetails { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.Serialization.cs new file mode 100644 index 000000000000..adac74407796 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class CentralServerConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + writer.WritePropertyName("instanceCount"u8); + writer.WriteNumberValue(InstanceCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CentralServerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCentralServerConfiguration(document.RootElement, options); + } + + internal static CentralServerConfiguration DeserializeCentralServerConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subnetId = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; + long instanceCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("instanceCount"u8)) + { + instanceCount = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CentralServerConfiguration(subnetId, virtualMachineConfiguration, instanceCount, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CentralServerConfiguration)} does not support writing '{options.Format}' format."); + } + } + + CentralServerConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCentralServerConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CentralServerConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.cs new file mode 100644 index 000000000000..53b7f9ec28b2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the central server configuration. + public partial class CentralServerConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of central server VMs. + /// or is null. + public CentralServerConfiguration(string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount) + { + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(virtualMachineConfiguration, nameof(virtualMachineConfiguration)); + + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + } + + /// Initializes a new instance of . + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of central server VMs. + /// Keeps track of any properties unknown to the library. + internal CentralServerConfiguration(string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount, IDictionary serializedAdditionalRawData) + { + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CentralServerConfiguration() + { + } + + /// The subnet id. + public string SubnetId { get; set; } + /// Gets or sets the virtual machine configuration. + public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } + /// The number of central server VMs. + public long InstanceCount { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.Serialization.cs new file mode 100644 index 000000000000..1cbfd492a1ca --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class CentralServerFullResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerFullResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(VirtualMachines)) + { + writer.WritePropertyName("virtualMachines"u8); + writer.WriteStartArray(); + foreach (var item in VirtualMachines) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AvailabilitySetName)) + { + writer.WritePropertyName("availabilitySetName"u8); + writer.WriteStringValue(AvailabilitySetName); + } + if (Optional.IsDefined(LoadBalancer)) + { + writer.WritePropertyName("loadBalancer"u8); + writer.WriteObjectValue(LoadBalancer, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CentralServerFullResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerFullResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCentralServerFullResourceNames(document.RootElement, options); + } + + internal static CentralServerFullResourceNames DeserializeCentralServerFullResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList virtualMachines = default; + string availabilitySetName = default; + LoadBalancerResourceNames loadBalancer = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachines"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(item, options)); + } + virtualMachines = array; + continue; + } + if (property.NameEquals("availabilitySetName"u8)) + { + availabilitySetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBalancer = LoadBalancerResourceNames.DeserializeLoadBalancerResourceNames(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CentralServerFullResourceNames(virtualMachines ?? new ChangeTrackingList(), availabilitySetName, loadBalancer, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CentralServerFullResourceNames)} does not support writing '{options.Format}' format."); + } + } + + CentralServerFullResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCentralServerFullResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CentralServerFullResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.cs new file mode 100644 index 000000000000..dbfcd78a10e8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The full resource names object for central server layer resources. + public partial class CentralServerFullResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CentralServerFullResourceNames() + { + VirtualMachines = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of names for all ASCS virtual machines to be deployed. The number of entries in this list should be equal to the number VMs to be created for ASCS layer. At maximum, there can be two virtual machines at this layer: ASCS and ERS. + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-ASCS-AvSet. + /// The resource names object for load balancer and related resources. + /// Keeps track of any properties unknown to the library. + internal CentralServerFullResourceNames(IList virtualMachines, string availabilitySetName, LoadBalancerResourceNames loadBalancer, IDictionary serializedAdditionalRawData) + { + VirtualMachines = virtualMachines; + AvailabilitySetName = availabilitySetName; + LoadBalancer = loadBalancer; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of names for all ASCS virtual machines to be deployed. The number of entries in this list should be equal to the number VMs to be created for ASCS layer. At maximum, there can be two virtual machines at this layer: ASCS and ERS. + public IList VirtualMachines { get; } + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-ASCS-AvSet. + public string AvailabilitySetName { get; set; } + /// The resource names object for load balancer and related resources. + public LoadBalancerResourceNames LoadBalancer { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVirtualMachineType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVirtualMachineType.cs new file mode 100644 index 000000000000..49877dfa61b0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVirtualMachineType.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the type of central server VM. + public readonly partial struct CentralServerVirtualMachineType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CentralServerVirtualMachineType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrimaryValue = "Primary"; + private const string SecondaryValue = "Secondary"; + private const string UnknownValue = "Unknown"; + private const string ASCSValue = "ASCS"; + private const string ERSInactiveValue = "ERSInactive"; + private const string ERSValue = "ERS"; + private const string StandbyValue = "Standby"; + + /// Primary central server vm. + public static CentralServerVirtualMachineType Primary { get; } = new CentralServerVirtualMachineType(PrimaryValue); + /// Secondary central server vm. + public static CentralServerVirtualMachineType Secondary { get; } = new CentralServerVirtualMachineType(SecondaryValue); + /// Central server vm type unknown. + public static CentralServerVirtualMachineType Unknown { get; } = new CentralServerVirtualMachineType(UnknownValue); + /// ASCS Central server vm type. + public static CentralServerVirtualMachineType ASCS { get; } = new CentralServerVirtualMachineType(ASCSValue); + /// ERSInactive Central server vm type. + public static CentralServerVirtualMachineType ERSInactive { get; } = new CentralServerVirtualMachineType(ERSInactiveValue); + /// ERS Central server vm type. + public static CentralServerVirtualMachineType ERS { get; } = new CentralServerVirtualMachineType(ERSValue); + /// Standby Central server vm type. + public static CentralServerVirtualMachineType Standby { get; } = new CentralServerVirtualMachineType(StandbyValue); + /// Determines if two values are the same. + public static bool operator ==(CentralServerVirtualMachineType left, CentralServerVirtualMachineType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CentralServerVirtualMachineType left, CentralServerVirtualMachineType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CentralServerVirtualMachineType(string value) => new CentralServerVirtualMachineType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CentralServerVirtualMachineType other && Equals(other); + /// + public bool Equals(CentralServerVirtualMachineType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.Serialization.cs new file mode 100644 index 000000000000..9849391422cd --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class CentralServerVmDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerVmDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(VirtualMachineId)) + { + writer.WritePropertyName("virtualMachineId"u8); + writer.WriteStringValue(VirtualMachineId); + } + if (options.Format != "W" && Optional.IsCollectionDefined(StorageDetails)) + { + writer.WritePropertyName("storageDetails"u8); + writer.WriteStartArray(); + foreach (var item in StorageDetails) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CentralServerVmDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerVmDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCentralServerVmDetails(document.RootElement, options); + } + + internal static CentralServerVmDetails DeserializeCentralServerVmDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CentralServerVirtualMachineType? type = default; + string virtualMachineId = default; + IReadOnlyList storageDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new CentralServerVirtualMachineType(property.Value.GetString()); + continue; + } + if (property.NameEquals("virtualMachineId"u8)) + { + virtualMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + storageDetails = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CentralServerVmDetails(type, virtualMachineId, storageDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CentralServerVmDetails)} does not support writing '{options.Format}' format."); + } + } + + CentralServerVmDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCentralServerVmDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CentralServerVmDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.cs new file mode 100644 index 000000000000..626e32d3317b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.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.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Central Services Instance VM details. + public partial class CentralServerVmDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal CentralServerVmDetails() + { + StorageDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Defines the type of central server VM. + /// The virtual machine id. + /// Storage details of all the Storage Accounts attached to the ASCS Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// Keeps track of any properties unknown to the library. + internal CentralServerVmDetails(CentralServerVirtualMachineType? type, string virtualMachineId, IReadOnlyList storageDetails, IDictionary serializedAdditionalRawData) + { + Type = type; + VirtualMachineId = virtualMachineId; + StorageDetails = storageDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Defines the type of central server VM. + public CentralServerVirtualMachineType? Type { get; } + /// The virtual machine id. + public string VirtualMachineId { get; } + /// Storage details of all the Storage Accounts attached to the ASCS Virtual Machine. For e.g. NFS on AFS Shared Storage. + public IReadOnlyList StorageDetails { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.Serialization.cs new file mode 100644 index 000000000000..4c540a2ff405 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.Serialization.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class CreateAndMountFileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateAndMountFileShareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(ResourceGroup)) + { + writer.WritePropertyName("resourceGroup"u8); + writer.WriteStringValue(ResourceGroup); + } + if (Optional.IsDefined(StorageAccountName)) + { + writer.WritePropertyName("storageAccountName"u8); + writer.WriteStringValue(StorageAccountName); + } + } + + CreateAndMountFileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateAndMountFileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateAndMountFileShareConfiguration(document.RootElement, options); + } + + internal static CreateAndMountFileShareConfiguration DeserializeCreateAndMountFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string resourceGroup = default; + string storageAccountName = default; + FileShareConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceGroup"u8)) + { + resourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountName"u8)) + { + storageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("configurationType"u8)) + { + configurationType = new FileShareConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CreateAndMountFileShareConfiguration(configurationType, serializedAdditionalRawData, resourceGroup, storageAccountName); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CreateAndMountFileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + CreateAndMountFileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCreateAndMountFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateAndMountFileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.cs new file mode 100644 index 000000000000..fc2dbbd2fecb --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the file share configuration where the transport directory fileshare is created and mounted as a part of the create infra flow. Please pre-create the resource group you intend to place the transport directory in. The storage account and fileshare will be auto-created by the ACSS and doesn't need to be pre-created. + public partial class CreateAndMountFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of . + public CreateAndMountFileShareConfiguration() + { + ConfigurationType = FileShareConfigurationType.CreateAndMount; + } + + /// Initializes a new instance of . + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + /// Keeps track of any properties unknown to the library. + /// The name of transport file share resource group. This should be pre created by the customer. The app rg is used in case of missing input. + /// The name of file share storage account name . A custom name is used in case of missing input. + internal CreateAndMountFileShareConfiguration(FileShareConfigurationType configurationType, IDictionary serializedAdditionalRawData, string resourceGroup, string storageAccountName) : base(configurationType, serializedAdditionalRawData) + { + ResourceGroup = resourceGroup; + StorageAccountName = storageAccountName; + ConfigurationType = configurationType; + } + + /// The name of transport file share resource group. This should be pre created by the customer. The app rg is used in case of missing input. + public string ResourceGroup { get; set; } + /// The name of file share storage account name . A custom name is used in case of missing input. + public string StorageAccountName { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.Serialization.cs new file mode 100644 index 000000000000..edb305cd8ea4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DatabaseConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DatabaseType)) + { + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.Value.ToString()); + } + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + writer.WritePropertyName("instanceCount"u8); + writer.WriteNumberValue(InstanceCount); + if (Optional.IsDefined(DiskConfiguration)) + { + writer.WritePropertyName("diskConfiguration"u8); + writer.WriteObjectValue(DiskConfiguration, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatabaseConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseConfiguration(document.RootElement, options); + } + + internal static DatabaseConfiguration DeserializeDatabaseConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapDatabaseType? databaseType = default; + string subnetId = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; + long instanceCount = default; + DiskConfiguration diskConfiguration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("databaseType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("instanceCount"u8)) + { + instanceCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskConfiguration = DiskConfiguration.DeserializeDiskConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatabaseConfiguration( + databaseType, + subnetId, + virtualMachineConfiguration, + instanceCount, + diskConfiguration, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DatabaseConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DatabaseConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatabaseConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatabaseConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.cs new file mode 100644 index 000000000000..69aee508d675 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the database configuration. + public partial class DatabaseConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of database VMs. + /// or is null. + public DatabaseConfiguration(string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount) + { + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(virtualMachineConfiguration, nameof(virtualMachineConfiguration)); + + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + } + + /// Initializes a new instance of . + /// The database type. + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of database VMs. + /// Gets or sets the disk configuration. + /// Keeps track of any properties unknown to the library. + internal DatabaseConfiguration(SapDatabaseType? databaseType, string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount, DiskConfiguration diskConfiguration, IDictionary serializedAdditionalRawData) + { + DatabaseType = databaseType; + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + DiskConfiguration = diskConfiguration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DatabaseConfiguration() + { + } + + /// The database type. + public SapDatabaseType? DatabaseType { get; set; } + /// The subnet id. + public string SubnetId { get; set; } + /// Gets or sets the virtual machine configuration. + public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } + /// The number of database VMs. + public long InstanceCount { get; set; } + /// Gets or sets the disk configuration. + internal DiskConfiguration DiskConfiguration { get; set; } + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IDictionary DiskVolumeConfigurations + { + get + { + if (DiskConfiguration is null) + DiskConfiguration = new DiskConfiguration(); + return DiskConfiguration.DiskVolumeConfigurations; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.Serialization.cs new file mode 100644 index 000000000000..26fcacc0da32 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DatabaseServerFullResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseServerFullResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(VirtualMachines)) + { + writer.WritePropertyName("virtualMachines"u8); + writer.WriteStartArray(); + foreach (var item in VirtualMachines) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AvailabilitySetName)) + { + writer.WritePropertyName("availabilitySetName"u8); + writer.WriteStringValue(AvailabilitySetName); + } + if (Optional.IsDefined(LoadBalancer)) + { + writer.WritePropertyName("loadBalancer"u8); + writer.WriteObjectValue(LoadBalancer, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatabaseServerFullResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseServerFullResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseServerFullResourceNames(document.RootElement, options); + } + + internal static DatabaseServerFullResourceNames DeserializeDatabaseServerFullResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList virtualMachines = default; + string availabilitySetName = default; + LoadBalancerResourceNames loadBalancer = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachines"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(item, options)); + } + virtualMachines = array; + continue; + } + if (property.NameEquals("availabilitySetName"u8)) + { + availabilitySetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBalancer = LoadBalancerResourceNames.DeserializeLoadBalancerResourceNames(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatabaseServerFullResourceNames(virtualMachines ?? new ChangeTrackingList(), availabilitySetName, loadBalancer, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DatabaseServerFullResourceNames)} does not support writing '{options.Format}' format."); + } + } + + DatabaseServerFullResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatabaseServerFullResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatabaseServerFullResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.cs new file mode 100644 index 000000000000..b2b72f89a779 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The full resource names object for database layer resources. The number of entries in this list should be equal to the number VMs to be created for database layer. + public partial class DatabaseServerFullResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DatabaseServerFullResourceNames() + { + VirtualMachines = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of virtual machine naming details. + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-DB-AvSet. + /// The resource names object for load balancer and related resources. + /// Keeps track of any properties unknown to the library. + internal DatabaseServerFullResourceNames(IList virtualMachines, string availabilitySetName, LoadBalancerResourceNames loadBalancer, IDictionary serializedAdditionalRawData) + { + VirtualMachines = virtualMachines; + AvailabilitySetName = availabilitySetName; + LoadBalancer = loadBalancer; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of virtual machine naming details. + public IList VirtualMachines { get; } + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-DB-AvSet. + public string AvailabilitySetName { get; set; } + /// The resource names object for load balancer and related resources. + public LoadBalancerResourceNames LoadBalancer { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.Serialization.cs new file mode 100644 index 000000000000..94cf23382ef0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DatabaseVmDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseVmDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(VirtualMachineId)) + { + writer.WritePropertyName("virtualMachineId"u8); + writer.WriteStringValue(VirtualMachineId); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(StorageDetails)) + { + writer.WritePropertyName("storageDetails"u8); + writer.WriteStartArray(); + foreach (var item in StorageDetails) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatabaseVmDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseVmDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseVmDetails(document.RootElement, options); + } + + internal static DatabaseVmDetails DeserializeDatabaseVmDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string virtualMachineId = default; + SapVirtualInstanceStatus? status = default; + IReadOnlyList storageDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachineId"u8)) + { + virtualMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SapVirtualInstanceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + storageDetails = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatabaseVmDetails(virtualMachineId, status, storageDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DatabaseVmDetails)} does not support writing '{options.Format}' format."); + } + } + + DatabaseVmDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatabaseVmDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatabaseVmDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.cs new file mode 100644 index 000000000000..374863a609ff --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.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.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Database VM details. + public partial class DatabaseVmDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DatabaseVmDetails() + { + StorageDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The virtual machine id. + /// Defines the SAP Instance status. + /// Storage details of all the Storage Accounts attached to the Database Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// Keeps track of any properties unknown to the library. + internal DatabaseVmDetails(string virtualMachineId, SapVirtualInstanceStatus? status, IReadOnlyList storageDetails, IDictionary serializedAdditionalRawData) + { + VirtualMachineId = virtualMachineId; + Status = status; + StorageDetails = storageDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The virtual machine id. + public string VirtualMachineId { get; } + /// Defines the SAP Instance status. + public SapVirtualInstanceStatus? Status { get; } + /// Storage details of all the Storage Accounts attached to the Database Virtual Machine. For e.g. NFS on AFS Shared Storage. + public IReadOnlyList StorageDetails { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.Serialization.cs new file mode 100644 index 000000000000..2beacb9bc19c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DeployerVmPackages : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeployerVmPackages)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Uri)) + { + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Uri); + } + if (Optional.IsDefined(StorageAccountId)) + { + writer.WritePropertyName("storageAccountId"u8); + writer.WriteStringValue(StorageAccountId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeployerVmPackages IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeployerVmPackages)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeployerVmPackages(document.RootElement, options); + } + + internal static DeployerVmPackages DeserializeDeployerVmPackages(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string url = default; + string storageAccountId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountId"u8)) + { + storageAccountId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeployerVmPackages(url, storageAccountId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeployerVmPackages)} does not support writing '{options.Format}' format."); + } + } + + DeployerVmPackages IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDeployerVmPackages(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeployerVmPackages)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.cs new file mode 100644 index 000000000000..37d42b92156b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the url and storage account ID where deployer VM packages are uploaded. + public partial class DeployerVmPackages + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeployerVmPackages() + { + } + + /// Initializes a new instance of . + /// The URL to the deployer VM packages file. + /// The deployer VM packages storage account id. + /// Keeps track of any properties unknown to the library. + internal DeployerVmPackages(string uri, string storageAccountId, IDictionary serializedAdditionalRawData) + { + Uri = uri; + StorageAccountId = storageAccountId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The URL to the deployer VM packages file. + public string Uri { get; set; } + /// The deployer VM packages storage account id. + public string StorageAccountId { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.Serialization.cs new file mode 100644 index 000000000000..37264519b712 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DeploymentConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(AppLocation)) + { + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + } + if (Optional.IsDefined(InfrastructureConfiguration)) + { + writer.WritePropertyName("infrastructureConfiguration"u8); + writer.WriteObjectValue(InfrastructureConfiguration, options); + } + if (Optional.IsDefined(SoftwareConfiguration)) + { + writer.WritePropertyName("softwareConfiguration"u8); + writer.WriteObjectValue(SoftwareConfiguration, options); + } + } + + DeploymentConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentConfiguration(document.RootElement, options); + } + + internal static DeploymentConfiguration DeserializeDeploymentConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + InfrastructureConfiguration infrastructureConfiguration = default; + SoftwareConfiguration softwareConfiguration = default; + SapConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("infrastructureConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + infrastructureConfiguration = InfrastructureConfiguration.DeserializeInfrastructureConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("softwareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softwareConfiguration = SoftwareConfiguration.DeserializeSoftwareConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("configurationType"u8)) + { + configurationType = new SapConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentConfiguration(configurationType, serializedAdditionalRawData, appLocation, infrastructureConfiguration, softwareConfiguration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DeploymentConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDeploymentConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.cs new file mode 100644 index 000000000000..0721863185e0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Deployment Configuration. + public partial class DeploymentConfiguration : SapConfiguration + { + /// Initializes a new instance of . + public DeploymentConfiguration() + { + ConfigurationType = SapConfigurationType.Deployment; + } + + /// Initializes a new instance of . + /// The configuration type. Eg: Deployment/Discovery. + /// Keeps track of any properties unknown to the library. + /// The geo-location where the SAP system is to be created. + /// + /// The infrastructure configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// The software configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + internal DeploymentConfiguration(SapConfigurationType configurationType, IDictionary serializedAdditionalRawData, string appLocation, InfrastructureConfiguration infrastructureConfiguration, SoftwareConfiguration softwareConfiguration) : base(configurationType, serializedAdditionalRawData) + { + AppLocation = appLocation; + InfrastructureConfiguration = infrastructureConfiguration; + SoftwareConfiguration = softwareConfiguration; + ConfigurationType = configurationType; + } + + /// The geo-location where the SAP system is to be created. + public string AppLocation { get; set; } + /// + /// The infrastructure configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public InfrastructureConfiguration InfrastructureConfiguration { get; set; } + /// + /// The software configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public SoftwareConfiguration SoftwareConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.Serialization.cs new file mode 100644 index 000000000000..e59c4d9fd475 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.Serialization.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DeploymentWithOSConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentWithOSConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(AppLocation)) + { + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + } + if (Optional.IsDefined(InfrastructureConfiguration)) + { + writer.WritePropertyName("infrastructureConfiguration"u8); + writer.WriteObjectValue(InfrastructureConfiguration, options); + } + if (Optional.IsDefined(SoftwareConfiguration)) + { + writer.WritePropertyName("softwareConfiguration"u8); + writer.WriteObjectValue(SoftwareConfiguration, options); + } + if (Optional.IsDefined(OSSapConfiguration)) + { + writer.WritePropertyName("osSapConfiguration"u8); + writer.WriteObjectValue(OSSapConfiguration, options); + } + } + + DeploymentWithOSConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentWithOSConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentWithOSConfiguration(document.RootElement, options); + } + + internal static DeploymentWithOSConfiguration DeserializeDeploymentWithOSConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + InfrastructureConfiguration infrastructureConfiguration = default; + SoftwareConfiguration softwareConfiguration = default; + OSSapConfiguration osSapConfiguration = default; + SapConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("infrastructureConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + infrastructureConfiguration = InfrastructureConfiguration.DeserializeInfrastructureConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("softwareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softwareConfiguration = SoftwareConfiguration.DeserializeSoftwareConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("osSapConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + osSapConfiguration = OSSapConfiguration.DeserializeOSSapConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("configurationType"u8)) + { + configurationType = new SapConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentWithOSConfiguration( + configurationType, + serializedAdditionalRawData, + appLocation, + infrastructureConfiguration, + softwareConfiguration, + osSapConfiguration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentWithOSConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DeploymentWithOSConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDeploymentWithOSConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentWithOSConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.cs new file mode 100644 index 000000000000..224d0e3f3b25 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Deployment along with OS Configuration. + public partial class DeploymentWithOSConfiguration : SapConfiguration + { + /// Initializes a new instance of . + public DeploymentWithOSConfiguration() + { + ConfigurationType = SapConfigurationType.DeploymentWithOSConfig; + } + + /// Initializes a new instance of . + /// The configuration type. Eg: Deployment/Discovery. + /// Keeps track of any properties unknown to the library. + /// The geo-location where the SAP system is to be created. + /// + /// The infrastructure configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// The software configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// The OS and SAP configuration. + internal DeploymentWithOSConfiguration(SapConfigurationType configurationType, IDictionary serializedAdditionalRawData, string appLocation, InfrastructureConfiguration infrastructureConfiguration, SoftwareConfiguration softwareConfiguration, OSSapConfiguration osSapConfiguration) : base(configurationType, serializedAdditionalRawData) + { + AppLocation = appLocation; + InfrastructureConfiguration = infrastructureConfiguration; + SoftwareConfiguration = softwareConfiguration; + OSSapConfiguration = osSapConfiguration; + ConfigurationType = configurationType; + } + + /// The geo-location where the SAP system is to be created. + public string AppLocation { get; set; } + /// + /// The infrastructure configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public InfrastructureConfiguration InfrastructureConfiguration { get; set; } + /// + /// The software configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public SoftwareConfiguration SoftwareConfiguration { get; set; } + /// The OS and SAP configuration. + public OSSapConfiguration OSSapConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.Serialization.cs new file mode 100644 index 000000000000..82c77d50c00d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DiscoveryConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoveryConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(CentralServerVmId)) + { + writer.WritePropertyName("centralServerVmId"u8); + writer.WriteStringValue(CentralServerVmId); + } + if (Optional.IsDefined(ManagedRgStorageAccountName)) + { + writer.WritePropertyName("managedRgStorageAccountName"u8); + writer.WriteStringValue(ManagedRgStorageAccountName); + } + if (options.Format != "W" && Optional.IsDefined(AppLocation)) + { + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + } + } + + DiscoveryConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoveryConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiscoveryConfiguration(document.RootElement, options); + } + + internal static DiscoveryConfiguration DeserializeDiscoveryConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string centralServerVmId = default; + string managedRgStorageAccountName = default; + string appLocation = default; + SapConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("centralServerVmId"u8)) + { + centralServerVmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("managedRgStorageAccountName"u8)) + { + managedRgStorageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("configurationType"u8)) + { + configurationType = new SapConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiscoveryConfiguration(configurationType, serializedAdditionalRawData, centralServerVmId, managedRgStorageAccountName, appLocation); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiscoveryConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DiscoveryConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiscoveryConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiscoveryConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.cs new file mode 100644 index 000000000000..84ebbd127936 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Discovery Details. + public partial class DiscoveryConfiguration : SapConfiguration + { + /// Initializes a new instance of . + public DiscoveryConfiguration() + { + ConfigurationType = SapConfigurationType.Discovery; + } + + /// Initializes a new instance of . + /// The configuration type. Eg: Deployment/Discovery. + /// Keeps track of any properties unknown to the library. + /// The virtual machine ID of the Central Server. + /// The custom storage account name for the storage account created by the service in the managed resource group created as part of VIS deployment.<br><br>Refer to the storage account naming rules [here](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage).<br><br>If not provided, the service will create the storage account with a random name. + /// The geo-location where the SAP system exists. + internal DiscoveryConfiguration(SapConfigurationType configurationType, IDictionary serializedAdditionalRawData, string centralServerVmId, string managedRgStorageAccountName, string appLocation) : base(configurationType, serializedAdditionalRawData) + { + CentralServerVmId = centralServerVmId; + ManagedRgStorageAccountName = managedRgStorageAccountName; + AppLocation = appLocation; + ConfigurationType = configurationType; + } + + /// The virtual machine ID of the Central Server. + public string CentralServerVmId { get; set; } + /// The custom storage account name for the storage account created by the service in the managed resource group created as part of VIS deployment.<br><br>Refer to the storage account naming rules [here](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage).<br><br>If not provided, the service will create the storage account with a random name. + public string ManagedRgStorageAccountName { get; set; } + /// The geo-location where the SAP system exists. + public string AppLocation { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.Serialization.cs new file mode 100644 index 000000000000..384420975b65 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class DiskConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(DiskVolumeConfigurations)) + { + writer.WritePropertyName("diskVolumeConfigurations"u8); + writer.WriteStartObject(); + foreach (var item in DiskVolumeConfigurations) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskConfiguration(document.RootElement, options); + } + + internal static DiskConfiguration DeserializeDiskConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary diskVolumeConfigurations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("diskVolumeConfigurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, DiskVolumeConfiguration.DeserializeDiskVolumeConfiguration(property0.Value, options)); + } + diskVolumeConfigurations = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskConfiguration(diskVolumeConfigurations ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiskConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DiskConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiskConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.cs new file mode 100644 index 000000000000..acbc18a0e4fc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The Disk Configuration Details. + internal partial class DiskConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DiskConfiguration() + { + DiskVolumeConfigurations = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + /// Keeps track of any properties unknown to the library. + internal DiskConfiguration(IDictionary diskVolumeConfigurations, IDictionary serializedAdditionalRawData) + { + DiskVolumeConfigurations = diskVolumeConfigurations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IDictionary DiskVolumeConfigurations { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.Serialization.cs new file mode 100644 index 000000000000..b225d9dc6abe --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.Serialization.cs @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DiskDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (Optional.IsDefined(SizeGB)) + { + writer.WritePropertyName("sizeGB"u8); + writer.WriteNumberValue(SizeGB.Value); + } + if (Optional.IsDefined(MinimumSupportedDiskCount)) + { + writer.WritePropertyName("minimumSupportedDiskCount"u8); + writer.WriteNumberValue(MinimumSupportedDiskCount.Value); + } + if (Optional.IsDefined(MaximumSupportedDiskCount)) + { + writer.WritePropertyName("maximumSupportedDiskCount"u8); + writer.WriteNumberValue(MaximumSupportedDiskCount.Value); + } + if (Optional.IsDefined(IopsReadWrite)) + { + writer.WritePropertyName("iopsReadWrite"u8); + writer.WriteNumberValue(IopsReadWrite.Value); + } + if (Optional.IsDefined(MbpsReadWrite)) + { + writer.WritePropertyName("mbpsReadWrite"u8); + writer.WriteNumberValue(MbpsReadWrite.Value); + } + if (Optional.IsDefined(DiskTier)) + { + writer.WritePropertyName("diskTier"u8); + writer.WriteStringValue(DiskTier); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskDetails(document.RootElement, options); + } + + internal static DiskDetails DeserializeDiskDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DiskSku sku = default; + long? sizeGB = default; + long? minimumSupportedDiskCount = default; + long? maximumSupportedDiskCount = default; + long? iopsReadWrite = default; + long? mbpsReadWrite = default; + string diskTier = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = DiskSku.DeserializeDiskSku(property.Value, options); + continue; + } + if (property.NameEquals("sizeGB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sizeGB = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("minimumSupportedDiskCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minimumSupportedDiskCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("maximumSupportedDiskCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maximumSupportedDiskCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("iopsReadWrite"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + iopsReadWrite = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("mbpsReadWrite"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mbpsReadWrite = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskTier"u8)) + { + diskTier = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskDetails( + sku, + sizeGB, + minimumSupportedDiskCount, + maximumSupportedDiskCount, + iopsReadWrite, + mbpsReadWrite, + diskTier, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiskDetails)} does not support writing '{options.Format}' format."); + } + } + + DiskDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiskDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.cs new file mode 100644 index 000000000000..287917b944e9 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The supported disk size details for a disk type. + public partial class DiskDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DiskDetails() + { + } + + /// Initializes a new instance of . + /// The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS. + /// The disk size in GB. + /// The minimum supported disk count. + /// The maximum supported disk count. + /// The disk Iops. + /// The disk provisioned throughput in MBps. + /// The disk tier, e.g. P10, E10. + /// Keeps track of any properties unknown to the library. + internal DiskDetails(DiskSku sku, long? sizeGB, long? minimumSupportedDiskCount, long? maximumSupportedDiskCount, long? iopsReadWrite, long? mbpsReadWrite, string diskTier, IDictionary serializedAdditionalRawData) + { + Sku = sku; + SizeGB = sizeGB; + MinimumSupportedDiskCount = minimumSupportedDiskCount; + MaximumSupportedDiskCount = maximumSupportedDiskCount; + IopsReadWrite = iopsReadWrite; + MbpsReadWrite = mbpsReadWrite; + DiskTier = diskTier; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS. + internal DiskSku Sku { get; } + /// Defines the disk sku name. + public DiskSkuName? SkuName + { + get => Sku?.Name; + } + + /// The disk size in GB. + public long? SizeGB { get; } + /// The minimum supported disk count. + public long? MinimumSupportedDiskCount { get; } + /// The maximum supported disk count. + public long? MaximumSupportedDiskCount { get; } + /// The disk Iops. + public long? IopsReadWrite { get; } + /// The disk provisioned throughput in MBps. + public long? MbpsReadWrite { get; } + /// The disk tier, e.g. P10, E10. + public string DiskTier { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.Serialization.cs new file mode 100644 index 000000000000..7f7547af8623 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class DiskSku : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskSku)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskSku)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskSku(document.RootElement, options); + } + + internal static DiskSku DeserializeDiskSku(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DiskSkuName? name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = new DiskSkuName(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskSku(name, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiskSku)} does not support writing '{options.Format}' format."); + } + } + + DiskSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiskSku(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskSku)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.cs new file mode 100644 index 000000000000..60a805bbce3b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS. + internal partial class DiskSku + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DiskSku() + { + } + + /// Initializes a new instance of . + /// Defines the disk sku name. + /// Keeps track of any properties unknown to the library. + internal DiskSku(DiskSkuName? name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Defines the disk sku name. + public DiskSkuName? Name { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSkuName.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSkuName.cs new file mode 100644 index 000000000000..63def1a37360 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSkuName.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the disk sku name. + public readonly partial struct DiskSkuName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DiskSkuName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StandardLRSValue = "Standard_LRS"; + private const string PremiumLRSValue = "Premium_LRS"; + private const string StandardSSDLRSValue = "StandardSSD_LRS"; + private const string UltraSSDLRSValue = "UltraSSD_LRS"; + private const string PremiumZRSValue = "Premium_ZRS"; + private const string StandardSSDZRSValue = "StandardSSD_ZRS"; + private const string PremiumV2LRSValue = "PremiumV2_LRS"; + + /// Standard LRS Disk SKU. + public static DiskSkuName StandardLRS { get; } = new DiskSkuName(StandardLRSValue); + /// Premium_LRS Disk SKU. + public static DiskSkuName PremiumLRS { get; } = new DiskSkuName(PremiumLRSValue); + /// StandardSSD_LRS Disk SKU. + public static DiskSkuName StandardSSDLRS { get; } = new DiskSkuName(StandardSSDLRSValue); + /// UltraSSD_LRS Disk SKU. + public static DiskSkuName UltraSSDLRS { get; } = new DiskSkuName(UltraSSDLRSValue); + /// Premium_ZRS Disk SKU. + public static DiskSkuName PremiumZRS { get; } = new DiskSkuName(PremiumZRSValue); + /// StandardSSD_ZRS Disk SKU. + public static DiskSkuName StandardSSDZRS { get; } = new DiskSkuName(StandardSSDZRSValue); + /// PremiumV2_LRS Disk SKU. + public static DiskSkuName PremiumV2LRS { get; } = new DiskSkuName(PremiumV2LRSValue); + /// Determines if two values are the same. + public static bool operator ==(DiskSkuName left, DiskSkuName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DiskSkuName left, DiskSkuName right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DiskSkuName(string value) => new DiskSkuName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DiskSkuName other && Equals(other); + /// + public bool Equals(DiskSkuName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.Serialization.cs new file mode 100644 index 000000000000..579a252f5168 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DiskVolumeConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskVolumeConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + if (Optional.IsDefined(SizeGB)) + { + writer.WritePropertyName("sizeGB"u8); + writer.WriteNumberValue(SizeGB.Value); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskVolumeConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskVolumeConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskVolumeConfiguration(document.RootElement, options); + } + + internal static DiskVolumeConfiguration DeserializeDiskVolumeConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? count = default; + long? sizeGB = default; + DiskSku sku = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("sizeGB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sizeGB = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = DiskSku.DeserializeDiskSku(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskVolumeConfiguration(count, sizeGB, sku, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiskVolumeConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DiskVolumeConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiskVolumeConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskVolumeConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.cs new file mode 100644 index 000000000000..2c23bc66fa35 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The disk configuration required for the selected volume. + public partial class DiskVolumeConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DiskVolumeConfiguration() + { + } + + /// Initializes a new instance of . + /// The total number of disks required for the concerned volume. + /// The disk size in GB. + /// The disk SKU details. + /// Keeps track of any properties unknown to the library. + internal DiskVolumeConfiguration(long? count, long? sizeGB, DiskSku sku, IDictionary serializedAdditionalRawData) + { + Count = count; + SizeGB = sizeGB; + Sku = sku; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The total number of disks required for the concerned volume. + public long? Count { get; set; } + /// The disk size in GB. + public long? SizeGB { get; set; } + /// The disk SKU details. + internal DiskSku Sku { get; set; } + /// Defines the disk sku name. + public DiskSkuName? SkuName + { + get => Sku is null ? default : Sku.Name; + set + { + if (Sku is null) + Sku = new DiskSku(); + Sku.Name = value; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.Serialization.cs new file mode 100644 index 000000000000..7fc1bbb99777 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.Serialization.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class EnqueueReplicationServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnqueueReplicationServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ErsVersion)) + { + writer.WritePropertyName("ersVersion"u8); + writer.WriteStringValue(ErsVersion.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(InstanceNo)) + { + writer.WritePropertyName("instanceNo"u8); + writer.WriteStringValue(InstanceNo); + } + if (options.Format != "W" && Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + if (options.Format != "W" && Optional.IsDefined(KernelVersion)) + { + writer.WritePropertyName("kernelVersion"u8); + writer.WriteStringValue(KernelVersion); + } + if (options.Format != "W" && Optional.IsDefined(KernelPatch)) + { + writer.WritePropertyName("kernelPatch"u8); + writer.WriteStringValue(KernelPatch); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EnqueueReplicationServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnqueueReplicationServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEnqueueReplicationServerProperties(document.RootElement, options); + } + + internal static EnqueueReplicationServerProperties DeserializeEnqueueReplicationServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EnqueueReplicationServerType? ersVersion = default; + string instanceNo = default; + string hostname = default; + string kernelVersion = default; + string kernelPatch = default; + string ipAddress = default; + SapHealthState? health = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ersVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ersVersion = new EnqueueReplicationServerType(property.Value.GetString()); + continue; + } + if (property.NameEquals("instanceNo"u8)) + { + instanceNo = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("kernelVersion"u8)) + { + kernelVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("kernelPatch"u8)) + { + kernelPatch = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EnqueueReplicationServerProperties( + ersVersion, + instanceNo, + hostname, + kernelVersion, + kernelPatch, + ipAddress, + health, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EnqueueReplicationServerProperties)} does not support writing '{options.Format}' format."); + } + } + + EnqueueReplicationServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEnqueueReplicationServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EnqueueReplicationServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.cs new file mode 100644 index 000000000000..2a2556a09feb --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Enqueue Replication Server (ERS) properties. + public partial class EnqueueReplicationServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EnqueueReplicationServerProperties() + { + } + + /// Initializes a new instance of . + /// Defines the type of Enqueue Replication Server. + /// ERS Instance Number. + /// ERS SAP Hostname. + /// ERS SAP Kernel Version. + /// ERS SAP Kernel Patch level. + /// ERS SAP IP Address. + /// Defines the health of SAP Instances. + /// Keeps track of any properties unknown to the library. + internal EnqueueReplicationServerProperties(EnqueueReplicationServerType? ersVersion, string instanceNo, string hostname, string kernelVersion, string kernelPatch, string ipAddress, SapHealthState? health, IDictionary serializedAdditionalRawData) + { + ErsVersion = ersVersion; + InstanceNo = instanceNo; + Hostname = hostname; + KernelVersion = kernelVersion; + KernelPatch = kernelPatch; + IPAddress = ipAddress; + Health = health; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Defines the type of Enqueue Replication Server. + public EnqueueReplicationServerType? ErsVersion { get; } + /// ERS Instance Number. + public string InstanceNo { get; } + /// ERS SAP Hostname. + public string Hostname { get; } + /// ERS SAP Kernel Version. + public string KernelVersion { get; } + /// ERS SAP Kernel Patch level. + public string KernelPatch { get; } + /// ERS SAP IP Address. + public string IPAddress { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerType.cs new file mode 100644 index 000000000000..7ca6390ea71e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerType.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.SapVirtualInstances.Models +{ + /// Defines the type of Enqueue Replication Server. + public readonly partial struct EnqueueReplicationServerType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EnqueueReplicationServerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnqueueReplicator1Value = "EnqueueReplicator1"; + private const string EnqueueReplicator2Value = "EnqueueReplicator2"; + + /// Enqueue Replication server type 1. + public static EnqueueReplicationServerType EnqueueReplicator1 { get; } = new EnqueueReplicationServerType(EnqueueReplicator1Value); + /// Enqueue Replication server type 2. + public static EnqueueReplicationServerType EnqueueReplicator2 { get; } = new EnqueueReplicationServerType(EnqueueReplicator2Value); + /// Determines if two values are the same. + public static bool operator ==(EnqueueReplicationServerType left, EnqueueReplicationServerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EnqueueReplicationServerType left, EnqueueReplicationServerType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EnqueueReplicationServerType(string value) => new EnqueueReplicationServerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EnqueueReplicationServerType other && Equals(other); + /// + public bool Equals(EnqueueReplicationServerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.Serialization.cs new file mode 100644 index 000000000000..358882714454 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class EnqueueServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnqueueServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(Port)) + { + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port.Value); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EnqueueServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnqueueServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEnqueueServerProperties(document.RootElement, options); + } + + internal static EnqueueServerProperties DeserializeEnqueueServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string hostname = default; + string ipAddress = default; + long? port = default; + SapHealthState? health = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("port"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EnqueueServerProperties(hostname, ipAddress, port, health, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EnqueueServerProperties)} does not support writing '{options.Format}' format."); + } + } + + EnqueueServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEnqueueServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EnqueueServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.cs new file mode 100644 index 000000000000..b93b8f3fa2fc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Enqueue Server properties. + public partial class EnqueueServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EnqueueServerProperties() + { + } + + /// Initializes a new instance of . + /// Enqueue Server SAP Hostname. + /// Enqueue Server SAP IP Address. + /// Enqueue Server Port. + /// Defines the health of SAP Instances. + /// Keeps track of any properties unknown to the library. + internal EnqueueServerProperties(string hostname, string ipAddress, long? port, SapHealthState? health, IDictionary serializedAdditionalRawData) + { + Hostname = hostname; + IPAddress = ipAddress; + Port = port; + Health = health; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enqueue Server SAP Hostname. + public string Hostname { get; } + /// Enqueue Server SAP IP Address. + public string IPAddress { get; } + /// Enqueue Server Port. + public long? Port { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.Serialization.cs new file mode 100644 index 000000000000..5eb391b27768 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.Serialization.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ErrorInformation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ErrorInformation)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (options.Format != "W" && Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteStartArray(); + foreach (var item in Details) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ErrorInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ErrorInformation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeErrorInformation(document.RootElement, options); + } + + internal static ErrorInformation DeserializeErrorInformation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + IReadOnlyList details = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("details"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeErrorInformation(item, options)); + } + details = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ErrorInformation(code, message, details ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ErrorInformation)} does not support writing '{options.Format}' format."); + } + } + + ErrorInformation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeErrorInformation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ErrorInformation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.cs new file mode 100644 index 000000000000..bd6490030f9c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Error definition. + public partial class ErrorInformation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ErrorInformation() + { + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Service specific error code which serves as the substatus for the HTTP error code. + /// Description of the error. + /// Internal error details. + /// Keeps track of any properties unknown to the library. + internal ErrorInformation(string code, string message, IReadOnlyList details, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + Details = details; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Service specific error code which serves as the substatus for the HTTP error code. + public string Code { get; } + /// Description of the error. + public string Message { get; } + /// Internal error details. + public IReadOnlyList Details { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..d09c024cc0ea --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.Serialization.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ExternalInstallationSoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExternalInstallationSoftwareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(CentralServerVmId)) + { + writer.WritePropertyName("centralServerVmId"u8); + writer.WriteStringValue(CentralServerVmId); + } + } + + ExternalInstallationSoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExternalInstallationSoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExternalInstallationSoftwareConfiguration(document.RootElement, options); + } + + internal static ExternalInstallationSoftwareConfiguration DeserializeExternalInstallationSoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string centralServerVmId = default; + SapSoftwareInstallationType softwareInstallationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("centralServerVmId"u8)) + { + centralServerVmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("softwareInstallationType"u8)) + { + softwareInstallationType = new SapSoftwareInstallationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExternalInstallationSoftwareConfiguration(softwareInstallationType, serializedAdditionalRawData, centralServerVmId); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExternalInstallationSoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ExternalInstallationSoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExternalInstallationSoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExternalInstallationSoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.cs new file mode 100644 index 000000000000..c3b397f6d40e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Software configuration Input when the software is installed externally outside the service. + public partial class ExternalInstallationSoftwareConfiguration : SoftwareConfiguration + { + /// Initializes a new instance of . + public ExternalInstallationSoftwareConfiguration() + { + SoftwareInstallationType = SapSoftwareInstallationType.External; + } + + /// Initializes a new instance of . + /// The SAP software installation type. + /// Keeps track of any properties unknown to the library. + /// The resource ID of the virtual machine containing the central server instance. + internal ExternalInstallationSoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, IDictionary serializedAdditionalRawData, string centralServerVmId) : base(softwareInstallationType, serializedAdditionalRawData) + { + CentralServerVmId = centralServerVmId; + SoftwareInstallationType = softwareInstallationType; + } + + /// The resource ID of the virtual machine containing the central server instance. + public string CentralServerVmId { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.Serialization.cs new file mode 100644 index 000000000000..b451de1705ab --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.Serialization.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownFileShareConfiguration))] + public partial class FileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("configurationType"u8); + writer.WriteStringValue(ConfigurationType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFileShareConfiguration(document.RootElement, options); + } + + internal static FileShareConfiguration DeserializeFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("configurationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "CreateAndMount": return CreateAndMountFileShareConfiguration.DeserializeCreateAndMountFileShareConfiguration(element, options); + case "Mount": return MountFileShareConfiguration.DeserializeMountFileShareConfiguration(element, options); + case "Skip": return SkipFileShareConfiguration.DeserializeSkipFileShareConfiguration(element, options); + } + } + return UnknownFileShareConfiguration.DeserializeUnknownFileShareConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + FileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.cs new file mode 100644 index 000000000000..72ea38306a60 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// File Share configuration details, populated with information on storage configuration mounted on the VIS. The createAndMount option is selected in case of missing input. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class FileShareConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected FileShareConfiguration() + { + } + + /// Initializes a new instance of . + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + /// Keeps track of any properties unknown to the library. + internal FileShareConfiguration(FileShareConfigurationType configurationType, IDictionary serializedAdditionalRawData) + { + ConfigurationType = configurationType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + internal FileShareConfigurationType ConfigurationType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfigurationType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfigurationType.cs new file mode 100644 index 000000000000..8230c74a73e0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfigurationType.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.SapVirtualInstances.Models +{ + /// The type of file share config. + internal readonly partial struct FileShareConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FileShareConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SkipValue = "Skip"; + private const string CreateAndMountValue = "CreateAndMount"; + private const string MountValue = "Mount"; + + /// Skip creating the file share. + public static FileShareConfigurationType Skip { get; } = new FileShareConfigurationType(SkipValue); + /// Fileshare will be created and mounted by service. + public static FileShareConfigurationType CreateAndMount { get; } = new FileShareConfigurationType(CreateAndMountValue); + /// Existing fileshare provided will be mounted by service. + public static FileShareConfigurationType Mount { get; } = new FileShareConfigurationType(MountValue); + /// Determines if two values are the same. + public static bool operator ==(FileShareConfigurationType left, FileShareConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FileShareConfigurationType left, FileShareConfigurationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FileShareConfigurationType(string value) => new FileShareConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FileShareConfigurationType other && Equals(other); + /// + public bool Equals(FileShareConfigurationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.Serialization.cs new file mode 100644 index 000000000000..7f2379f0e39b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class GatewayServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GatewayServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Port)) + { + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port.Value); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GatewayServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GatewayServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGatewayServerProperties(document.RootElement, options); + } + + internal static GatewayServerProperties DeserializeGatewayServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? port = default; + SapHealthState? health = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("port"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GatewayServerProperties(port, health, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(GatewayServerProperties)} does not support writing '{options.Format}' format."); + } + } + + GatewayServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGatewayServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GatewayServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.cs new file mode 100644 index 000000000000..0127fde8ef92 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Gateway Server properties. + public partial class GatewayServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public GatewayServerProperties() + { + } + + /// Initializes a new instance of . + /// Gateway Port. + /// Defines the health of SAP Instances. + /// Keeps track of any properties unknown to the library. + internal GatewayServerProperties(long? port, SapHealthState? health, IDictionary serializedAdditionalRawData) + { + Port = port; + Health = health; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gateway Port. + public long? Port { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.Serialization.cs new file mode 100644 index 000000000000..e6a14d24a8ac --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class HighAvailabilityConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HighAvailabilityConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("highAvailabilityType"u8); + writer.WriteStringValue(HighAvailabilityType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HighAvailabilityConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HighAvailabilityConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHighAvailabilityConfiguration(document.RootElement, options); + } + + internal static HighAvailabilityConfiguration DeserializeHighAvailabilityConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapHighAvailabilityType highAvailabilityType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("highAvailabilityType"u8)) + { + highAvailabilityType = new SapHighAvailabilityType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HighAvailabilityConfiguration(highAvailabilityType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HighAvailabilityConfiguration)} does not support writing '{options.Format}' format."); + } + } + + HighAvailabilityConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHighAvailabilityConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HighAvailabilityConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.cs new file mode 100644 index 000000000000..a7d32d1ab84e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the high availability configuration. + internal partial class HighAvailabilityConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The high availability type. + public HighAvailabilityConfiguration(SapHighAvailabilityType highAvailabilityType) + { + HighAvailabilityType = highAvailabilityType; + } + + /// Initializes a new instance of . + /// The high availability type. + /// Keeps track of any properties unknown to the library. + internal HighAvailabilityConfiguration(SapHighAvailabilityType highAvailabilityType, IDictionary serializedAdditionalRawData) + { + HighAvailabilityType = highAvailabilityType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal HighAvailabilityConfiguration() + { + } + + /// The high availability type. + public SapHighAvailabilityType HighAvailabilityType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..5417082d3e9e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class HighAvailabilitySoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HighAvailabilitySoftwareConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("fencingClientId"u8); + writer.WriteStringValue(FencingClientId); + writer.WritePropertyName("fencingClientPassword"u8); + writer.WriteStringValue(FencingClientPassword); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HighAvailabilitySoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HighAvailabilitySoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHighAvailabilitySoftwareConfiguration(document.RootElement, options); + } + + internal static HighAvailabilitySoftwareConfiguration DeserializeHighAvailabilitySoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string fencingClientId = default; + string fencingClientPassword = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fencingClientId"u8)) + { + fencingClientId = property.Value.GetString(); + continue; + } + if (property.NameEquals("fencingClientPassword"u8)) + { + fencingClientPassword = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HighAvailabilitySoftwareConfiguration(fencingClientId, fencingClientPassword, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HighAvailabilitySoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + HighAvailabilitySoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHighAvailabilitySoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HighAvailabilitySoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.cs new file mode 100644 index 000000000000..14c9a64c0718 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the HA software configuration. + public partial class HighAvailabilitySoftwareConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The fencing client id. + /// The fencing client id secret/password. The secret should never expire. This will be used pacemaker to start/stop the cluster VMs. + /// or is null. + public HighAvailabilitySoftwareConfiguration(string fencingClientId, string fencingClientPassword) + { + Argument.AssertNotNull(fencingClientId, nameof(fencingClientId)); + Argument.AssertNotNull(fencingClientPassword, nameof(fencingClientPassword)); + + FencingClientId = fencingClientId; + FencingClientPassword = fencingClientPassword; + } + + /// Initializes a new instance of . + /// The fencing client id. + /// The fencing client id secret/password. The secret should never expire. This will be used pacemaker to start/stop the cluster VMs. + /// Keeps track of any properties unknown to the library. + internal HighAvailabilitySoftwareConfiguration(string fencingClientId, string fencingClientPassword, IDictionary serializedAdditionalRawData) + { + FencingClientId = fencingClientId; + FencingClientPassword = fencingClientPassword; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal HighAvailabilitySoftwareConfiguration() + { + } + + /// The fencing client id. + public string FencingClientId { get; set; } + /// The fencing client id secret/password. The secret should never expire. This will be used pacemaker to start/stop the cluster VMs. + public string FencingClientPassword { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.Serialization.cs new file mode 100644 index 000000000000..e2b498fb1160 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ImageReference : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageReference)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Publisher)) + { + writer.WritePropertyName("publisher"u8); + writer.WriteStringValue(Publisher); + } + if (Optional.IsDefined(Offer)) + { + writer.WritePropertyName("offer"u8); + writer.WriteStringValue(Offer); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteStringValue(Sku); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ImageReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageReference)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImageReference(document.RootElement, options); + } + + internal static ImageReference DeserializeImageReference(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string publisher = default; + string offer = default; + string sku = default; + string version = default; + ResourceIdentifier id = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publisher"u8)) + { + publisher = property.Value.GetString(); + continue; + } + if (property.NameEquals("offer"u8)) + { + offer = property.Value.GetString(); + continue; + } + if (property.NameEquals("sku"u8)) + { + sku = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImageReference( + publisher, + offer, + sku, + version, + id, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ImageReference)} does not support writing '{options.Format}' format."); + } + } + + ImageReference IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeImageReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImageReference)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.cs new file mode 100644 index 000000000000..a55799521852 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.cs @@ -0,0 +1,82 @@ +// 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.SapVirtualInstances.Models +{ + /// Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. + public partial class ImageReference + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ImageReference() + { + } + + /// Initializes a new instance of . + /// The image publisher. + /// Specifies the offer of the platform image or marketplace image used to create the virtual machine. + /// The image SKU. + /// Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. + /// Specifies the ARM resource ID of the Azure Compute Gallery image version used for creating ACSS VMs. You will need to provide this input when you choose to deploy virtual machines in ACSS with OS image from the Azure Compute gallery. + /// Keeps track of any properties unknown to the library. + internal ImageReference(string publisher, string offer, string sku, string version, ResourceIdentifier id, IDictionary serializedAdditionalRawData) + { + Publisher = publisher; + Offer = offer; + Sku = sku; + Version = version; + Id = id; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The image publisher. + public string Publisher { get; set; } + /// Specifies the offer of the platform image or marketplace image used to create the virtual machine. + public string Offer { get; set; } + /// The image SKU. + public string Sku { get; set; } + /// Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. + public string Version { get; set; } + /// Specifies the ARM resource ID of the Azure Compute Gallery image version used for creating ACSS VMs. You will need to provide this input when you choose to deploy virtual machines in ACSS with OS image from the Azure Compute gallery. + public ResourceIdentifier Id { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.Serialization.cs new file mode 100644 index 000000000000..41b3b4514aad --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.Serialization.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownInfrastructureConfiguration))] + public partial class InfrastructureConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appResourceGroup"u8); + writer.WriteStringValue(AppResourceGroup); + writer.WritePropertyName("deploymentType"u8); + writer.WriteStringValue(DeploymentType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InfrastructureConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInfrastructureConfiguration(document.RootElement, options); + } + + internal static InfrastructureConfiguration DeserializeInfrastructureConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("deploymentType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "SingleServer": return SingleServerConfiguration.DeserializeSingleServerConfiguration(element, options); + case "ThreeTier": return ThreeTierConfiguration.DeserializeThreeTierConfiguration(element, options); + } + } + return UnknownInfrastructureConfiguration.DeserializeUnknownInfrastructureConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support writing '{options.Format}' format."); + } + } + + InfrastructureConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeInfrastructureConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.cs new file mode 100644 index 000000000000..5b41b47e9932 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// Deploy SAP Infrastructure Details. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class InfrastructureConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// is null. + protected InfrastructureConfiguration(string appResourceGroup) + { + Argument.AssertNotNull(appResourceGroup, nameof(appResourceGroup)); + + AppResourceGroup = appResourceGroup; + } + + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The SAP deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + internal InfrastructureConfiguration(string appResourceGroup, SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData) + { + AppResourceGroup = appResourceGroup; + DeploymentType = deploymentType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal InfrastructureConfiguration() + { + } + + /// The application resource group where SAP system resources will be deployed. + public string AppResourceGroup { get; set; } + /// The SAP deployment type. Eg: SingleServer/ThreeTier. + internal SapDeploymentType DeploymentType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.Serialization.cs new file mode 100644 index 000000000000..da0c2ddef445 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class LinuxConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LinuxConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(DisablePasswordAuthentication)) + { + writer.WritePropertyName("disablePasswordAuthentication"u8); + writer.WriteBooleanValue(DisablePasswordAuthentication.Value); + } + if (Optional.IsDefined(Ssh)) + { + writer.WritePropertyName("ssh"u8); + writer.WriteObjectValue(Ssh, options); + } + if (Optional.IsDefined(SshKeyPair)) + { + writer.WritePropertyName("sshKeyPair"u8); + writer.WriteObjectValue(SshKeyPair, options); + } + } + + LinuxConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LinuxConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLinuxConfiguration(document.RootElement, options); + } + + internal static LinuxConfiguration DeserializeLinuxConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? disablePasswordAuthentication = default; + SshConfiguration ssh = default; + SshKeyPair sshKeyPair = default; + OSType osType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("disablePasswordAuthentication"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disablePasswordAuthentication = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("ssh"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ssh = SshConfiguration.DeserializeSshConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("sshKeyPair"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sshKeyPair = SshKeyPair.DeserializeSshKeyPair(property.Value, options); + continue; + } + if (property.NameEquals("osType"u8)) + { + osType = new OSType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LinuxConfiguration(osType, serializedAdditionalRawData, disablePasswordAuthentication, ssh, sshKeyPair); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LinuxConfiguration)} does not support writing '{options.Format}' format."); + } + } + + LinuxConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLinuxConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LinuxConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.cs new file mode 100644 index 000000000000..cbab30ff0f28 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + public partial class LinuxConfiguration : OSConfiguration + { + /// Initializes a new instance of . + public LinuxConfiguration() + { + OSType = OSType.Linux; + } + + /// Initializes a new instance of . + /// The OS Type. + /// Keeps track of any properties unknown to the library. + /// Specifies whether password authentication should be disabled. + /// Specifies the ssh key configuration for a Linux OS. (This property is deprecated, please use 'sshKeyPair' instead). + /// The SSH Key-pair used to authenticate with the VM's. + internal LinuxConfiguration(OSType osType, IDictionary serializedAdditionalRawData, bool? disablePasswordAuthentication, SshConfiguration ssh, SshKeyPair sshKeyPair) : base(osType, serializedAdditionalRawData) + { + DisablePasswordAuthentication = disablePasswordAuthentication; + Ssh = ssh; + SshKeyPair = sshKeyPair; + OSType = osType; + } + + /// Specifies whether password authentication should be disabled. + public bool? DisablePasswordAuthentication { get; set; } + /// Specifies the ssh key configuration for a Linux OS. (This property is deprecated, please use 'sshKeyPair' instead). + internal SshConfiguration Ssh { get; set; } + /// The list of SSH public keys used to authenticate with linux based VMs. + public IList SshPublicKeys + { + get + { + if (Ssh is null) + Ssh = new SshConfiguration(); + return Ssh.PublicKeys; + } + } + + /// The SSH Key-pair used to authenticate with the VM's. + public SshKeyPair SshKeyPair { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.Serialization.cs new file mode 100644 index 000000000000..24ce555c987a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.Serialization.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class LoadBalancerResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadBalancerResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(LoadBalancerName)) + { + writer.WritePropertyName("loadBalancerName"u8); + writer.WriteStringValue(LoadBalancerName); + } + if (Optional.IsCollectionDefined(FrontendIPConfigurationNames)) + { + writer.WritePropertyName("frontendIpConfigurationNames"u8); + writer.WriteStartArray(); + foreach (var item in FrontendIPConfigurationNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(BackendPoolNames)) + { + writer.WritePropertyName("backendPoolNames"u8); + writer.WriteStartArray(); + foreach (var item in BackendPoolNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(HealthProbeNames)) + { + writer.WritePropertyName("healthProbeNames"u8); + writer.WriteStartArray(); + foreach (var item in HealthProbeNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LoadBalancerResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadBalancerResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLoadBalancerResourceNames(document.RootElement, options); + } + + internal static LoadBalancerResourceNames DeserializeLoadBalancerResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string loadBalancerName = default; + IList frontendIPConfigurationNames = default; + IList backendPoolNames = default; + IList healthProbeNames = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("loadBalancerName"u8)) + { + loadBalancerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("frontendIpConfigurationNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + frontendIPConfigurationNames = array; + continue; + } + if (property.NameEquals("backendPoolNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + backendPoolNames = array; + continue; + } + if (property.NameEquals("healthProbeNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + healthProbeNames = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LoadBalancerResourceNames(loadBalancerName, frontendIPConfigurationNames ?? new ChangeTrackingList(), backendPoolNames ?? new ChangeTrackingList(), healthProbeNames ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LoadBalancerResourceNames)} does not support writing '{options.Format}' format."); + } + } + + LoadBalancerResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLoadBalancerResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LoadBalancerResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.cs new file mode 100644 index 000000000000..e3bf1c626759 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource names object for load balancer and related resources. + public partial class LoadBalancerResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public LoadBalancerResourceNames() + { + FrontendIPConfigurationNames = new ChangeTrackingList(); + BackendPoolNames = new ChangeTrackingList(); + HealthProbeNames = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The full resource name for load balancer. If this value is not provided, load balancer will be name as {ASCS/DB}-loadBalancer. + /// The list of frontend IP configuration names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + /// The list of backend pool names. Currently, ACSS deploys only one backend pool and hence, size of this list should be 1. + /// The list of health probe names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + /// Keeps track of any properties unknown to the library. + internal LoadBalancerResourceNames(string loadBalancerName, IList frontendIPConfigurationNames, IList backendPoolNames, IList healthProbeNames, IDictionary serializedAdditionalRawData) + { + LoadBalancerName = loadBalancerName; + FrontendIPConfigurationNames = frontendIPConfigurationNames; + BackendPoolNames = backendPoolNames; + HealthProbeNames = healthProbeNames; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The full resource name for load balancer. If this value is not provided, load balancer will be name as {ASCS/DB}-loadBalancer. + public string LoadBalancerName { get; set; } + /// The list of frontend IP configuration names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + public IList FrontendIPConfigurationNames { get; } + /// The list of backend pool names. Currently, ACSS deploys only one backend pool and hence, size of this list should be 1. + public IList BackendPoolNames { get; } + /// The list of health probe names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + public IList HealthProbeNames { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.Serialization.cs new file mode 100644 index 000000000000..5d8103694c58 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class ManagedRGConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManagedRGConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ManagedRGConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManagedRGConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeManagedRGConfiguration(document.RootElement, options); + } + + internal static ManagedRGConfiguration DeserializeManagedRGConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ManagedRGConfiguration(name, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ManagedRGConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ManagedRGConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeManagedRGConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ManagedRGConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.cs new file mode 100644 index 000000000000..97925c7a1239 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Managed resource group configuration. + internal partial class ManagedRGConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ManagedRGConfiguration() + { + } + + /// Initializes a new instance of . + /// Managed resource group name. + /// Keeps track of any properties unknown to the library. + internal ManagedRGConfiguration(string name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Managed resource group name. + public string Name { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedResourcesNetworkAccessType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedResourcesNetworkAccessType.cs new file mode 100644 index 000000000000..77453b9854c6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedResourcesNetworkAccessType.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.SapVirtualInstances.Models +{ + /// Defines the network access type for managed resources. + public readonly partial struct ManagedResourcesNetworkAccessType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ManagedResourcesNetworkAccessType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PublicValue = "Public"; + private const string PrivateValue = "Private"; + + /// Managed resources will be deployed with public network access enabled. + public static ManagedResourcesNetworkAccessType Public { get; } = new ManagedResourcesNetworkAccessType(PublicValue); + /// Managed resources will be deployed with public network access disabled. + public static ManagedResourcesNetworkAccessType Private { get; } = new ManagedResourcesNetworkAccessType(PrivateValue); + /// Determines if two values are the same. + public static bool operator ==(ManagedResourcesNetworkAccessType left, ManagedResourcesNetworkAccessType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ManagedResourcesNetworkAccessType left, ManagedResourcesNetworkAccessType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ManagedResourcesNetworkAccessType(string value) => new ManagedResourcesNetworkAccessType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ManagedResourcesNetworkAccessType other && Equals(other); + /// + public bool Equals(ManagedResourcesNetworkAccessType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.Serialization.cs new file mode 100644 index 000000000000..b18144e38439 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.Serialization.cs @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class MessageServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MessageServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(MsPort)) + { + writer.WritePropertyName("msPort"u8); + writer.WriteNumberValue(MsPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(InternalMsPort)) + { + writer.WritePropertyName("internalMsPort"u8); + writer.WriteNumberValue(InternalMsPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(HttpPort)) + { + writer.WritePropertyName("httpPort"u8); + writer.WriteNumberValue(HttpPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(HttpsPort)) + { + writer.WritePropertyName("httpsPort"u8); + writer.WriteNumberValue(HttpsPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MessageServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MessageServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMessageServerProperties(document.RootElement, options); + } + + internal static MessageServerProperties DeserializeMessageServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? msPort = default; + long? internalMsPort = default; + long? httpPort = default; + long? httpsPort = default; + string hostname = default; + string ipAddress = default; + SapHealthState? health = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("msPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + msPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("internalMsPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + internalMsPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("httpPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("httpsPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpsPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MessageServerProperties( + msPort, + internalMsPort, + httpPort, + httpsPort, + hostname, + ipAddress, + health, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MessageServerProperties)} does not support writing '{options.Format}' format."); + } + } + + MessageServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMessageServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MessageServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.cs new file mode 100644 index 000000000000..d1c6765d55c6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP message server properties. + public partial class MessageServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public MessageServerProperties() + { + } + + /// Initializes a new instance of . + /// message server port. + /// message server internal MS port. + /// message server HTTP Port. + /// message server HTTPS Port. + /// message server SAP Hostname. + /// message server IP Address. + /// Defines the health of SAP Instances. + /// Keeps track of any properties unknown to the library. + internal MessageServerProperties(long? msPort, long? internalMsPort, long? httpPort, long? httpsPort, string hostname, string ipAddress, SapHealthState? health, IDictionary serializedAdditionalRawData) + { + MsPort = msPort; + InternalMsPort = internalMsPort; + HttpPort = httpPort; + HttpsPort = httpsPort; + Hostname = hostname; + IPAddress = ipAddress; + Health = health; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// message server port. + public long? MsPort { get; } + /// message server internal MS port. + public long? InternalMsPort { get; } + /// message server HTTP Port. + public long? HttpPort { get; } + /// message server HTTPS Port. + public long? HttpsPort { get; } + /// message server SAP Hostname. + public string Hostname { get; } + /// message server IP Address. + public string IPAddress { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.Serialization.cs new file mode 100644 index 000000000000..ab44964515d8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class MountFileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MountFileShareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("privateEndpointId"u8); + writer.WriteStringValue(PrivateEndpointId); + } + + MountFileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MountFileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMountFileShareConfiguration(document.RootElement, options); + } + + internal static MountFileShareConfiguration DeserializeMountFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string privateEndpointId = default; + FileShareConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateEndpointId"u8)) + { + privateEndpointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("configurationType"u8)) + { + configurationType = new FileShareConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MountFileShareConfiguration(configurationType, serializedAdditionalRawData, id, privateEndpointId); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MountFileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + MountFileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMountFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MountFileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.cs new file mode 100644 index 000000000000..97b436cc473b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the file share configuration where the transport directory fileshare already exists, and user wishes to mount the fileshare as a part of the create infra flow. + public partial class MountFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of . + /// The fileshare resource ID. + /// The private endpoint resource ID. + /// or is null. + public MountFileShareConfiguration(string id, string privateEndpointId) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(privateEndpointId, nameof(privateEndpointId)); + + Id = id; + PrivateEndpointId = privateEndpointId; + ConfigurationType = FileShareConfigurationType.Mount; + } + + /// Initializes a new instance of . + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + /// Keeps track of any properties unknown to the library. + /// The fileshare resource ID. + /// The private endpoint resource ID. + internal MountFileShareConfiguration(FileShareConfigurationType configurationType, IDictionary serializedAdditionalRawData, string id, string privateEndpointId) : base(configurationType, serializedAdditionalRawData) + { + Id = id; + PrivateEndpointId = privateEndpointId; + ConfigurationType = configurationType; + } + + /// Initializes a new instance of for deserialization. + internal MountFileShareConfiguration() + { + } + + /// The fileshare resource ID. + public string Id { get; set; } + /// The private endpoint resource ID. + public string PrivateEndpointId { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NamingPatternType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NamingPatternType.cs new file mode 100644 index 000000000000..f80495efa1ed --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NamingPatternType.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.SapVirtualInstances.Models +{ + /// The pattern type to be used for resource naming. + internal readonly partial struct NamingPatternType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NamingPatternType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FullResourceNameValue = "FullResourceName"; + + /// Full resource names that will be created by service. + public static NamingPatternType FullResourceName { get; } = new NamingPatternType(FullResourceNameValue); + /// Determines if two values are the same. + public static bool operator ==(NamingPatternType left, NamingPatternType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NamingPatternType left, NamingPatternType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NamingPatternType(string value) => new NamingPatternType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NamingPatternType other && Equals(other); + /// + public bool Equals(NamingPatternType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.Serialization.cs new file mode 100644 index 000000000000..ed3086cbac72 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class NetworkConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsSecondaryIPEnabled)) + { + writer.WritePropertyName("isSecondaryIpEnabled"u8); + writer.WriteBooleanValue(IsSecondaryIPEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetworkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkConfiguration(document.RootElement, options); + } + + internal static NetworkConfiguration DeserializeNetworkConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? isSecondaryIPEnabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isSecondaryIpEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isSecondaryIPEnabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkConfiguration(isSecondaryIPEnabled, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support writing '{options.Format}' format."); + } + } + + NetworkConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetworkConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.cs new file mode 100644 index 000000000000..ef284cd37b59 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the network configuration type for SAP system infrastructure that is being deployed. + internal partial class NetworkConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetworkConfiguration() + { + } + + /// Initializes a new instance of . + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. + /// Keeps track of any properties unknown to the library. + internal NetworkConfiguration(bool? isSecondaryIPEnabled, IDictionary serializedAdditionalRawData) + { + IsSecondaryIPEnabled = isSecondaryIPEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. + public bool? IsSecondaryIPEnabled { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.Serialization.cs new file mode 100644 index 000000000000..d5b41159d43b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class NetworkInterfaceResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkInterfaceResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(NetworkInterfaceName)) + { + writer.WritePropertyName("networkInterfaceName"u8); + writer.WriteStringValue(NetworkInterfaceName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetworkInterfaceResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkInterfaceResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkInterfaceResourceNames(document.RootElement, options); + } + + internal static NetworkInterfaceResourceNames DeserializeNetworkInterfaceResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string networkInterfaceName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkInterfaceName"u8)) + { + networkInterfaceName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkInterfaceResourceNames(networkInterfaceName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkInterfaceResourceNames)} does not support writing '{options.Format}' format."); + } + } + + NetworkInterfaceResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetworkInterfaceResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkInterfaceResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.cs new file mode 100644 index 000000000000..44b73d795b66 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource names object for network interface and related resources. + public partial class NetworkInterfaceResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetworkInterfaceResourceNames() + { + } + + /// Initializes a new instance of . + /// The full name for network interface. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}-Nic. In case of HA-AvZone systems, default name will be {SID}-{App/ASCS/DB}-Zone{A/B}-Nic with an incrementor at the end in case of more than 1 instance per layer. For distributed and HA-AvSet systems, default name will be {SID}-{App/ASCS/DB}-Nic with an incrementor at the end in case of more than 1 instance per layer. + /// Keeps track of any properties unknown to the library. + internal NetworkInterfaceResourceNames(string networkInterfaceName, IDictionary serializedAdditionalRawData) + { + NetworkInterfaceName = networkInterfaceName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The full name for network interface. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}-Nic. In case of HA-AvZone systems, default name will be {SID}-{App/ASCS/DB}-Zone{A/B}-Nic with an incrementor at the end in case of more than 1 instance per layer. For distributed and HA-AvSet systems, default name will be {SID}-{App/ASCS/DB}-Nic with an incrementor at the end in case of more than 1 instance per layer. + public string NetworkInterfaceName { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.Serialization.cs new file mode 100644 index 000000000000..3a58ecaea8ba --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownOSConfiguration))] + public partial class OSConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("osType"u8); + writer.WriteStringValue(OSType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OSConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOSConfiguration(document.RootElement, options); + } + + internal static OSConfiguration DeserializeOSConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("osType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Linux": return LinuxConfiguration.DeserializeLinuxConfiguration(element, options); + case "Windows": return WindowsConfiguration.DeserializeWindowsConfiguration(element, options); + } + } + return UnknownOSConfiguration.DeserializeUnknownOSConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OSConfiguration)} does not support writing '{options.Format}' format."); + } + } + + OSConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOSConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OSConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.cs new file mode 100644 index 000000000000..f5348cf70e97 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// Defines the OS configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class OSConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected OSConfiguration() + { + } + + /// Initializes a new instance of . + /// The OS Type. + /// Keeps track of any properties unknown to the library. + internal OSConfiguration(OSType osType, IDictionary serializedAdditionalRawData) + { + OSType = osType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The OS Type. + internal OSType OSType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.Serialization.cs new file mode 100644 index 000000000000..9c8146d08f74 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class OSProfile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSProfile)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AdminUsername)) + { + writer.WritePropertyName("adminUsername"u8); + writer.WriteStringValue(AdminUsername); + } + if (Optional.IsDefined(AdminPassword)) + { + writer.WritePropertyName("adminPassword"u8); + writer.WriteStringValue(AdminPassword); + } + if (Optional.IsDefined(OSConfiguration)) + { + writer.WritePropertyName("osConfiguration"u8); + writer.WriteObjectValue(OSConfiguration, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OSProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSProfile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOSProfile(document.RootElement, options); + } + + internal static OSProfile DeserializeOSProfile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string adminUsername = default; + string adminPassword = default; + OSConfiguration osConfiguration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("adminUsername"u8)) + { + adminUsername = property.Value.GetString(); + continue; + } + if (property.NameEquals("adminPassword"u8)) + { + adminPassword = property.Value.GetString(); + continue; + } + if (property.NameEquals("osConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + osConfiguration = OSConfiguration.DeserializeOSConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OSProfile(adminUsername, adminPassword, osConfiguration, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OSProfile)} does not support writing '{options.Format}' format."); + } + } + + OSProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOSProfile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OSProfile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.cs new file mode 100644 index 000000000000..b90bef9c789e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is provisioned. + public partial class OSProfile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OSProfile() + { + } + + /// Initializes a new instance of . + /// Specifies the name of the administrator account. <br><br> This property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters. + /// Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). + /// + /// Specifies Windows operating system settings on the virtual machine. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Keeps track of any properties unknown to the library. + internal OSProfile(string adminUsername, string adminPassword, OSConfiguration osConfiguration, IDictionary serializedAdditionalRawData) + { + AdminUsername = adminUsername; + AdminPassword = adminPassword; + OSConfiguration = osConfiguration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Specifies the name of the administrator account. <br><br> This property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters. + public string AdminUsername { get; set; } + /// Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). + public string AdminPassword { get; set; } + /// + /// Specifies Windows operating system settings on the virtual machine. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public OSConfiguration OSConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.Serialization.cs new file mode 100644 index 000000000000..0c26d26478e7 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class OSSapConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSSapConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DeployerVmPackages)) + { + writer.WritePropertyName("deployerVmPackages"u8); + writer.WriteObjectValue(DeployerVmPackages, options); + } + if (Optional.IsDefined(SapFqdn)) + { + writer.WritePropertyName("sapFqdn"u8); + writer.WriteStringValue(SapFqdn); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OSSapConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSSapConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOSSapConfiguration(document.RootElement, options); + } + + internal static OSSapConfiguration DeserializeOSSapConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DeployerVmPackages deployerVmPackages = default; + string sapFqdn = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deployerVmPackages"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deployerVmPackages = DeployerVmPackages.DeserializeDeployerVmPackages(property.Value, options); + continue; + } + if (property.NameEquals("sapFqdn"u8)) + { + sapFqdn = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OSSapConfiguration(deployerVmPackages, sapFqdn, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OSSapConfiguration)} does not support writing '{options.Format}' format."); + } + } + + OSSapConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOSSapConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OSSapConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.cs new file mode 100644 index 000000000000..c1435f2ce3f4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the OS and SAP Configurations for Deployment. + public partial class OSSapConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OSSapConfiguration() + { + } + + /// Initializes a new instance of . + /// The url and storage account ID where deployer VM packages are uploaded. + /// The FQDN to set for the SAP system. + /// Keeps track of any properties unknown to the library. + internal OSSapConfiguration(DeployerVmPackages deployerVmPackages, string sapFqdn, IDictionary serializedAdditionalRawData) + { + DeployerVmPackages = deployerVmPackages; + SapFqdn = sapFqdn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The url and storage account ID where deployer VM packages are uploaded. + public DeployerVmPackages DeployerVmPackages { get; set; } + /// The FQDN to set for the SAP system. + public string SapFqdn { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSType.cs new file mode 100644 index 000000000000..c7ee614b79b8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSType.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.SapVirtualInstances.Models +{ + /// The OS Type. + internal readonly partial struct OSType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OSType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LinuxValue = "Linux"; + private const string WindowsValue = "Windows"; + + /// Linux OS Type. + public static OSType Linux { get; } = new OSType(LinuxValue); + /// Windows OS Type. + public static OSType Windows { get; } = new OSType(WindowsValue); + /// Determines if two values are the same. + public static bool operator ==(OSType left, OSType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OSType left, OSType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OSType(string value) => new OSType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OSType other && Equals(other); + /// + public bool Equals(OSType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.Serialization.cs new file mode 100644 index 000000000000..45b057114b3f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.Serialization.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class OperationStatusResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OperationStatusResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + if (Optional.IsDefined(PercentComplete)) + { + writer.WritePropertyName("percentComplete"u8); + writer.WriteNumberValue(PercentComplete.Value); + } + if (Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (Optional.IsCollectionDefined(Operations)) + { + writer.WritePropertyName("operations"u8); + writer.WriteStartArray(); + foreach (var item in Operations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + JsonSerializer.Serialize(writer, Error); + } + if (options.Format != "W" && Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OperationStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OperationStatusResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOperationStatusResult(document.RootElement, options); + } + + internal static OperationStatusResult DeserializeOperationStatusResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + string status = default; + double? percentComplete = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + IReadOnlyList operations = default; + ResponseError error = default; + string resourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("percentComplete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentComplete = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("operations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeOperationStatusResult(item, options)); + } + operations = array; + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("resourceId"u8)) + { + resourceId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OperationStatusResult( + id, + name, + status, + percentComplete, + startTime, + endTime, + operations ?? new ChangeTrackingList(), + error, + resourceId, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OperationStatusResult)} does not support writing '{options.Format}' format."); + } + } + + OperationStatusResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOperationStatusResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OperationStatusResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.cs new file mode 100644 index 000000000000..37b47a98223c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.cs @@ -0,0 +1,109 @@ +// 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.SapVirtualInstances.Models +{ + /// The current status of an async operation. + public partial class OperationStatusResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Operation status. + /// is null. + internal OperationStatusResult(string status) + { + Argument.AssertNotNull(status, nameof(status)); + + Status = status; + Operations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Fully qualified ID for the async operation. + /// Name of the async operation. + /// Operation status. + /// Percent of the operation that is complete. + /// The start time of the operation. + /// The end time of the operation. + /// The operations list. + /// If present, details of the operation error. + /// Fully qualified ID of the resource against which the original async operation was started. + /// Keeps track of any properties unknown to the library. + internal OperationStatusResult(ResourceIdentifier id, string name, string status, double? percentComplete, DateTimeOffset? startOn, DateTimeOffset? endOn, IReadOnlyList operations, ResponseError error, string resourceId, IDictionary serializedAdditionalRawData) + { + Id = id; + Name = name; + Status = status; + PercentComplete = percentComplete; + StartOn = startOn; + EndOn = endOn; + Operations = operations; + Error = error; + ResourceId = resourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OperationStatusResult() + { + } + + /// Fully qualified ID for the async operation. + public ResourceIdentifier Id { get; } + /// Name of the async operation. + public string Name { get; } + /// Operation status. + public string Status { get; } + /// Percent of the operation that is complete. + public double? PercentComplete { get; } + /// The start time of the operation. + public DateTimeOffset? StartOn { get; } + /// The end time of the operation. + public DateTimeOffset? EndOn { get; } + /// The operations list. + public IReadOnlyList Operations { get; } + /// If present, details of the operation error. + public ResponseError Error { get; } + /// Fully qualified ID of the resource against which the original async operation was started. + public string ResourceId { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.Serialization.cs new file mode 100644 index 000000000000..8f88985f2845 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SAPApplicationServerInstanceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPApplicationServerInstanceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SAPApplicationServerInstanceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPApplicationServerInstanceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSAPApplicationServerInstanceListResult(document.RootElement, options); + } + + internal static SAPApplicationServerInstanceListResult DeserializeSAPApplicationServerInstanceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SAPApplicationServerInstanceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SAPApplicationServerInstanceListResult)} does not support writing '{options.Format}' format."); + } + } + + SAPApplicationServerInstanceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSAPApplicationServerInstanceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SAPApplicationServerInstanceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.cs new file mode 100644 index 000000000000..489d532757e6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The response of a SAPApplicationServerInstance list operation. + internal partial class SAPApplicationServerInstanceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The SAPApplicationServerInstance items on this page. + /// is null. + internal SAPApplicationServerInstanceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SAPApplicationServerInstance items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SAPApplicationServerInstanceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SAPApplicationServerInstanceListResult() + { + } + + /// The SAPApplicationServerInstance items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.Serialization.cs new file mode 100644 index 000000000000..0cdf65d9239c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SAPCentralServerInstanceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPCentralServerInstanceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SAPCentralServerInstanceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPCentralServerInstanceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSAPCentralServerInstanceListResult(document.RootElement, options); + } + + internal static SAPCentralServerInstanceListResult DeserializeSAPCentralServerInstanceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SAPCentralServerInstanceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SAPCentralServerInstanceListResult)} does not support writing '{options.Format}' format."); + } + } + + SAPCentralServerInstanceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSAPCentralServerInstanceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SAPCentralServerInstanceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.cs new file mode 100644 index 000000000000..e96dcd7dc003 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The response of a SAPCentralServerInstance list operation. + internal partial class SAPCentralServerInstanceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The SAPCentralServerInstance items on this page. + /// is null. + internal SAPCentralServerInstanceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SAPCentralServerInstance items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SAPCentralServerInstanceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SAPCentralServerInstanceListResult() + { + } + + /// The SAPCentralServerInstance items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.Serialization.cs new file mode 100644 index 000000000000..736ad4e1a067 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SAPDatabaseInstanceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPDatabaseInstanceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SAPDatabaseInstanceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPDatabaseInstanceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSAPDatabaseInstanceListResult(document.RootElement, options); + } + + internal static SAPDatabaseInstanceListResult DeserializeSAPDatabaseInstanceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SAPDatabaseInstanceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SAPDatabaseInstanceListResult)} does not support writing '{options.Format}' format."); + } + } + + SAPDatabaseInstanceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSAPDatabaseInstanceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SAPDatabaseInstanceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.cs new file mode 100644 index 000000000000..e1105767d0dc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The response of a SAPDatabaseInstance list operation. + internal partial class SAPDatabaseInstanceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The SAPDatabaseInstance items on this page. + /// is null. + internal SAPDatabaseInstanceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SAPDatabaseInstance items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SAPDatabaseInstanceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SAPDatabaseInstanceListResult() + { + } + + /// The SAPDatabaseInstance items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.Serialization.cs new file mode 100644 index 000000000000..c50410d992b3 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SAPVirtualInstanceIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPVirtualInstanceIdentity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (Optional.IsCollectionDefined(UserAssignedIdentities)) + { + writer.WritePropertyName("userAssignedIdentities"u8); + writer.WriteStartObject(); + foreach (var item in UserAssignedIdentities) + { + writer.WritePropertyName(item.Key); + JsonSerializer.Serialize(writer, item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SAPVirtualInstanceIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPVirtualInstanceIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSAPVirtualInstanceIdentity(document.RootElement, options); + } + + internal static SAPVirtualInstanceIdentity DeserializeSAPVirtualInstanceIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SAPVirtualInstanceIdentityType type = default; + IDictionary userAssignedIdentities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new SAPVirtualInstanceIdentityType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, JsonSerializer.Deserialize(property0.Value.GetRawText())); + } + userAssignedIdentities = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SAPVirtualInstanceIdentity(type, userAssignedIdentities ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SAPVirtualInstanceIdentity)} does not support writing '{options.Format}' format."); + } + } + + SAPVirtualInstanceIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSAPVirtualInstanceIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SAPVirtualInstanceIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.cs new file mode 100644 index 000000000000..8067eca50865 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.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.ResourceManager.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Managed service identity (user assigned identities). + public partial class SAPVirtualInstanceIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The type of managed identity assigned to this resource. + public SAPVirtualInstanceIdentity(SAPVirtualInstanceIdentityType type) + { + Type = type; + UserAssignedIdentities = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The type of managed identity assigned to this resource. + /// The identities assigned to this resource by the user. + /// Keeps track of any properties unknown to the library. + internal SAPVirtualInstanceIdentity(SAPVirtualInstanceIdentityType type, IDictionary userAssignedIdentities, IDictionary serializedAdditionalRawData) + { + Type = type; + UserAssignedIdentities = userAssignedIdentities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SAPVirtualInstanceIdentity() + { + } + + /// The type of managed identity assigned to this resource. + public SAPVirtualInstanceIdentityType Type { get; set; } + /// The identities assigned to this resource by the user. + public IDictionary UserAssignedIdentities { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentityType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentityType.cs new file mode 100644 index 000000000000..8d542c8db648 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentityType.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.SapVirtualInstances.Models +{ + /// Type of managed service identity (where only None and UserAssigned types are allowed). + public readonly partial struct SAPVirtualInstanceIdentityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SAPVirtualInstanceIdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string UserAssignedValue = "UserAssigned"; + + /// No managed identity. + public static SAPVirtualInstanceIdentityType None { get; } = new SAPVirtualInstanceIdentityType(NoneValue); + /// User assigned managed identity. + public static SAPVirtualInstanceIdentityType UserAssigned { get; } = new SAPVirtualInstanceIdentityType(UserAssignedValue); + /// Determines if two values are the same. + public static bool operator ==(SAPVirtualInstanceIdentityType left, SAPVirtualInstanceIdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SAPVirtualInstanceIdentityType left, SAPVirtualInstanceIdentityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SAPVirtualInstanceIdentityType(string value) => new SAPVirtualInstanceIdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SAPVirtualInstanceIdentityType other && Equals(other); + /// + public bool Equals(SAPVirtualInstanceIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.Serialization.cs new file mode 100644 index 000000000000..9323baf845fa --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SAPVirtualInstanceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPVirtualInstanceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SAPVirtualInstanceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPVirtualInstanceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSAPVirtualInstanceListResult(document.RootElement, options); + } + + internal static SAPVirtualInstanceListResult DeserializeSAPVirtualInstanceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapVirtualInstanceData.DeserializeSapVirtualInstanceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SAPVirtualInstanceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SAPVirtualInstanceListResult)} does not support writing '{options.Format}' format."); + } + } + + SAPVirtualInstanceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSAPVirtualInstanceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SAPVirtualInstanceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.cs new file mode 100644 index 000000000000..5b521df7e308 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The response of a SAPVirtualInstance list operation. + internal partial class SAPVirtualInstanceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The SAPVirtualInstance items on this page. + /// is null. + internal SAPVirtualInstanceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SAPVirtualInstance items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SAPVirtualInstanceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SAPVirtualInstanceListResult() + { + } + + /// The SAPVirtualInstance items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.Serialization.cs new file mode 100644 index 000000000000..8d5b49002b4f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapApplicationServerInstancePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerInstancePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapApplicationServerInstancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerInstancePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapApplicationServerInstancePatch(document.RootElement, options); + } + + internal static SapApplicationServerInstancePatch DeserializeSapApplicationServerInstancePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapApplicationServerInstancePatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapApplicationServerInstancePatch)} does not support writing '{options.Format}' format."); + } + } + + SapApplicationServerInstancePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapApplicationServerInstancePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapApplicationServerInstancePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.cs new file mode 100644 index 000000000000..15de09ef1995 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the request body for updating SAP Application Instance. + public partial class SapApplicationServerInstancePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapApplicationServerInstancePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Gets or sets the Resource tags. + /// Keeps track of any properties unknown to the library. + internal SapApplicationServerInstancePatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.Serialization.cs new file mode 100644 index 000000000000..b80b8c544d77 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.Serialization.cs @@ -0,0 +1,358 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapApplicationServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(InstanceNo)) + { + writer.WritePropertyName("instanceNo"u8); + writer.WriteStringValue(InstanceNo); + } + if (options.Format != "W" && Optional.IsDefined(Subnet)) + { + writer.WritePropertyName("subnet"u8); + writer.WriteStringValue(Subnet); + } + if (options.Format != "W" && Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + if (options.Format != "W" && Optional.IsDefined(KernelVersion)) + { + writer.WritePropertyName("kernelVersion"u8); + writer.WriteStringValue(KernelVersion); + } + if (options.Format != "W" && Optional.IsDefined(KernelPatch)) + { + writer.WritePropertyName("kernelPatch"u8); + writer.WriteStringValue(KernelPatch); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(GatewayPort)) + { + writer.WritePropertyName("gatewayPort"u8); + writer.WriteNumberValue(GatewayPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(IcmHttpPort)) + { + writer.WritePropertyName("icmHttpPort"u8); + writer.WriteNumberValue(IcmHttpPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(IcmHttpsPort)) + { + writer.WritePropertyName("icmHttpsPort"u8); + writer.WriteNumberValue(IcmHttpsPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(DispatcherStatus)) + { + writer.WritePropertyName("dispatcherStatus"u8); + writer.WriteStringValue(DispatcherStatus); + } + if (options.Format != "W" && Optional.IsDefined(LoadBalancerDetails)) + { + writer.WritePropertyName("loadBalancerDetails"u8); + JsonSerializer.Serialize(writer, LoadBalancerDetails); + } + if (options.Format != "W" && Optional.IsCollectionDefined(VmDetails)) + { + writer.WritePropertyName("vmDetails"u8); + writer.WriteStartArray(); + foreach (var item in VmDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteObjectValue(Errors, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapApplicationServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapApplicationServerProperties(document.RootElement, options); + } + + internal static SapApplicationServerProperties DeserializeSapApplicationServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceNo = default; + string subnet = default; + string hostname = default; + string kernelVersion = default; + string kernelPatch = default; + string ipAddress = default; + long? gatewayPort = default; + long? icmHttpPort = default; + long? icmHttpsPort = default; + string dispatcherStatus = default; + SubResource loadBalancerDetails = default; + IReadOnlyList vmDetails = default; + SapVirtualInstanceStatus? status = default; + SapHealthState? health = default; + SapVirtualInstanceProvisioningState? provisioningState = default; + SapVirtualInstanceError errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceNo"u8)) + { + instanceNo = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnet"u8)) + { + subnet = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("kernelVersion"u8)) + { + kernelVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("kernelPatch"u8)) + { + kernelPatch = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("gatewayPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("icmHttpPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + icmHttpPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("icmHttpsPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + icmHttpsPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("dispatcherStatus"u8)) + { + dispatcherStatus = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancerDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBalancerDetails = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("vmDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApplicationServerVmDetails.DeserializeApplicationServerVmDetails(item, options)); + } + vmDetails = array; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SapVirtualInstanceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new SapVirtualInstanceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errors = SapVirtualInstanceError.DeserializeSapVirtualInstanceError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapApplicationServerProperties( + instanceNo, + subnet, + hostname, + kernelVersion, + kernelPatch, + ipAddress, + gatewayPort, + icmHttpPort, + icmHttpsPort, + dispatcherStatus, + loadBalancerDetails, + vmDetails ?? new ChangeTrackingList(), + status, + health, + provisioningState, + errors, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapApplicationServerProperties)} does not support writing '{options.Format}' format."); + } + } + + SapApplicationServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapApplicationServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapApplicationServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.cs new file mode 100644 index 000000000000..d3d6af0f324d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Application Server instance properties. + public partial class SapApplicationServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapApplicationServerProperties() + { + VmDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Application server Instance Number. + /// Application server Subnet. + /// Application server instance SAP hostname. + /// Application server instance SAP Kernel Version. + /// Application server instance SAP Kernel Patch level. + /// Application server instance SAP IP Address. + /// Application server instance gateway Port. + /// Application server instance ICM HTTP Port. + /// Application server instance ICM HTTPS Port. + /// Application server instance dispatcher status. + /// The Load Balancer details such as LoadBalancer ID attached to Application Server Virtual Machines. + /// The list of virtual machines. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the provisioning states. + /// Defines the Application Instance errors. + /// Keeps track of any properties unknown to the library. + internal SapApplicationServerProperties(string instanceNo, string subnet, string hostname, string kernelVersion, string kernelPatch, string ipAddress, long? gatewayPort, long? icmHttpPort, long? icmHttpsPort, string dispatcherStatus, SubResource loadBalancerDetails, IReadOnlyList vmDetails, SapVirtualInstanceStatus? status, SapHealthState? health, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors, IDictionary serializedAdditionalRawData) + { + InstanceNo = instanceNo; + Subnet = subnet; + Hostname = hostname; + KernelVersion = kernelVersion; + KernelPatch = kernelPatch; + IPAddress = ipAddress; + GatewayPort = gatewayPort; + IcmHttpPort = icmHttpPort; + IcmHttpsPort = icmHttpsPort; + DispatcherStatus = dispatcherStatus; + LoadBalancerDetails = loadBalancerDetails; + VmDetails = vmDetails; + Status = status; + Health = health; + ProvisioningState = provisioningState; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Application server Instance Number. + public string InstanceNo { get; } + /// Application server Subnet. + public string Subnet { get; } + /// Application server instance SAP hostname. + public string Hostname { get; } + /// Application server instance SAP Kernel Version. + public string KernelVersion { get; } + /// Application server instance SAP Kernel Patch level. + public string KernelPatch { get; } + /// Application server instance SAP IP Address. + public string IPAddress { get; } + /// Application server instance gateway Port. + public long? GatewayPort { get; } + /// Application server instance ICM HTTP Port. + public long? IcmHttpPort { get; } + /// Application server instance ICM HTTPS Port. + public long? IcmHttpsPort { get; } + /// Application server instance dispatcher status. + public string DispatcherStatus { get; } + /// The Load Balancer details such as LoadBalancer ID attached to Application Server Virtual Machines. + internal SubResource LoadBalancerDetails { get; } + /// Gets Id. + public ResourceIdentifier LoadBalancerDetailsId + { + get => LoadBalancerDetails?.Id; + } + + /// The list of virtual machines. + public IReadOnlyList VmDetails { get; } + /// Defines the SAP Instance status. + public SapVirtualInstanceStatus? Status { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + /// Defines the provisioning states. + public SapVirtualInstanceProvisioningState? ProvisioningState { get; } + /// Defines the Application Instance errors. + internal SapVirtualInstanceError Errors { get; } + /// The Virtual Instance for SAP error body. + public ErrorInformation ErrorsProperties + { + get => Errors?.Properties; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.Serialization.cs new file mode 100644 index 000000000000..84ae745e1857 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapAvailabilityZoneDetailsContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + writer.WritePropertyName("sapProduct"u8); + writer.WriteStringValue(SapProduct.ToString()); + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapAvailabilityZoneDetailsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapAvailabilityZoneDetailsContent(document.RootElement, options); + } + + internal static SapAvailabilityZoneDetailsContent DeserializeSapAvailabilityZoneDetailsContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + SapProductType sapProduct = default; + SapDatabaseType databaseType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("sapProduct"u8)) + { + sapProduct = new SapProductType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapAvailabilityZoneDetailsContent(appLocation, sapProduct, databaseType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsContent)} does not support writing '{options.Format}' format."); + } + } + + SapAvailabilityZoneDetailsContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapAvailabilityZoneDetailsContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.cs new file mode 100644 index 000000000000..1e7a1d088400 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP request to get list of availability zones. + public partial class SapAvailabilityZoneDetailsContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The geo-location where the SAP resources will be created. + /// Defines the SAP Product type. + /// The database type. Eg: HANA, DB2, etc. + /// is null. + public SapAvailabilityZoneDetailsContent(string appLocation, SapProductType sapProduct, SapDatabaseType databaseType) + { + Argument.AssertNotNull(appLocation, nameof(appLocation)); + + AppLocation = appLocation; + SapProduct = sapProduct; + DatabaseType = databaseType; + } + + /// Initializes a new instance of . + /// The geo-location where the SAP resources will be created. + /// Defines the SAP Product type. + /// The database type. Eg: HANA, DB2, etc. + /// Keeps track of any properties unknown to the library. + internal SapAvailabilityZoneDetailsContent(string appLocation, SapProductType sapProduct, SapDatabaseType databaseType, IDictionary serializedAdditionalRawData) + { + AppLocation = appLocation; + SapProduct = sapProduct; + DatabaseType = databaseType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapAvailabilityZoneDetailsContent() + { + } + + /// The geo-location where the SAP resources will be created. + public string AppLocation { get; } + /// Defines the SAP Product type. + public SapProductType SapProduct { get; } + /// The database type. Eg: HANA, DB2, etc. + public SapDatabaseType DatabaseType { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.Serialization.cs new file mode 100644 index 000000000000..937db7ab100a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapAvailabilityZoneDetailsResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(AvailabilityZonePairs)) + { + writer.WritePropertyName("availabilityZonePairs"u8); + writer.WriteStartArray(); + foreach (var item in AvailabilityZonePairs) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapAvailabilityZoneDetailsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapAvailabilityZoneDetailsResult(document.RootElement, options); + } + + internal static SapAvailabilityZoneDetailsResult DeserializeSapAvailabilityZoneDetailsResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList availabilityZonePairs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("availabilityZonePairs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapAvailabilityZonePair.DeserializeSapAvailabilityZonePair(item, options)); + } + availabilityZonePairs = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapAvailabilityZoneDetailsResult(availabilityZonePairs ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsResult)} does not support writing '{options.Format}' format."); + } + } + + SapAvailabilityZoneDetailsResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapAvailabilityZoneDetailsResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.cs new file mode 100644 index 000000000000..d0f35ceb0bb2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The list of supported availability zone pairs which are part of SAP HA deployment. + public partial class SapAvailabilityZoneDetailsResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapAvailabilityZoneDetailsResult() + { + AvailabilityZonePairs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets the list of availability zone pairs. + /// Keeps track of any properties unknown to the library. + internal SapAvailabilityZoneDetailsResult(IReadOnlyList availabilityZonePairs, IDictionary serializedAdditionalRawData) + { + AvailabilityZonePairs = availabilityZonePairs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the list of availability zone pairs. + public IReadOnlyList AvailabilityZonePairs { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.Serialization.cs new file mode 100644 index 000000000000..e40898672dfe --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapAvailabilityZonePair : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZonePair)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ZoneA)) + { + writer.WritePropertyName("zoneA"u8); + writer.WriteNumberValue(ZoneA.Value); + } + if (Optional.IsDefined(ZoneB)) + { + writer.WritePropertyName("zoneB"u8); + writer.WriteNumberValue(ZoneB.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapAvailabilityZonePair IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZonePair)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapAvailabilityZonePair(document.RootElement, options); + } + + internal static SapAvailabilityZonePair DeserializeSapAvailabilityZonePair(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? zoneA = default; + long? zoneB = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("zoneA"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zoneA = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("zoneB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zoneB = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapAvailabilityZonePair(zoneA, zoneB, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapAvailabilityZonePair)} does not support writing '{options.Format}' format."); + } + } + + SapAvailabilityZonePair IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapAvailabilityZonePair(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapAvailabilityZonePair)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.cs new file mode 100644 index 000000000000..81233b446ae0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Availability Zone Pair. + public partial class SapAvailabilityZonePair + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapAvailabilityZonePair() + { + } + + /// Initializes a new instance of . + /// The zone A. + /// The zone B. + /// Keeps track of any properties unknown to the library. + internal SapAvailabilityZonePair(long? zoneA, long? zoneB, IDictionary serializedAdditionalRawData) + { + ZoneA = zoneA; + ZoneB = zoneB; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The zone A. + public long? ZoneA { get; } + /// The zone B. + public long? ZoneB { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.Serialization.cs new file mode 100644 index 000000000000..edebc5826924 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapCentralServerInstancePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerInstancePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapCentralServerInstancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerInstancePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapCentralServerInstancePatch(document.RootElement, options); + } + + internal static SapCentralServerInstancePatch DeserializeSapCentralServerInstancePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapCentralServerInstancePatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapCentralServerInstancePatch)} does not support writing '{options.Format}' format."); + } + } + + SapCentralServerInstancePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapCentralServerInstancePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapCentralServerInstancePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.cs new file mode 100644 index 000000000000..9b4349b1b46b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the request body for updating SAP Central Instance. + public partial class SapCentralServerInstancePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapCentralServerInstancePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Gets or sets the Resource tags. + /// Keeps track of any properties unknown to the library. + internal SapCentralServerInstancePatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.Serialization.cs new file mode 100644 index 000000000000..99fac271dd87 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.Serialization.cs @@ -0,0 +1,338 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapCentralServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(InstanceNo)) + { + writer.WritePropertyName("instanceNo"u8); + writer.WriteStringValue(InstanceNo); + } + if (options.Format != "W" && Optional.IsDefined(Subnet)) + { + writer.WritePropertyName("subnet"u8); + writer.WriteStringValue(Subnet); + } + if (Optional.IsDefined(MessageServerProperties)) + { + writer.WritePropertyName("messageServerProperties"u8); + writer.WriteObjectValue(MessageServerProperties, options); + } + if (Optional.IsDefined(EnqueueServerProperties)) + { + writer.WritePropertyName("enqueueServerProperties"u8); + writer.WriteObjectValue(EnqueueServerProperties, options); + } + if (Optional.IsDefined(GatewayServerProperties)) + { + writer.WritePropertyName("gatewayServerProperties"u8); + writer.WriteObjectValue(GatewayServerProperties, options); + } + if (Optional.IsDefined(EnqueueReplicationServerProperties)) + { + writer.WritePropertyName("enqueueReplicationServerProperties"u8); + writer.WriteObjectValue(EnqueueReplicationServerProperties, options); + } + if (options.Format != "W" && Optional.IsDefined(KernelVersion)) + { + writer.WritePropertyName("kernelVersion"u8); + writer.WriteStringValue(KernelVersion); + } + if (options.Format != "W" && Optional.IsDefined(KernelPatch)) + { + writer.WritePropertyName("kernelPatch"u8); + writer.WriteStringValue(KernelPatch); + } + if (options.Format != "W" && Optional.IsDefined(LoadBalancerDetails)) + { + writer.WritePropertyName("loadBalancerDetails"u8); + JsonSerializer.Serialize(writer, LoadBalancerDetails); + } + if (options.Format != "W" && Optional.IsCollectionDefined(VmDetails)) + { + writer.WritePropertyName("vmDetails"u8); + writer.WriteStartArray(); + foreach (var item in VmDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteObjectValue(Errors, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapCentralServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapCentralServerProperties(document.RootElement, options); + } + + internal static SapCentralServerProperties DeserializeSapCentralServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceNo = default; + string subnet = default; + MessageServerProperties messageServerProperties = default; + EnqueueServerProperties enqueueServerProperties = default; + GatewayServerProperties gatewayServerProperties = default; + EnqueueReplicationServerProperties enqueueReplicationServerProperties = default; + string kernelVersion = default; + string kernelPatch = default; + SubResource loadBalancerDetails = default; + IReadOnlyList vmDetails = default; + SapVirtualInstanceStatus? status = default; + SapHealthState? health = default; + SapVirtualInstanceProvisioningState? provisioningState = default; + SapVirtualInstanceError errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceNo"u8)) + { + instanceNo = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnet"u8)) + { + subnet = property.Value.GetString(); + continue; + } + if (property.NameEquals("messageServerProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + messageServerProperties = MessageServerProperties.DeserializeMessageServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("enqueueServerProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enqueueServerProperties = EnqueueServerProperties.DeserializeEnqueueServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("gatewayServerProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayServerProperties = GatewayServerProperties.DeserializeGatewayServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("enqueueReplicationServerProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enqueueReplicationServerProperties = EnqueueReplicationServerProperties.DeserializeEnqueueReplicationServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("kernelVersion"u8)) + { + kernelVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("kernelPatch"u8)) + { + kernelPatch = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancerDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBalancerDetails = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("vmDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CentralServerVmDetails.DeserializeCentralServerVmDetails(item, options)); + } + vmDetails = array; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SapVirtualInstanceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new SapVirtualInstanceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errors = SapVirtualInstanceError.DeserializeSapVirtualInstanceError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapCentralServerProperties( + instanceNo, + subnet, + messageServerProperties, + enqueueServerProperties, + gatewayServerProperties, + enqueueReplicationServerProperties, + kernelVersion, + kernelPatch, + loadBalancerDetails, + vmDetails ?? new ChangeTrackingList(), + status, + health, + provisioningState, + errors, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapCentralServerProperties)} does not support writing '{options.Format}' format."); + } + } + + SapCentralServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapCentralServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapCentralServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.cs new file mode 100644 index 000000000000..2c46c90b32bd --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Central Services Instance properties. + public partial class SapCentralServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapCentralServerProperties() + { + VmDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The central services instance number. + /// The central services instance subnet. + /// Defines the SAP message server properties. + /// Defines the SAP Enqueue Server properties. + /// Defines the SAP Gateway Server properties. + /// Defines the SAP Enqueue Replication Server (ERS) properties. + /// The central services instance Kernel Version. + /// The central services instance Kernel Patch level. + /// The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual Machines. + /// The list of virtual machines corresponding to the Central Services instance. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the provisioning states. + /// Defines the errors related to SAP Central Services Instance resource. + /// Keeps track of any properties unknown to the library. + internal SapCentralServerProperties(string instanceNo, string subnet, MessageServerProperties messageServerProperties, EnqueueServerProperties enqueueServerProperties, GatewayServerProperties gatewayServerProperties, EnqueueReplicationServerProperties enqueueReplicationServerProperties, string kernelVersion, string kernelPatch, SubResource loadBalancerDetails, IReadOnlyList vmDetails, SapVirtualInstanceStatus? status, SapHealthState? health, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors, IDictionary serializedAdditionalRawData) + { + InstanceNo = instanceNo; + Subnet = subnet; + MessageServerProperties = messageServerProperties; + EnqueueServerProperties = enqueueServerProperties; + GatewayServerProperties = gatewayServerProperties; + EnqueueReplicationServerProperties = enqueueReplicationServerProperties; + KernelVersion = kernelVersion; + KernelPatch = kernelPatch; + LoadBalancerDetails = loadBalancerDetails; + VmDetails = vmDetails; + Status = status; + Health = health; + ProvisioningState = provisioningState; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The central services instance number. + public string InstanceNo { get; } + /// The central services instance subnet. + public string Subnet { get; } + /// Defines the SAP message server properties. + public MessageServerProperties MessageServerProperties { get; set; } + /// Defines the SAP Enqueue Server properties. + public EnqueueServerProperties EnqueueServerProperties { get; set; } + /// Defines the SAP Gateway Server properties. + public GatewayServerProperties GatewayServerProperties { get; set; } + /// Defines the SAP Enqueue Replication Server (ERS) properties. + public EnqueueReplicationServerProperties EnqueueReplicationServerProperties { get; set; } + /// The central services instance Kernel Version. + public string KernelVersion { get; } + /// The central services instance Kernel Patch level. + public string KernelPatch { get; } + /// The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual Machines. + internal SubResource LoadBalancerDetails { get; } + /// Gets Id. + public ResourceIdentifier LoadBalancerDetailsId + { + get => LoadBalancerDetails?.Id; + } + + /// The list of virtual machines corresponding to the Central Services instance. + public IReadOnlyList VmDetails { get; } + /// Defines the SAP Instance status. + public SapVirtualInstanceStatus? Status { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + /// Defines the provisioning states. + public SapVirtualInstanceProvisioningState? ProvisioningState { get; } + /// Defines the errors related to SAP Central Services Instance resource. + internal SapVirtualInstanceError Errors { get; } + /// The Virtual Instance for SAP error body. + public ErrorInformation ErrorsProperties + { + get => Errors?.Properties; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.Serialization.cs new file mode 100644 index 000000000000..981164c59aad --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.Serialization.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownSapConfiguration))] + public partial class SapConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("configurationType"u8); + writer.WriteStringValue(ConfigurationType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapConfiguration(document.RootElement, options); + } + + internal static SapConfiguration DeserializeSapConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("configurationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Deployment": return DeploymentConfiguration.DeserializeDeploymentConfiguration(element, options); + case "DeploymentWithOSConfig": return DeploymentWithOSConfiguration.DeserializeDeploymentWithOSConfiguration(element, options); + case "Discovery": return DiscoveryConfiguration.DeserializeDiscoveryConfiguration(element, options); + } + } + return UnknownSapConfiguration.DeserializeUnknownSapConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SapConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.cs new file mode 100644 index 000000000000..1c62e1446f1c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// The SAP Configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class SapConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected SapConfiguration() + { + } + + /// Initializes a new instance of . + /// The configuration type. Eg: Deployment/Discovery. + /// Keeps track of any properties unknown to the library. + internal SapConfiguration(SapConfigurationType configurationType, IDictionary serializedAdditionalRawData) + { + ConfigurationType = configurationType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The configuration type. Eg: Deployment/Discovery. + internal SapConfigurationType ConfigurationType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfigurationType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfigurationType.cs new file mode 100644 index 000000000000..967f3a80c04e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfigurationType.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.SapVirtualInstances.Models +{ + /// The configuration Type. + internal readonly partial struct SapConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DeploymentValue = "Deployment"; + private const string DiscoveryValue = "Discovery"; + private const string DeploymentWithOSConfigValue = "DeploymentWithOSConfig"; + + /// SAP system will be deployed by service. No OS configurations will be done. + public static SapConfigurationType Deployment { get; } = new SapConfigurationType(DeploymentValue); + /// Existing SAP system will be registered. + public static SapConfigurationType Discovery { get; } = new SapConfigurationType(DiscoveryValue); + /// SAP system will be deployed by service. OS configurations will be done. + public static SapConfigurationType DeploymentWithOSConfig { get; } = new SapConfigurationType(DeploymentWithOSConfigValue); + /// Determines if two values are the same. + public static bool operator ==(SapConfigurationType left, SapConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapConfigurationType left, SapConfigurationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapConfigurationType(string value) => new SapConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapConfigurationType other && Equals(other); + /// + public bool Equals(SapConfigurationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.Serialization.cs new file mode 100644 index 000000000000..20de1862597d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapDatabaseInstancePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseInstancePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapDatabaseInstancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseInstancePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDatabaseInstancePatch(document.RootElement, options); + } + + internal static SapDatabaseInstancePatch DeserializeSapDatabaseInstancePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDatabaseInstancePatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDatabaseInstancePatch)} does not support writing '{options.Format}' format."); + } + } + + SapDatabaseInstancePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapDatabaseInstancePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDatabaseInstancePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.cs new file mode 100644 index 000000000000..69919b2cb4dc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the request body for updating SAP Database Instance. + public partial class SapDatabaseInstancePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapDatabaseInstancePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Gets or sets the Resource tags. + /// Keeps track of any properties unknown to the library. + internal SapDatabaseInstancePatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.Serialization.cs new file mode 100644 index 000000000000..38323e7cb353 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.Serialization.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapDatabaseProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Subnet)) + { + writer.WritePropertyName("subnet"u8); + writer.WriteStringValue(Subnet); + } + if (options.Format != "W" && Optional.IsDefined(DatabaseSid)) + { + writer.WritePropertyName("databaseSid"u8); + writer.WriteStringValue(DatabaseSid); + } + if (options.Format != "W" && Optional.IsDefined(DatabaseType)) + { + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(LoadBalancerDetails)) + { + writer.WritePropertyName("loadBalancerDetails"u8); + JsonSerializer.Serialize(writer, LoadBalancerDetails); + } + if (options.Format != "W" && Optional.IsCollectionDefined(VmDetails)) + { + writer.WritePropertyName("vmDetails"u8); + writer.WriteStartArray(); + foreach (var item in VmDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteObjectValue(Errors, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapDatabaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDatabaseProperties(document.RootElement, options); + } + + internal static SapDatabaseProperties DeserializeSapDatabaseProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subnet = default; + string databaseSid = default; + string databaseType = default; + string ipAddress = default; + SubResource loadBalancerDetails = default; + IReadOnlyList vmDetails = default; + SapVirtualInstanceStatus? status = default; + SapVirtualInstanceProvisioningState? provisioningState = default; + SapVirtualInstanceError errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnet"u8)) + { + subnet = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseSid"u8)) + { + databaseSid = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + databaseType = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancerDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBalancerDetails = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("vmDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DatabaseVmDetails.DeserializeDatabaseVmDetails(item, options)); + } + vmDetails = array; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SapVirtualInstanceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new SapVirtualInstanceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errors = SapVirtualInstanceError.DeserializeSapVirtualInstanceError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDatabaseProperties( + subnet, + databaseSid, + databaseType, + ipAddress, + loadBalancerDetails, + vmDetails ?? new ChangeTrackingList(), + status, + provisioningState, + errors, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDatabaseProperties)} does not support writing '{options.Format}' format."); + } + } + + SapDatabaseProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapDatabaseProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDatabaseProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.cs new file mode 100644 index 000000000000..e5c3d9feaeae --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the Database properties. + public partial class SapDatabaseProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapDatabaseProperties() + { + VmDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Database subnet. + /// Database SID name. + /// Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL Server. + /// Database IP Address. + /// The Load Balancer details such as LoadBalancer ID attached to Database Virtual Machines. + /// The list of virtual machines corresponding to the Database resource. + /// Defines the SAP Instance status. + /// Defines the provisioning states. + /// Defines the errors related to Database resource. + /// Keeps track of any properties unknown to the library. + internal SapDatabaseProperties(string subnet, string databaseSid, string databaseType, string ipAddress, SubResource loadBalancerDetails, IReadOnlyList vmDetails, SapVirtualInstanceStatus? status, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors, IDictionary serializedAdditionalRawData) + { + Subnet = subnet; + DatabaseSid = databaseSid; + DatabaseType = databaseType; + IPAddress = ipAddress; + LoadBalancerDetails = loadBalancerDetails; + VmDetails = vmDetails; + Status = status; + ProvisioningState = provisioningState; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Database subnet. + public string Subnet { get; } + /// Database SID name. + public string DatabaseSid { get; } + /// Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL Server. + public string DatabaseType { get; } + /// Database IP Address. + public string IPAddress { get; } + /// The Load Balancer details such as LoadBalancer ID attached to Database Virtual Machines. + internal SubResource LoadBalancerDetails { get; } + /// Gets Id. + public ResourceIdentifier LoadBalancerDetailsId + { + get => LoadBalancerDetails?.Id; + } + + /// The list of virtual machines corresponding to the Database resource. + public IReadOnlyList VmDetails { get; } + /// Defines the SAP Instance status. + public SapVirtualInstanceStatus? Status { get; } + /// Defines the provisioning states. + public SapVirtualInstanceProvisioningState? ProvisioningState { get; } + /// Defines the errors related to Database resource. + internal SapVirtualInstanceError Errors { get; } + /// The Virtual Instance for SAP error body. + public ErrorInformation ErrorsProperties + { + get => Errors?.Properties; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseScaleMethod.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseScaleMethod.cs new file mode 100644 index 000000000000..32f8ad626a75 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseScaleMethod.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.SapVirtualInstances.Models +{ + /// The database scale method. + public readonly partial struct SapDatabaseScaleMethod : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapDatabaseScaleMethod(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ScaleUpValue = "ScaleUp"; + + /// ScaleUp Hana Database deployment type. + public static SapDatabaseScaleMethod ScaleUp { get; } = new SapDatabaseScaleMethod(ScaleUpValue); + /// Determines if two values are the same. + public static bool operator ==(SapDatabaseScaleMethod left, SapDatabaseScaleMethod right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapDatabaseScaleMethod left, SapDatabaseScaleMethod right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapDatabaseScaleMethod(string value) => new SapDatabaseScaleMethod(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapDatabaseScaleMethod other && Equals(other); + /// + public bool Equals(SapDatabaseScaleMethod other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseType.cs new file mode 100644 index 000000000000..d258a1c8ed0a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseType.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.SapVirtualInstances.Models +{ + /// Defines the supported SAP Database types. + public readonly partial struct SapDatabaseType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapDatabaseType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HANAValue = "HANA"; + private const string DB2Value = "DB2"; + + /// HANA Database type of SAP system. + public static SapDatabaseType HANA { get; } = new SapDatabaseType(HANAValue); + /// DB2 database type of the SAP system. + public static SapDatabaseType DB2 { get; } = new SapDatabaseType(DB2Value); + /// Determines if two values are the same. + public static bool operator ==(SapDatabaseType left, SapDatabaseType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapDatabaseType left, SapDatabaseType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapDatabaseType(string value) => new SapDatabaseType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapDatabaseType other && Equals(other); + /// + public bool Equals(SapDatabaseType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDeploymentType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDeploymentType.cs new file mode 100644 index 000000000000..26f7a80b134f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDeploymentType.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.SapVirtualInstances.Models +{ + /// The type of SAP deployment, single server or Three tier. + public readonly partial struct SapDeploymentType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapDeploymentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SingleServerValue = "SingleServer"; + private const string ThreeTierValue = "ThreeTier"; + + /// SAP Single server deployment type. + public static SapDeploymentType SingleServer { get; } = new SapDeploymentType(SingleServerValue); + /// SAP Distributed deployment type. + public static SapDeploymentType ThreeTier { get; } = new SapDeploymentType(ThreeTierValue); + /// Determines if two values are the same. + public static bool operator ==(SapDeploymentType left, SapDeploymentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapDeploymentType left, SapDeploymentType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapDeploymentType(string value) => new SapDeploymentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapDeploymentType other && Equals(other); + /// + public bool Equals(SapDeploymentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.Serialization.cs new file mode 100644 index 000000000000..46e066017a08 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapDiskConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(RecommendedConfiguration)) + { + writer.WritePropertyName("recommendedConfiguration"u8); + writer.WriteObjectValue(RecommendedConfiguration, options); + } + if (Optional.IsCollectionDefined(SupportedConfigurations)) + { + writer.WritePropertyName("supportedConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in SupportedConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapDiskConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDiskConfiguration(document.RootElement, options); + } + + internal static SapDiskConfiguration DeserializeSapDiskConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DiskVolumeConfiguration recommendedConfiguration = default; + IReadOnlyList supportedConfigurations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recommendedConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recommendedConfiguration = DiskVolumeConfiguration.DeserializeDiskVolumeConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("supportedConfigurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiskDetails.DeserializeDiskDetails(item, options)); + } + supportedConfigurations = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDiskConfiguration(recommendedConfiguration, supportedConfigurations ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDiskConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SapDiskConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapDiskConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDiskConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.cs new file mode 100644 index 000000000000..4518983516d1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Disk Configuration contains 'recommended disk' details and list of supported disks detail for a volume type. + public partial class SapDiskConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapDiskConfiguration() + { + SupportedConfigurations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The recommended disk details for a given VM Sku. + /// The list of supported disks for a given VM Sku. + /// Keeps track of any properties unknown to the library. + internal SapDiskConfiguration(DiskVolumeConfiguration recommendedConfiguration, IReadOnlyList supportedConfigurations, IDictionary serializedAdditionalRawData) + { + RecommendedConfiguration = recommendedConfiguration; + SupportedConfigurations = supportedConfigurations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The recommended disk details for a given VM Sku. + public DiskVolumeConfiguration RecommendedConfiguration { get; } + /// The list of supported disks for a given VM Sku. + public IReadOnlyList SupportedConfigurations { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.Serialization.cs new file mode 100644 index 000000000000..313a54cda54d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapDiskConfigurationsContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfigurationsContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + writer.WritePropertyName("environment"u8); + writer.WriteStringValue(Environment.ToString()); + writer.WritePropertyName("sapProduct"u8); + writer.WriteStringValue(SapProduct.ToString()); + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.ToString()); + writer.WritePropertyName("deploymentType"u8); + writer.WriteStringValue(DeploymentType.ToString()); + writer.WritePropertyName("dbVmSku"u8); + writer.WriteStringValue(DbVmSku); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapDiskConfigurationsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfigurationsContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDiskConfigurationsContent(document.RootElement, options); + } + + internal static SapDiskConfigurationsContent DeserializeSapDiskConfigurationsContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + SapEnvironmentType environment = default; + SapProductType sapProduct = default; + SapDatabaseType databaseType = default; + SapDeploymentType deploymentType = default; + string dbVmSku = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("environment"u8)) + { + environment = new SapEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sapProduct"u8)) + { + sapProduct = new SapProductType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("dbVmSku"u8)) + { + dbVmSku = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDiskConfigurationsContent( + appLocation, + environment, + sapProduct, + databaseType, + deploymentType, + dbVmSku, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDiskConfigurationsContent)} does not support writing '{options.Format}' format."); + } + } + + SapDiskConfigurationsContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapDiskConfigurationsContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDiskConfigurationsContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.cs new file mode 100644 index 000000000000..50cb9596e7d2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP request to get list of disk configurations. + public partial class SapDiskConfigurationsContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The geo-location where the SAP resources will be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The database type. Eg: HANA, DB2, etc. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The VM SKU for database instance. + /// or is null. + public SapDiskConfigurationsContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDatabaseType databaseType, SapDeploymentType deploymentType, string dbVmSku) + { + Argument.AssertNotNull(appLocation, nameof(appLocation)); + Argument.AssertNotNull(dbVmSku, nameof(dbVmSku)); + + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DatabaseType = databaseType; + DeploymentType = deploymentType; + DbVmSku = dbVmSku; + } + + /// Initializes a new instance of . + /// The geo-location where the SAP resources will be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The database type. Eg: HANA, DB2, etc. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The VM SKU for database instance. + /// Keeps track of any properties unknown to the library. + internal SapDiskConfigurationsContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDatabaseType databaseType, SapDeploymentType deploymentType, string dbVmSku, IDictionary serializedAdditionalRawData) + { + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DatabaseType = databaseType; + DeploymentType = deploymentType; + DbVmSku = dbVmSku; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapDiskConfigurationsContent() + { + } + + /// The geo-location where the SAP resources will be created. + public string AppLocation { get; } + /// Defines the environment type - Production/Non Production. + public SapEnvironmentType Environment { get; } + /// Defines the SAP Product type. + public SapProductType SapProduct { get; } + /// The database type. Eg: HANA, DB2, etc. + public SapDatabaseType DatabaseType { get; } + /// The deployment type. Eg: SingleServer/ThreeTier. + public SapDeploymentType DeploymentType { get; } + /// The VM SKU for database instance. + public string DbVmSku { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.Serialization.cs new file mode 100644 index 000000000000..f26bb0affdf6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapDiskConfigurationsResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfigurationsResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(VolumeConfigurations)) + { + writer.WritePropertyName("volumeConfigurations"u8); + writer.WriteStartObject(); + foreach (var item in VolumeConfigurations) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapDiskConfigurationsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfigurationsResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDiskConfigurationsResult(document.RootElement, options); + } + + internal static SapDiskConfigurationsResult DeserializeSapDiskConfigurationsResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary volumeConfigurations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("volumeConfigurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, SapDiskConfiguration.DeserializeSapDiskConfiguration(property0.Value, options)); + } + volumeConfigurations = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDiskConfigurationsResult(volumeConfigurations ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDiskConfigurationsResult)} does not support writing '{options.Format}' format."); + } + } + + SapDiskConfigurationsResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapDiskConfigurationsResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDiskConfigurationsResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.cs new file mode 100644 index 000000000000..68b5bc63cbab --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The list of disk configuration for vmSku which are part of SAP deployment. + public partial class SapDiskConfigurationsResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapDiskConfigurationsResult() + { + VolumeConfigurations = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + /// Keeps track of any properties unknown to the library. + internal SapDiskConfigurationsResult(IReadOnlyDictionary volumeConfigurations, IDictionary serializedAdditionalRawData) + { + VolumeConfigurations = volumeConfigurations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IReadOnlyDictionary VolumeConfigurations { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapEnvironmentType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapEnvironmentType.cs new file mode 100644 index 000000000000..bfe16bc5eba5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapEnvironmentType.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.SapVirtualInstances.Models +{ + /// Defines the environment type - Production/Non Production. + public readonly partial struct SapEnvironmentType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapEnvironmentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NonProdValue = "NonProd"; + private const string ProdValue = "Prod"; + + /// Non Production SAP system. + public static SapEnvironmentType NonProd { get; } = new SapEnvironmentType(NonProdValue); + /// Production SAP system. + public static SapEnvironmentType Prod { get; } = new SapEnvironmentType(ProdValue); + /// Determines if two values are the same. + public static bool operator ==(SapEnvironmentType left, SapEnvironmentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapEnvironmentType left, SapEnvironmentType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapEnvironmentType(string value) => new SapEnvironmentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapEnvironmentType other && Equals(other); + /// + public bool Equals(SapEnvironmentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHealthState.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHealthState.cs new file mode 100644 index 000000000000..b3db96529756 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHealthState.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.SapVirtualInstances.Models +{ + /// Defines the health of SAP Instances. + public readonly partial struct SapHealthState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapHealthState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string HealthyValue = "Healthy"; + private const string UnhealthyValue = "Unhealthy"; + private const string DegradedValue = "Degraded"; + + /// SAP System health is unknown. + public static SapHealthState Unknown { get; } = new SapHealthState(UnknownValue); + /// SAP System health is healthy. + public static SapHealthState Healthy { get; } = new SapHealthState(HealthyValue); + /// SAP System is unhealthy. + public static SapHealthState Unhealthy { get; } = new SapHealthState(UnhealthyValue); + /// SAP System health is degraded. + public static SapHealthState Degraded { get; } = new SapHealthState(DegradedValue); + /// Determines if two values are the same. + public static bool operator ==(SapHealthState left, SapHealthState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapHealthState left, SapHealthState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapHealthState(string value) => new SapHealthState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapHealthState other && Equals(other); + /// + public bool Equals(SapHealthState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHighAvailabilityType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHighAvailabilityType.cs new file mode 100644 index 000000000000..3e6a832aeff1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHighAvailabilityType.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.SapVirtualInstances.Models +{ + /// The high availability type (AvailabilitySet or AvailabilityZone). + public readonly partial struct SapHighAvailabilityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapHighAvailabilityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AvailabilitySetValue = "AvailabilitySet"; + private const string AvailabilityZoneValue = "AvailabilityZone"; + + /// HA deployment with availability sets. + public static SapHighAvailabilityType AvailabilitySet { get; } = new SapHighAvailabilityType(AvailabilitySetValue); + /// HA deployment with availability zones. + public static SapHighAvailabilityType AvailabilityZone { get; } = new SapHighAvailabilityType(AvailabilityZoneValue); + /// Determines if two values are the same. + public static bool operator ==(SapHighAvailabilityType left, SapHighAvailabilityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapHighAvailabilityType left, SapHighAvailabilityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapHighAvailabilityType(string value) => new SapHighAvailabilityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapHighAvailabilityType other && Equals(other); + /// + public bool Equals(SapHighAvailabilityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..32610dc0fc6c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapInstallWithoutOSConfigSoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapInstallWithoutOSConfigSoftwareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("bomUrl"u8); + writer.WriteStringValue(BomUri); + writer.WritePropertyName("sapBitsStorageAccountId"u8); + writer.WriteStringValue(SapBitsStorageAccountId); + writer.WritePropertyName("softwareVersion"u8); + writer.WriteStringValue(SoftwareVersion); + if (Optional.IsDefined(HighAvailabilitySoftwareConfiguration)) + { + writer.WritePropertyName("highAvailabilitySoftwareConfiguration"u8); + writer.WriteObjectValue(HighAvailabilitySoftwareConfiguration, options); + } + } + + SapInstallWithoutOSConfigSoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapInstallWithoutOSConfigSoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapInstallWithoutOSConfigSoftwareConfiguration(document.RootElement, options); + } + + internal static SapInstallWithoutOSConfigSoftwareConfiguration DeserializeSapInstallWithoutOSConfigSoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string bomUrl = default; + string sapBitsStorageAccountId = default; + string softwareVersion = default; + HighAvailabilitySoftwareConfiguration highAvailabilitySoftwareConfiguration = default; + SapSoftwareInstallationType softwareInstallationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("bomUrl"u8)) + { + bomUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("sapBitsStorageAccountId"u8)) + { + sapBitsStorageAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("softwareVersion"u8)) + { + softwareVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("highAvailabilitySoftwareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilitySoftwareConfiguration = HighAvailabilitySoftwareConfiguration.DeserializeHighAvailabilitySoftwareConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("softwareInstallationType"u8)) + { + softwareInstallationType = new SapSoftwareInstallationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapInstallWithoutOSConfigSoftwareConfiguration( + softwareInstallationType, + serializedAdditionalRawData, + bomUrl, + sapBitsStorageAccountId, + softwareVersion, + highAvailabilitySoftwareConfiguration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapInstallWithoutOSConfigSoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SapInstallWithoutOSConfigSoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapInstallWithoutOSConfigSoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapInstallWithoutOSConfigSoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.cs new file mode 100644 index 000000000000..feb3c7735081 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Software configuration Input when the software is to be installed by service without OS Configurations. + public partial class SapInstallWithoutOSConfigSoftwareConfiguration : SoftwareConfiguration + { + /// Initializes a new instance of . + /// The URL to the SAP Build of Materials(BOM) file. + /// The SAP bits storage account id. + /// The software version to install. + /// , or is null. + public SapInstallWithoutOSConfigSoftwareConfiguration(string bomUri, string sapBitsStorageAccountId, string softwareVersion) + { + Argument.AssertNotNull(bomUri, nameof(bomUri)); + Argument.AssertNotNull(sapBitsStorageAccountId, nameof(sapBitsStorageAccountId)); + Argument.AssertNotNull(softwareVersion, nameof(softwareVersion)); + + BomUri = bomUri; + SapBitsStorageAccountId = sapBitsStorageAccountId; + SoftwareVersion = softwareVersion; + SoftwareInstallationType = SapSoftwareInstallationType.SAPInstallWithoutOSConfig; + } + + /// Initializes a new instance of . + /// The SAP software installation type. + /// Keeps track of any properties unknown to the library. + /// The URL to the SAP Build of Materials(BOM) file. + /// The SAP bits storage account id. + /// The software version to install. + /// Gets or sets the HA software configuration. + internal SapInstallWithoutOSConfigSoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, IDictionary serializedAdditionalRawData, string bomUri, string sapBitsStorageAccountId, string softwareVersion, HighAvailabilitySoftwareConfiguration highAvailabilitySoftwareConfiguration) : base(softwareInstallationType, serializedAdditionalRawData) + { + BomUri = bomUri; + SapBitsStorageAccountId = sapBitsStorageAccountId; + SoftwareVersion = softwareVersion; + HighAvailabilitySoftwareConfiguration = highAvailabilitySoftwareConfiguration; + SoftwareInstallationType = softwareInstallationType; + } + + /// Initializes a new instance of for deserialization. + internal SapInstallWithoutOSConfigSoftwareConfiguration() + { + } + + /// The URL to the SAP Build of Materials(BOM) file. + public string BomUri { get; set; } + /// The SAP bits storage account id. + public string SapBitsStorageAccountId { get; set; } + /// The software version to install. + public string SoftwareVersion { get; set; } + /// Gets or sets the HA software configuration. + public HighAvailabilitySoftwareConfiguration HighAvailabilitySoftwareConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapProductType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapProductType.cs new file mode 100644 index 000000000000..4f7c447c7964 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapProductType.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.SapVirtualInstances.Models +{ + /// Defines the SAP Product type. + public readonly partial struct SapProductType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapProductType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ECCValue = "ECC"; + private const string S4HANAValue = "S4HANA"; + private const string OtherValue = "Other"; + + /// SAP Product ECC. + public static SapProductType ECC { get; } = new SapProductType(ECCValue); + /// SAP Product S4HANA. + public static SapProductType S4HANA { get; } = new SapProductType(S4HANAValue); + /// SAP Products other than the ones listed. + public static SapProductType Other { get; } = new SapProductType(OtherValue); + /// Determines if two values are the same. + public static bool operator ==(SapProductType left, SapProductType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapProductType left, SapProductType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapProductType(string value) => new SapProductType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapProductType other && Equals(other); + /// + public bool Equals(SapProductType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.Serialization.cs new file mode 100644 index 000000000000..27e4f6de2e5a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.Serialization.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapSizingRecommendationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + writer.WritePropertyName("environment"u8); + writer.WriteStringValue(Environment.ToString()); + writer.WritePropertyName("sapProduct"u8); + writer.WriteStringValue(SapProduct.ToString()); + writer.WritePropertyName("deploymentType"u8); + writer.WriteStringValue(DeploymentType.ToString()); + writer.WritePropertyName("saps"u8); + writer.WriteNumberValue(Saps); + writer.WritePropertyName("dbMemory"u8); + writer.WriteNumberValue(DbMemory); + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.ToString()); + if (Optional.IsDefined(DbScaleMethod)) + { + writer.WritePropertyName("dbScaleMethod"u8); + writer.WriteStringValue(DbScaleMethod.Value.ToString()); + } + if (Optional.IsDefined(HighAvailabilityType)) + { + writer.WritePropertyName("highAvailabilityType"u8); + writer.WriteStringValue(HighAvailabilityType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapSizingRecommendationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSizingRecommendationContent(document.RootElement, options); + } + + internal static SapSizingRecommendationContent DeserializeSapSizingRecommendationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + SapEnvironmentType environment = default; + SapProductType sapProduct = default; + SapDeploymentType deploymentType = default; + long saps = default; + long dbMemory = default; + SapDatabaseType databaseType = default; + SapDatabaseScaleMethod? dbScaleMethod = default; + SapHighAvailabilityType? highAvailabilityType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("environment"u8)) + { + environment = new SapEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sapProduct"u8)) + { + sapProduct = new SapProductType(property.Value.GetString()); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("saps"u8)) + { + saps = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("dbMemory"u8)) + { + dbMemory = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("dbScaleMethod"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbScaleMethod = new SapDatabaseScaleMethod(property.Value.GetString()); + continue; + } + if (property.NameEquals("highAvailabilityType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilityType = new SapHighAvailabilityType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapSizingRecommendationContent( + appLocation, + environment, + sapProduct, + deploymentType, + saps, + dbMemory, + databaseType, + dbScaleMethod, + highAvailabilityType, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationContent)} does not support writing '{options.Format}' format."); + } + } + + SapSizingRecommendationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapSizingRecommendationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.cs new file mode 100644 index 000000000000..a0dd7fb0d49f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Sizing Recommendation request. + public partial class SapSizingRecommendationContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The SAP Application Performance Standard measurement. + /// The database memory configuration. + /// The database type. + /// is null. + public SapSizingRecommendationContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDeploymentType deploymentType, long saps, long dbMemory, SapDatabaseType databaseType) + { + Argument.AssertNotNull(appLocation, nameof(appLocation)); + + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DeploymentType = deploymentType; + Saps = saps; + DbMemory = dbMemory; + DatabaseType = databaseType; + } + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The SAP Application Performance Standard measurement. + /// The database memory configuration. + /// The database type. + /// The DB scale method. + /// The high availability type. + /// Keeps track of any properties unknown to the library. + internal SapSizingRecommendationContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDeploymentType deploymentType, long saps, long dbMemory, SapDatabaseType databaseType, SapDatabaseScaleMethod? dbScaleMethod, SapHighAvailabilityType? highAvailabilityType, IDictionary serializedAdditionalRawData) + { + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DeploymentType = deploymentType; + Saps = saps; + DbMemory = dbMemory; + DatabaseType = databaseType; + DbScaleMethod = dbScaleMethod; + HighAvailabilityType = highAvailabilityType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapSizingRecommendationContent() + { + } + + /// The geo-location where the resource is to be created. + public string AppLocation { get; } + /// Defines the environment type - Production/Non Production. + public SapEnvironmentType Environment { get; } + /// Defines the SAP Product type. + public SapProductType SapProduct { get; } + /// The deployment type. Eg: SingleServer/ThreeTier. + public SapDeploymentType DeploymentType { get; } + /// The SAP Application Performance Standard measurement. + public long Saps { get; } + /// The database memory configuration. + public long DbMemory { get; } + /// The database type. + public SapDatabaseType DatabaseType { get; } + /// The DB scale method. + public SapDatabaseScaleMethod? DbScaleMethod { get; set; } + /// The high availability type. + public SapHighAvailabilityType? HighAvailabilityType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.Serialization.cs new file mode 100644 index 000000000000..9a8ce8372fad --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownSapSizingRecommendationResult))] + public partial class SapSizingRecommendationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("deploymentType"u8); + writer.WriteStringValue(DeploymentType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapSizingRecommendationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSizingRecommendationResult(document.RootElement, options); + } + + internal static SapSizingRecommendationResult DeserializeSapSizingRecommendationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("deploymentType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "SingleServer": return SingleServerRecommendationResult.DeserializeSingleServerRecommendationResult(element, options); + case "ThreeTier": return ThreeTierRecommendationResult.DeserializeThreeTierRecommendationResult(element, options); + } + } + return UnknownSapSizingRecommendationResult.DeserializeUnknownSapSizingRecommendationResult(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support writing '{options.Format}' format."); + } + } + + SapSizingRecommendationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapSizingRecommendationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.cs new file mode 100644 index 000000000000..82bef0761e1c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// The SAP sizing recommendation result. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class SapSizingRecommendationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected SapSizingRecommendationResult() + { + } + + /// Initializes a new instance of . + /// The deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + internal SapSizingRecommendationResult(SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData) + { + DeploymentType = deploymentType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The deployment type. Eg: SingleServer/ThreeTier. + internal SapDeploymentType DeploymentType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSoftwareInstallationType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSoftwareInstallationType.cs new file mode 100644 index 000000000000..e6f61a20b863 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSoftwareInstallationType.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.SapVirtualInstances.Models +{ + /// The SAP software installation Type. + internal readonly partial struct SapSoftwareInstallationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapSoftwareInstallationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServiceInitiatedValue = "ServiceInitiated"; + private const string SAPInstallWithoutOSConfigValue = "SAPInstallWithoutOSConfig"; + private const string ExternalValue = "External"; + + /// SAP Install managed by service. + public static SapSoftwareInstallationType ServiceInitiated { get; } = new SapSoftwareInstallationType(ServiceInitiatedValue); + /// SAP Install without OS Config. + public static SapSoftwareInstallationType SAPInstallWithoutOSConfig { get; } = new SapSoftwareInstallationType(SAPInstallWithoutOSConfigValue); + /// External software installation type. + public static SapSoftwareInstallationType External { get; } = new SapSoftwareInstallationType(ExternalValue); + /// Determines if two values are the same. + public static bool operator ==(SapSoftwareInstallationType left, SapSoftwareInstallationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapSoftwareInstallationType left, SapSoftwareInstallationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapSoftwareInstallationType(string value) => new SapSoftwareInstallationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapSoftwareInstallationType other && Equals(other); + /// + public bool Equals(SapSoftwareInstallationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.Serialization.cs new file mode 100644 index 000000000000..2088cafa10dc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapSupportedResourceSkusResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedResourceSkusResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(SupportedSkus)) + { + writer.WritePropertyName("supportedSkus"u8); + writer.WriteStartArray(); + foreach (var item in SupportedSkus) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapSupportedResourceSkusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedResourceSkusResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSupportedResourceSkusResult(document.RootElement, options); + } + + internal static SapSupportedResourceSkusResult DeserializeSapSupportedResourceSkusResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList supportedSkus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("supportedSkus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapSupportedSku.DeserializeSapSupportedSku(item, options)); + } + supportedSkus = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapSupportedResourceSkusResult(supportedSkus ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSupportedResourceSkusResult)} does not support writing '{options.Format}' format."); + } + } + + SapSupportedResourceSkusResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapSupportedResourceSkusResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSupportedResourceSkusResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.cs new file mode 100644 index 000000000000..6eafd832c894 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The list of supported SKUs for different resources which are part of SAP deployment. + public partial class SapSupportedResourceSkusResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapSupportedResourceSkusResult() + { + SupportedSkus = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets the list of SAP supported SKUs. + /// Keeps track of any properties unknown to the library. + internal SapSupportedResourceSkusResult(IReadOnlyList supportedSkus, IDictionary serializedAdditionalRawData) + { + SupportedSkus = supportedSkus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the list of SAP supported SKUs. + public IReadOnlyList SupportedSkus { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.Serialization.cs new file mode 100644 index 000000000000..aa304c84d4ba --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapSupportedSku : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedSku)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(VmSku)) + { + writer.WritePropertyName("vmSku"u8); + writer.WriteStringValue(VmSku); + } + if (Optional.IsDefined(IsAppServerCertified)) + { + writer.WritePropertyName("isAppServerCertified"u8); + writer.WriteBooleanValue(IsAppServerCertified.Value); + } + if (Optional.IsDefined(IsDatabaseCertified)) + { + writer.WritePropertyName("isDatabaseCertified"u8); + writer.WriteBooleanValue(IsDatabaseCertified.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapSupportedSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedSku)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSupportedSku(document.RootElement, options); + } + + internal static SapSupportedSku DeserializeSapSupportedSku(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmSku = default; + bool? isAppServerCertified = default; + bool? isDatabaseCertified = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmSku"u8)) + { + vmSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAppServerCertified"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAppServerCertified = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isDatabaseCertified"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDatabaseCertified = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapSupportedSku(vmSku, isAppServerCertified, isDatabaseCertified, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSupportedSku)} does not support writing '{options.Format}' format."); + } + } + + SapSupportedSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapSupportedSku(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSupportedSku)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.cs new file mode 100644 index 000000000000..ab4e16fd5ea2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP supported SKU. + public partial class SapSupportedSku + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapSupportedSku() + { + } + + /// Initializes a new instance of . + /// The VM Sku. + /// True if the Sku is certified for App server in the SAP system. + /// True if the Sku is certified for Database server in the SAP system. + /// Keeps track of any properties unknown to the library. + internal SapSupportedSku(string vmSku, bool? isAppServerCertified, bool? isDatabaseCertified, IDictionary serializedAdditionalRawData) + { + VmSku = vmSku; + IsAppServerCertified = isAppServerCertified; + IsDatabaseCertified = isDatabaseCertified; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The VM Sku. + public string VmSku { get; } + /// True if the Sku is certified for App server in the SAP system. + public bool? IsAppServerCertified { get; } + /// True if the Sku is certified for Database server in the SAP system. + public bool? IsDatabaseCertified { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.Serialization.cs new file mode 100644 index 000000000000..11a19d79b0ea --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.Serialization.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapSupportedSkusContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedSkusContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + writer.WritePropertyName("environment"u8); + writer.WriteStringValue(Environment.ToString()); + writer.WritePropertyName("sapProduct"u8); + writer.WriteStringValue(SapProduct.ToString()); + writer.WritePropertyName("deploymentType"u8); + writer.WriteStringValue(DeploymentType.ToString()); + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.ToString()); + if (Optional.IsDefined(HighAvailabilityType)) + { + writer.WritePropertyName("highAvailabilityType"u8); + writer.WriteStringValue(HighAvailabilityType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapSupportedSkusContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedSkusContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSupportedSkusContent(document.RootElement, options); + } + + internal static SapSupportedSkusContent DeserializeSapSupportedSkusContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + SapEnvironmentType environment = default; + SapProductType sapProduct = default; + SapDeploymentType deploymentType = default; + SapDatabaseType databaseType = default; + SapHighAvailabilityType? highAvailabilityType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("environment"u8)) + { + environment = new SapEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sapProduct"u8)) + { + sapProduct = new SapProductType(property.Value.GetString()); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("highAvailabilityType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilityType = new SapHighAvailabilityType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapSupportedSkusContent( + appLocation, + environment, + sapProduct, + deploymentType, + databaseType, + highAvailabilityType, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSupportedSkusContent)} does not support writing '{options.Format}' format."); + } + } + + SapSupportedSkusContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapSupportedSkusContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSupportedSkusContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.cs new file mode 100644 index 000000000000..9ff9a4a9fe75 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP request to get list of supported SKUs. + public partial class SapSupportedSkusContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The database type. Eg: HANA, DB2, etc. + /// is null. + public SapSupportedSkusContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDeploymentType deploymentType, SapDatabaseType databaseType) + { + Argument.AssertNotNull(appLocation, nameof(appLocation)); + + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DeploymentType = deploymentType; + DatabaseType = databaseType; + } + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The database type. Eg: HANA, DB2, etc. + /// The high availability type. + /// Keeps track of any properties unknown to the library. + internal SapSupportedSkusContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDeploymentType deploymentType, SapDatabaseType databaseType, SapHighAvailabilityType? highAvailabilityType, IDictionary serializedAdditionalRawData) + { + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DeploymentType = deploymentType; + DatabaseType = databaseType; + HighAvailabilityType = highAvailabilityType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapSupportedSkusContent() + { + } + + /// The geo-location where the resource is to be created. + public string AppLocation { get; } + /// Defines the environment type - Production/Non Production. + public SapEnvironmentType Environment { get; } + /// Defines the SAP Product type. + public SapProductType SapProduct { get; } + /// The deployment type. Eg: SingleServer/ThreeTier. + public SapDeploymentType DeploymentType { get; } + /// The database type. Eg: HANA, DB2, etc. + public SapDatabaseType DatabaseType { get; } + /// The high availability type. + public SapHighAvailabilityType? HighAvailabilityType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.Serialization.cs new file mode 100644 index 000000000000..ace37698b770 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SapVirtualInstanceError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceError)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapVirtualInstanceError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapVirtualInstanceError(document.RootElement, options); + } + + internal static SapVirtualInstanceError DeserializeSapVirtualInstanceError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ErrorInformation properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ErrorInformation.DeserializeErrorInformation(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapVirtualInstanceError(properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceError)} does not support writing '{options.Format}' format."); + } + } + + SapVirtualInstanceError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapVirtualInstanceError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.cs new file mode 100644 index 000000000000..7ee793a33452 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// An error response from the Virtual Instance for SAP Workload service. + internal partial class SapVirtualInstanceError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapVirtualInstanceError() + { + } + + /// Initializes a new instance of . + /// The Virtual Instance for SAP error body. + /// Keeps track of any properties unknown to the library. + internal SapVirtualInstanceError(ErrorInformation properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Virtual Instance for SAP error body. + public ErrorInformation Properties { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.Serialization.cs new file mode 100644 index 000000000000..79e0755875aa --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapVirtualInstancePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstancePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapVirtualInstancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstancePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapVirtualInstancePatch(document.RootElement, options); + } + + internal static SapVirtualInstancePatch DeserializeSapVirtualInstancePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + SAPVirtualInstanceIdentity identity = default; + UpdateSapVirtualInstanceProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = SAPVirtualInstanceIdentity.DeserializeSAPVirtualInstanceIdentity(property.Value, options); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = UpdateSapVirtualInstanceProperties.DeserializeUpdateSapVirtualInstanceProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapVirtualInstancePatch(tags ?? new ChangeTrackingDictionary(), identity, properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapVirtualInstancePatch)} does not support writing '{options.Format}' format."); + } + } + + SapVirtualInstancePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapVirtualInstancePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapVirtualInstancePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.cs new file mode 100644 index 000000000000..d38c79714ba2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the request body for updating Virtual Instance for SAP. + public partial class SapVirtualInstancePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapVirtualInstancePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Gets or sets the Resource tags. + /// Managed service identity (user assigned identities). + /// The update properties. + /// Keeps track of any properties unknown to the library. + internal SapVirtualInstancePatch(IDictionary tags, SAPVirtualInstanceIdentity identity, UpdateSapVirtualInstanceProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Identity = identity; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the Resource tags. + public IDictionary Tags { get; } + /// Managed service identity (user assigned identities). + public SAPVirtualInstanceIdentity Identity { get; set; } + /// The update properties. + internal UpdateSapVirtualInstanceProperties Properties { get; set; } + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + public ManagedResourcesNetworkAccessType? UpdateSapVirtualInstanceManagedResourcesNetworkAccessType + { + get => Properties is null ? default : Properties.ManagedResourcesNetworkAccessType; + set + { + if (Properties is null) + Properties = new UpdateSapVirtualInstanceProperties(); + Properties.ManagedResourcesNetworkAccessType = value; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.Serialization.cs new file mode 100644 index 000000000000..d1d18507916f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.Serialization.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapVirtualInstanceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("environment"u8); + writer.WriteStringValue(Environment.ToString()); + writer.WritePropertyName("sapProduct"u8); + writer.WriteStringValue(SapProduct.ToString()); + if (Optional.IsDefined(ManagedResourcesNetworkAccessType)) + { + writer.WritePropertyName("managedResourcesNetworkAccessType"u8); + writer.WriteStringValue(ManagedResourcesNetworkAccessType.Value.ToString()); + } + writer.WritePropertyName("configuration"u8); + writer.WriteObjectValue(Configuration, options); + if (Optional.IsDefined(ManagedResourceGroupConfiguration)) + { + writer.WritePropertyName("managedResourceGroupConfiguration"u8); + writer.WriteObjectValue(ManagedResourceGroupConfiguration, options); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteObjectValue(Errors, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapVirtualInstanceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapVirtualInstanceProperties(document.RootElement, options); + } + + internal static SapVirtualInstanceProperties DeserializeSapVirtualInstanceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapEnvironmentType environment = default; + SapProductType sapProduct = default; + ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType = default; + SapConfiguration configuration = default; + ManagedRGConfiguration managedResourceGroupConfiguration = default; + SapVirtualInstanceStatus? status = default; + SapHealthState? health = default; + SapVirtualInstanceState? state = default; + SapVirtualInstanceProvisioningState? provisioningState = default; + SapVirtualInstanceError errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("environment"u8)) + { + environment = new SapEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sapProduct"u8)) + { + sapProduct = new SapProductType(property.Value.GetString()); + continue; + } + if (property.NameEquals("managedResourcesNetworkAccessType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managedResourcesNetworkAccessType = new ManagedResourcesNetworkAccessType(property.Value.GetString()); + continue; + } + if (property.NameEquals("configuration"u8)) + { + configuration = SapConfiguration.DeserializeSapConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("managedResourceGroupConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managedResourceGroupConfiguration = ManagedRGConfiguration.DeserializeManagedRGConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SapVirtualInstanceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new SapVirtualInstanceState(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new SapVirtualInstanceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errors = SapVirtualInstanceError.DeserializeSapVirtualInstanceError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapVirtualInstanceProperties( + environment, + sapProduct, + managedResourcesNetworkAccessType, + configuration, + managedResourceGroupConfiguration, + status, + health, + state, + provisioningState, + errors, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceProperties)} does not support writing '{options.Format}' format."); + } + } + + SapVirtualInstanceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapVirtualInstanceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.cs new file mode 100644 index 000000000000..cd9723a6f3a6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the Virtual Instance for SAP solutions resource properties. + public partial class SapVirtualInstanceProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// + /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// is null. + public SapVirtualInstanceProperties(SapEnvironmentType environment, SapProductType sapProduct, SapConfiguration configuration) + { + Argument.AssertNotNull(configuration, nameof(configuration)); + + Environment = environment; + SapProduct = sapProduct; + Configuration = configuration; + } + + /// Initializes a new instance of . + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + /// + /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Managed resource group configuration. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the Virtual Instance for SAP state. + /// Defines the provisioning states. + /// Indicates any errors on the Virtual Instance for SAP solutions resource. + /// Keeps track of any properties unknown to the library. + internal SapVirtualInstanceProperties(SapEnvironmentType environment, SapProductType sapProduct, ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType, SapConfiguration configuration, ManagedRGConfiguration managedResourceGroupConfiguration, SapVirtualInstanceStatus? status, SapHealthState? health, SapVirtualInstanceState? state, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors, IDictionary serializedAdditionalRawData) + { + Environment = environment; + SapProduct = sapProduct; + ManagedResourcesNetworkAccessType = managedResourcesNetworkAccessType; + Configuration = configuration; + ManagedResourceGroupConfiguration = managedResourceGroupConfiguration; + Status = status; + Health = health; + State = state; + ProvisioningState = provisioningState; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapVirtualInstanceProperties() + { + } + + /// Defines the environment type - Production/Non Production. + public SapEnvironmentType Environment { get; set; } + /// Defines the SAP Product type. + public SapProductType SapProduct { get; set; } + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + public ManagedResourcesNetworkAccessType? ManagedResourcesNetworkAccessType { get; set; } + /// + /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public SapConfiguration Configuration { get; set; } + /// Managed resource group configuration. + internal ManagedRGConfiguration ManagedResourceGroupConfiguration { get; set; } + /// Managed resource group name. + public string ManagedResourceGroupName + { + get => ManagedResourceGroupConfiguration is null ? default : ManagedResourceGroupConfiguration.Name; + set + { + if (ManagedResourceGroupConfiguration is null) + ManagedResourceGroupConfiguration = new ManagedRGConfiguration(); + ManagedResourceGroupConfiguration.Name = value; + } + } + + /// Defines the SAP Instance status. + public SapVirtualInstanceStatus? Status { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + /// Defines the Virtual Instance for SAP state. + public SapVirtualInstanceState? State { get; } + /// Defines the provisioning states. + public SapVirtualInstanceProvisioningState? ProvisioningState { get; } + /// Indicates any errors on the Virtual Instance for SAP solutions resource. + internal SapVirtualInstanceError Errors { get; } + /// The Virtual Instance for SAP error body. + public ErrorInformation ErrorsProperties + { + get => Errors?.Properties; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProvisioningState.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProvisioningState.cs new file mode 100644 index 000000000000..2c1b19b21645 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProvisioningState.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.SapVirtualInstances.Models +{ + /// Defines the provisioning states. + public readonly partial struct SapVirtualInstanceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapVirtualInstanceProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string UpdatingValue = "Updating"; + private const string CreatingValue = "Creating"; + private const string FailedValue = "Failed"; + private const string DeletingValue = "Deleting"; + private const string CanceledValue = "Canceled"; + + /// ACSS succeeded provisioning state. + public static SapVirtualInstanceProvisioningState Succeeded { get; } = new SapVirtualInstanceProvisioningState(SucceededValue); + /// ACSS updating provisioning state. + public static SapVirtualInstanceProvisioningState Updating { get; } = new SapVirtualInstanceProvisioningState(UpdatingValue); + /// ACSS Creating provisioning state. + public static SapVirtualInstanceProvisioningState Creating { get; } = new SapVirtualInstanceProvisioningState(CreatingValue); + /// ACSS Failed provisioning state. + public static SapVirtualInstanceProvisioningState Failed { get; } = new SapVirtualInstanceProvisioningState(FailedValue); + /// ACSS Deleting provisioning state. + public static SapVirtualInstanceProvisioningState Deleting { get; } = new SapVirtualInstanceProvisioningState(DeletingValue); + /// ACSS Canceled provisioning state. + public static SapVirtualInstanceProvisioningState Canceled { get; } = new SapVirtualInstanceProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(SapVirtualInstanceProvisioningState left, SapVirtualInstanceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapVirtualInstanceProvisioningState left, SapVirtualInstanceProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapVirtualInstanceProvisioningState(string value) => new SapVirtualInstanceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapVirtualInstanceProvisioningState other && Equals(other); + /// + public bool Equals(SapVirtualInstanceProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceState.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceState.cs new file mode 100644 index 000000000000..b2aa043b9ae6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceState.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the Virtual Instance for SAP state. + public readonly partial struct SapVirtualInstanceState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapVirtualInstanceState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InfrastructureDeploymentPendingValue = "InfrastructureDeploymentPending"; + private const string InfrastructureDeploymentInProgressValue = "InfrastructureDeploymentInProgress"; + private const string InfrastructureDeploymentFailedValue = "InfrastructureDeploymentFailed"; + private const string SoftwareInstallationPendingValue = "SoftwareInstallationPending"; + private const string SoftwareInstallationInProgressValue = "SoftwareInstallationInProgress"; + private const string SoftwareInstallationFailedValue = "SoftwareInstallationFailed"; + private const string SoftwareDetectionInProgressValue = "SoftwareDetectionInProgress"; + private const string SoftwareDetectionFailedValue = "SoftwareDetectionFailed"; + private const string DiscoveryPendingValue = "DiscoveryPending"; + private const string DiscoveryInProgressValue = "DiscoveryInProgress"; + private const string DiscoveryFailedValue = "DiscoveryFailed"; + private const string RegistrationCompleteValue = "RegistrationComplete"; + private const string ACSSInstallationBlockedValue = "ACSSInstallationBlocked"; + + /// Infrastructure is not yet deployed. + public static SapVirtualInstanceState InfrastructureDeploymentPending { get; } = new SapVirtualInstanceState(InfrastructureDeploymentPendingValue); + /// Infrastructure deployment is in progress. + public static SapVirtualInstanceState InfrastructureDeploymentInProgress { get; } = new SapVirtualInstanceState(InfrastructureDeploymentInProgressValue); + /// Infrastructure deployment has failed. + public static SapVirtualInstanceState InfrastructureDeploymentFailed { get; } = new SapVirtualInstanceState(InfrastructureDeploymentFailedValue); + /// Infrastructure deployment is successful. Software installation is pending. + public static SapVirtualInstanceState SoftwareInstallationPending { get; } = new SapVirtualInstanceState(SoftwareInstallationPendingValue); + /// Software installation is in progress. + public static SapVirtualInstanceState SoftwareInstallationInProgress { get; } = new SapVirtualInstanceState(SoftwareInstallationInProgressValue); + /// Software installation failed. + public static SapVirtualInstanceState SoftwareInstallationFailed { get; } = new SapVirtualInstanceState(SoftwareInstallationFailedValue); + /// Software detection is in progress. + public static SapVirtualInstanceState SoftwareDetectionInProgress { get; } = new SapVirtualInstanceState(SoftwareDetectionInProgressValue); + /// Software detection failed. + public static SapVirtualInstanceState SoftwareDetectionFailed { get; } = new SapVirtualInstanceState(SoftwareDetectionFailedValue); + /// Registration has not started. + public static SapVirtualInstanceState DiscoveryPending { get; } = new SapVirtualInstanceState(DiscoveryPendingValue); + /// Registration is in progress. + public static SapVirtualInstanceState DiscoveryInProgress { get; } = new SapVirtualInstanceState(DiscoveryInProgressValue); + /// Registration has failed. + public static SapVirtualInstanceState DiscoveryFailed { get; } = new SapVirtualInstanceState(DiscoveryFailedValue); + /// Registration is complete. + public static SapVirtualInstanceState RegistrationComplete { get; } = new SapVirtualInstanceState(RegistrationCompleteValue); + /// ACSS installation cannot proceed. + public static SapVirtualInstanceState ACSSInstallationBlocked { get; } = new SapVirtualInstanceState(ACSSInstallationBlockedValue); + /// Determines if two values are the same. + public static bool operator ==(SapVirtualInstanceState left, SapVirtualInstanceState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapVirtualInstanceState left, SapVirtualInstanceState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapVirtualInstanceState(string value) => new SapVirtualInstanceState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapVirtualInstanceState other && Equals(other); + /// + public bool Equals(SapVirtualInstanceState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceStatus.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceStatus.cs new file mode 100644 index 000000000000..4ac8e7edc524 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceStatus.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Instance status. + public readonly partial struct SapVirtualInstanceStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapVirtualInstanceStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StartingValue = "Starting"; + private const string RunningValue = "Running"; + private const string StoppingValue = "Stopping"; + private const string OfflineValue = "Offline"; + private const string PartiallyRunningValue = "PartiallyRunning"; + private const string UnavailableValue = "Unavailable"; + private const string SoftShutdownValue = "SoftShutdown"; + + /// SAP system is getting started. + public static SapVirtualInstanceStatus Starting { get; } = new SapVirtualInstanceStatus(StartingValue); + /// SAP system is running. + public static SapVirtualInstanceStatus Running { get; } = new SapVirtualInstanceStatus(RunningValue); + /// SAP system is being stopped. + public static SapVirtualInstanceStatus Stopping { get; } = new SapVirtualInstanceStatus(StoppingValue); + /// SAP system is offline. + public static SapVirtualInstanceStatus Offline { get; } = new SapVirtualInstanceStatus(OfflineValue); + /// SAP system is partially running. + public static SapVirtualInstanceStatus PartiallyRunning { get; } = new SapVirtualInstanceStatus(PartiallyRunningValue); + /// SAP system status is unavailable. + public static SapVirtualInstanceStatus Unavailable { get; } = new SapVirtualInstanceStatus(UnavailableValue); + /// Soft shutdown of SAP system is initiated. + public static SapVirtualInstanceStatus SoftShutdown { get; } = new SapVirtualInstanceStatus(SoftShutdownValue); + /// Determines if two values are the same. + public static bool operator ==(SapVirtualInstanceStatus left, SapVirtualInstanceStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapVirtualInstanceStatus left, SapVirtualInstanceStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapVirtualInstanceStatus(string value) => new SapVirtualInstanceStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapVirtualInstanceStatus other && Equals(other); + /// + public bool Equals(SapVirtualInstanceStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..5602fc145334 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ServiceInitiatedSoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceInitiatedSoftwareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("bomUrl"u8); + writer.WriteStringValue(BomUri); + writer.WritePropertyName("softwareVersion"u8); + writer.WriteStringValue(SoftwareVersion); + writer.WritePropertyName("sapBitsStorageAccountId"u8); + writer.WriteStringValue(SapBitsStorageAccountId); + writer.WritePropertyName("sapFqdn"u8); + writer.WriteStringValue(SapFqdn); + writer.WritePropertyName("sshPrivateKey"u8); + writer.WriteStringValue(SshPrivateKey); + if (Optional.IsDefined(HighAvailabilitySoftwareConfiguration)) + { + writer.WritePropertyName("highAvailabilitySoftwareConfiguration"u8); + writer.WriteObjectValue(HighAvailabilitySoftwareConfiguration, options); + } + } + + ServiceInitiatedSoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceInitiatedSoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceInitiatedSoftwareConfiguration(document.RootElement, options); + } + + internal static ServiceInitiatedSoftwareConfiguration DeserializeServiceInitiatedSoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string bomUrl = default; + string softwareVersion = default; + string sapBitsStorageAccountId = default; + string sapFqdn = default; + string sshPrivateKey = default; + HighAvailabilitySoftwareConfiguration highAvailabilitySoftwareConfiguration = default; + SapSoftwareInstallationType softwareInstallationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("bomUrl"u8)) + { + bomUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("softwareVersion"u8)) + { + softwareVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("sapBitsStorageAccountId"u8)) + { + sapBitsStorageAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sapFqdn"u8)) + { + sapFqdn = property.Value.GetString(); + continue; + } + if (property.NameEquals("sshPrivateKey"u8)) + { + sshPrivateKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("highAvailabilitySoftwareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilitySoftwareConfiguration = HighAvailabilitySoftwareConfiguration.DeserializeHighAvailabilitySoftwareConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("softwareInstallationType"u8)) + { + softwareInstallationType = new SapSoftwareInstallationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceInitiatedSoftwareConfiguration( + softwareInstallationType, + serializedAdditionalRawData, + bomUrl, + softwareVersion, + sapBitsStorageAccountId, + sapFqdn, + sshPrivateKey, + highAvailabilitySoftwareConfiguration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ServiceInitiatedSoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ServiceInitiatedSoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeServiceInitiatedSoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceInitiatedSoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.cs new file mode 100644 index 000000000000..74baf107de2a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Software configuration Input when the software is to be installed by service. + public partial class ServiceInitiatedSoftwareConfiguration : SoftwareConfiguration + { + /// Initializes a new instance of . + /// The URL to the SAP Build of Materials(BOM) file. + /// The software version to install. + /// The SAP bits storage account id. + /// The FQDN to set for the SAP system during install. + /// The SSH private key. + /// , , , or is null. + public ServiceInitiatedSoftwareConfiguration(string bomUri, string softwareVersion, string sapBitsStorageAccountId, string sapFqdn, string sshPrivateKey) + { + Argument.AssertNotNull(bomUri, nameof(bomUri)); + Argument.AssertNotNull(softwareVersion, nameof(softwareVersion)); + Argument.AssertNotNull(sapBitsStorageAccountId, nameof(sapBitsStorageAccountId)); + Argument.AssertNotNull(sapFqdn, nameof(sapFqdn)); + Argument.AssertNotNull(sshPrivateKey, nameof(sshPrivateKey)); + + BomUri = bomUri; + SoftwareVersion = softwareVersion; + SapBitsStorageAccountId = sapBitsStorageAccountId; + SapFqdn = sapFqdn; + SshPrivateKey = sshPrivateKey; + SoftwareInstallationType = SapSoftwareInstallationType.ServiceInitiated; + } + + /// Initializes a new instance of . + /// The SAP software installation type. + /// Keeps track of any properties unknown to the library. + /// The URL to the SAP Build of Materials(BOM) file. + /// The software version to install. + /// The SAP bits storage account id. + /// The FQDN to set for the SAP system during install. + /// The SSH private key. + /// Gets or sets the HA software configuration. + internal ServiceInitiatedSoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, IDictionary serializedAdditionalRawData, string bomUri, string softwareVersion, string sapBitsStorageAccountId, string sapFqdn, string sshPrivateKey, HighAvailabilitySoftwareConfiguration highAvailabilitySoftwareConfiguration) : base(softwareInstallationType, serializedAdditionalRawData) + { + BomUri = bomUri; + SoftwareVersion = softwareVersion; + SapBitsStorageAccountId = sapBitsStorageAccountId; + SapFqdn = sapFqdn; + SshPrivateKey = sshPrivateKey; + HighAvailabilitySoftwareConfiguration = highAvailabilitySoftwareConfiguration; + SoftwareInstallationType = softwareInstallationType; + } + + /// Initializes a new instance of for deserialization. + internal ServiceInitiatedSoftwareConfiguration() + { + } + + /// The URL to the SAP Build of Materials(BOM) file. + public string BomUri { get; set; } + /// The software version to install. + public string SoftwareVersion { get; set; } + /// The SAP bits storage account id. + public string SapBitsStorageAccountId { get; set; } + /// The FQDN to set for the SAP system during install. + public string SapFqdn { get; set; } + /// The SSH private key. + public string SshPrivateKey { get; set; } + /// Gets or sets the HA software configuration. + public HighAvailabilitySoftwareConfiguration HighAvailabilitySoftwareConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.Serialization.cs new file mode 100644 index 000000000000..9fe70e7ccbde --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SharedStorageResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SharedStorageResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SharedStorageAccountName)) + { + writer.WritePropertyName("sharedStorageAccountName"u8); + writer.WriteStringValue(SharedStorageAccountName); + } + if (Optional.IsDefined(SharedStorageAccountPrivateEndPointName)) + { + writer.WritePropertyName("sharedStorageAccountPrivateEndPointName"u8); + writer.WriteStringValue(SharedStorageAccountPrivateEndPointName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SharedStorageResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SharedStorageResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSharedStorageResourceNames(document.RootElement, options); + } + + internal static SharedStorageResourceNames DeserializeSharedStorageResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string sharedStorageAccountName = default; + string sharedStorageAccountPrivateEndPointName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sharedStorageAccountName"u8)) + { + sharedStorageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sharedStorageAccountPrivateEndPointName"u8)) + { + sharedStorageAccountPrivateEndPointName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SharedStorageResourceNames(sharedStorageAccountName, sharedStorageAccountPrivateEndPointName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SharedStorageResourceNames)} does not support writing '{options.Format}' format."); + } + } + + SharedStorageResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSharedStorageResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SharedStorageResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.cs new file mode 100644 index 000000000000..a63616969347 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource names object for shared storage. + public partial class SharedStorageResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SharedStorageResourceNames() + { + } + + /// Initializes a new instance of . + /// The full name of the shared storage account. If it is not provided, it will be defaulted to {SID}nfs{guid of 15 chars}. + /// The full name of private end point for the shared storage account. If it is not provided, it will be defaulted to {storageAccountName}_pe. + /// Keeps track of any properties unknown to the library. + internal SharedStorageResourceNames(string sharedStorageAccountName, string sharedStorageAccountPrivateEndPointName, IDictionary serializedAdditionalRawData) + { + SharedStorageAccountName = sharedStorageAccountName; + SharedStorageAccountPrivateEndPointName = sharedStorageAccountPrivateEndPointName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The full name of the shared storage account. If it is not provided, it will be defaulted to {SID}nfs{guid of 15 chars}. + public string SharedStorageAccountName { get; set; } + /// The full name of private end point for the shared storage account. If it is not provided, it will be defaulted to {storageAccountName}_pe. + public string SharedStorageAccountPrivateEndPointName { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.Serialization.cs new file mode 100644 index 000000000000..85822bd9ffe8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.Serialization.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SingleServerConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(NetworkConfiguration)) + { + writer.WritePropertyName("networkConfiguration"u8); + writer.WriteObjectValue(NetworkConfiguration, options); + } + if (Optional.IsDefined(DatabaseType)) + { + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.Value.ToString()); + } + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + if (Optional.IsDefined(DbDiskConfiguration)) + { + writer.WritePropertyName("dbDiskConfiguration"u8); + writer.WriteObjectValue(DbDiskConfiguration, options); + } + if (Optional.IsDefined(CustomResourceNames)) + { + writer.WritePropertyName("customResourceNames"u8); + writer.WriteObjectValue(CustomResourceNames, options); + } + } + + SingleServerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleServerConfiguration(document.RootElement, options); + } + + internal static SingleServerConfiguration DeserializeSingleServerConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetworkConfiguration networkConfiguration = default; + SapDatabaseType? databaseType = default; + string subnetId = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; + DiskConfiguration dbDiskConfiguration = default; + SingleServerCustomResourceNames customResourceNames = default; + string appResourceGroup = default; + SapDeploymentType deploymentType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkConfiguration = NetworkConfiguration.DeserializeNetworkConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("dbDiskConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbDiskConfiguration = DiskConfiguration.DeserializeDiskConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("customResourceNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customResourceNames = SingleServerCustomResourceNames.DeserializeSingleServerCustomResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("appResourceGroup"u8)) + { + appResourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SingleServerConfiguration( + appResourceGroup, + deploymentType, + serializedAdditionalRawData, + networkConfiguration, + databaseType, + subnetId, + virtualMachineConfiguration, + dbDiskConfiguration, + customResourceNames); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleServerConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SingleServerConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSingleServerConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleServerConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.cs new file mode 100644 index 000000000000..0c9786b43b71 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the single server configuration. For prerequisites for creating the infrastructure, please see [here](https://go.microsoft.com/fwlink/?linkid=2212611&clcid=0x409). + public partial class SingleServerConfiguration : InfrastructureConfiguration + { + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// , or is null. + public SingleServerConfiguration(string appResourceGroup, string subnetId, VirtualMachineConfiguration virtualMachineConfiguration) : base(appResourceGroup) + { + Argument.AssertNotNull(appResourceGroup, nameof(appResourceGroup)); + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(virtualMachineConfiguration, nameof(virtualMachineConfiguration)); + + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + DeploymentType = SapDeploymentType.SingleServer; + } + + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The SAP deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + /// Network configuration for the server. + /// The database type. + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// Gets or sets the disk configuration. + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + internal SingleServerConfiguration(string appResourceGroup, SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData, NetworkConfiguration networkConfiguration, SapDatabaseType? databaseType, string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, DiskConfiguration dbDiskConfiguration, SingleServerCustomResourceNames customResourceNames) : base(appResourceGroup, deploymentType, serializedAdditionalRawData) + { + NetworkConfiguration = networkConfiguration; + DatabaseType = databaseType; + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + DbDiskConfiguration = dbDiskConfiguration; + CustomResourceNames = customResourceNames; + DeploymentType = deploymentType; + } + + /// Initializes a new instance of for deserialization. + internal SingleServerConfiguration() + { + } + + /// Network configuration for the server. + internal NetworkConfiguration NetworkConfiguration { get; set; } + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. + public bool? IsSecondaryIPEnabled + { + get => NetworkConfiguration is null ? default : NetworkConfiguration.IsSecondaryIPEnabled; + set + { + if (NetworkConfiguration is null) + NetworkConfiguration = new NetworkConfiguration(); + NetworkConfiguration.IsSecondaryIPEnabled = value; + } + } + + /// The database type. + public SapDatabaseType? DatabaseType { get; set; } + /// The subnet id. + public string SubnetId { get; set; } + /// Gets or sets the virtual machine configuration. + public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } + /// Gets or sets the disk configuration. + internal DiskConfiguration DbDiskConfiguration { get; set; } + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IDictionary DiskVolumeConfigurations + { + get + { + if (DbDiskConfiguration is null) + DbDiskConfiguration = new DiskConfiguration(); + return DbDiskConfiguration.DiskVolumeConfigurations; + } + } + + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public SingleServerCustomResourceNames CustomResourceNames { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.Serialization.cs new file mode 100644 index 000000000000..e7f92e3d834a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownSingleServerCustomResourceNames))] + public partial class SingleServerCustomResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("namingPatternType"u8); + writer.WriteStringValue(NamingPatternType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SingleServerCustomResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleServerCustomResourceNames(document.RootElement, options); + } + + internal static SingleServerCustomResourceNames DeserializeSingleServerCustomResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("namingPatternType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "FullResourceName": return SingleServerFullResourceNames.DeserializeSingleServerFullResourceNames(element, options); + } + } + return UnknownSingleServerCustomResourceNames.DeserializeUnknownSingleServerCustomResourceNames(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support writing '{options.Format}' format."); + } + } + + SingleServerCustomResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSingleServerCustomResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.cs new file mode 100644 index 000000000000..707269bbfa9c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// The resource-names input to specify custom names for underlying azure resources that are part of a single server SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class SingleServerCustomResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected SingleServerCustomResourceNames() + { + } + + /// Initializes a new instance of . + /// The naming pattern type. + /// Keeps track of any properties unknown to the library. + internal SingleServerCustomResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData) + { + NamingPatternType = namingPatternType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The naming pattern type. + internal NamingPatternType NamingPatternType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.Serialization.cs new file mode 100644 index 000000000000..35815e7c5de2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.Serialization.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SingleServerFullResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerFullResourceNames)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(VirtualMachine)) + { + writer.WritePropertyName("virtualMachine"u8); + writer.WriteObjectValue(VirtualMachine, options); + } + } + + SingleServerFullResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerFullResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleServerFullResourceNames(document.RootElement, options); + } + + internal static SingleServerFullResourceNames DeserializeSingleServerFullResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + VirtualMachineResourceNames virtualMachine = default; + NamingPatternType namingPatternType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachine"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualMachine = VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("namingPatternType"u8)) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SingleServerFullResourceNames(namingPatternType, serializedAdditionalRawData, virtualMachine); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleServerFullResourceNames)} does not support writing '{options.Format}' format."); + } + } + + SingleServerFullResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSingleServerFullResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleServerFullResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.cs new file mode 100644 index 000000000000..5d2c0d9d3cec --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource name object where the specified values will be full resource names of the corresponding resources in a single server SAP system. + public partial class SingleServerFullResourceNames : SingleServerCustomResourceNames + { + /// Initializes a new instance of . + public SingleServerFullResourceNames() + { + NamingPatternType = NamingPatternType.FullResourceName; + } + + /// Initializes a new instance of . + /// The naming pattern type. + /// Keeps track of any properties unknown to the library. + /// The resource names object for virtual machine and related resources. + internal SingleServerFullResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData, VirtualMachineResourceNames virtualMachine) : base(namingPatternType, serializedAdditionalRawData) + { + VirtualMachine = virtualMachine; + NamingPatternType = namingPatternType; + } + + /// The resource names object for virtual machine and related resources. + public VirtualMachineResourceNames VirtualMachine { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.Serialization.cs new file mode 100644 index 000000000000..ade592cc8c65 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.Serialization.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SingleServerRecommendationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerRecommendationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(VmSku)) + { + writer.WritePropertyName("vmSku"u8); + writer.WriteStringValue(VmSku); + } + } + + SingleServerRecommendationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerRecommendationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleServerRecommendationResult(document.RootElement, options); + } + + internal static SingleServerRecommendationResult DeserializeSingleServerRecommendationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmSku = default; + SapDeploymentType deploymentType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmSku"u8)) + { + vmSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SingleServerRecommendationResult(deploymentType, serializedAdditionalRawData, vmSku); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleServerRecommendationResult)} does not support writing '{options.Format}' format."); + } + } + + SingleServerRecommendationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSingleServerRecommendationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleServerRecommendationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.cs new file mode 100644 index 000000000000..8da9f7ba1dba --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The recommended configuration for a single server SAP system. + public partial class SingleServerRecommendationResult : SapSizingRecommendationResult + { + /// Initializes a new instance of . + internal SingleServerRecommendationResult() + { + DeploymentType = SapDeploymentType.SingleServer; + } + + /// Initializes a new instance of . + /// The deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + /// The recommended VM SKU for single server. + internal SingleServerRecommendationResult(SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData, string vmSku) : base(deploymentType, serializedAdditionalRawData) + { + VmSku = vmSku; + DeploymentType = deploymentType; + } + + /// The recommended VM SKU for single server. + public string VmSku { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.Serialization.cs new file mode 100644 index 000000000000..94e0443f4816 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SkipFileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SkipFileShareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + SkipFileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SkipFileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSkipFileShareConfiguration(document.RootElement, options); + } + + internal static SkipFileShareConfiguration DeserializeSkipFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FileShareConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurationType"u8)) + { + configurationType = new FileShareConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SkipFileShareConfiguration(configurationType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SkipFileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SkipFileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSkipFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SkipFileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.cs new file mode 100644 index 000000000000..0c117b45e74e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the file share configuration for scenarios where transport directory fileshare is not created or required. + public partial class SkipFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of . + public SkipFileShareConfiguration() + { + ConfigurationType = FileShareConfigurationType.Skip; + } + + /// Initializes a new instance of . + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + /// Keeps track of any properties unknown to the library. + internal SkipFileShareConfiguration(FileShareConfigurationType configurationType, IDictionary serializedAdditionalRawData) : base(configurationType, serializedAdditionalRawData) + { + ConfigurationType = configurationType; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..359d709161df --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.Serialization.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownSoftwareConfiguration))] + public partial class SoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("softwareInstallationType"u8); + writer.WriteStringValue(SoftwareInstallationType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSoftwareConfiguration(document.RootElement, options); + } + + internal static SoftwareConfiguration DeserializeSoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("softwareInstallationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "External": return ExternalInstallationSoftwareConfiguration.DeserializeExternalInstallationSoftwareConfiguration(element, options); + case "SAPInstallWithoutOSConfig": return SapInstallWithoutOSConfigSoftwareConfiguration.DeserializeSapInstallWithoutOSConfigSoftwareConfiguration(element, options); + case "ServiceInitiated": return ServiceInitiatedSoftwareConfiguration.DeserializeServiceInitiatedSoftwareConfiguration(element, options); + } + } + return UnknownSoftwareConfiguration.DeserializeUnknownSoftwareConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.cs new file mode 100644 index 000000000000..571c580ec4b4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// The SAP Software configuration Input. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class SoftwareConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected SoftwareConfiguration() + { + } + + /// Initializes a new instance of . + /// The SAP software installation type. + /// Keeps track of any properties unknown to the library. + internal SoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, IDictionary serializedAdditionalRawData) + { + SoftwareInstallationType = softwareInstallationType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The SAP software installation type. + internal SapSoftwareInstallationType SoftwareInstallationType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.Serialization.cs new file mode 100644 index 000000000000..a2a85ee227c7 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SshConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(PublicKeys)) + { + writer.WritePropertyName("publicKeys"u8); + writer.WriteStartArray(); + foreach (var item in PublicKeys) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SshConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSshConfiguration(document.RootElement, options); + } + + internal static SshConfiguration DeserializeSshConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList publicKeys = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publicKeys"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SshPublicKey.DeserializeSshPublicKey(item, options)); + } + publicKeys = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SshConfiguration(publicKeys ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SshConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SshConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSshConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SshConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.cs new file mode 100644 index 000000000000..316b88634fcc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// SSH configuration for Linux based VMs running on Azure. + internal partial class SshConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SshConfiguration() + { + PublicKeys = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of SSH public keys used to authenticate with linux based VMs. + /// Keeps track of any properties unknown to the library. + internal SshConfiguration(IList publicKeys, IDictionary serializedAdditionalRawData) + { + PublicKeys = publicKeys; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of SSH public keys used to authenticate with linux based VMs. + public IList PublicKeys { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.Serialization.cs new file mode 100644 index 000000000000..07a1e61003a1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SshKeyPair : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshKeyPair)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(PublicKey)) + { + writer.WritePropertyName("publicKey"u8); + writer.WriteStringValue(PublicKey); + } + if (Optional.IsDefined(PrivateKey)) + { + writer.WritePropertyName("privateKey"u8); + writer.WriteStringValue(PrivateKey); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SshKeyPair IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshKeyPair)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSshKeyPair(document.RootElement, options); + } + + internal static SshKeyPair DeserializeSshKeyPair(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string publicKey = default; + string privateKey = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publicKey"u8)) + { + publicKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateKey"u8)) + { + privateKey = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SshKeyPair(publicKey, privateKey, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SshKeyPair)} does not support writing '{options.Format}' format."); + } + } + + SshKeyPair IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSshKeyPair(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SshKeyPair)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.cs new file mode 100644 index 000000000000..f9d170196f73 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SSH Key-pair used to authenticate with the VM. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + public partial class SshKeyPair + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SshKeyPair() + { + } + + /// Initializes a new instance of . + /// SSH public key. + /// SSH private key. + /// Keeps track of any properties unknown to the library. + internal SshKeyPair(string publicKey, string privateKey, IDictionary serializedAdditionalRawData) + { + PublicKey = publicKey; + PrivateKey = privateKey; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// SSH public key. + public string PublicKey { get; set; } + /// SSH private key. + public string PrivateKey { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.Serialization.cs new file mode 100644 index 000000000000..a2c47d6036c0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SshPublicKey : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshPublicKey)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeyData)) + { + writer.WritePropertyName("keyData"u8); + writer.WriteStringValue(KeyData); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SshPublicKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshPublicKey)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSshPublicKey(document.RootElement, options); + } + + internal static SshPublicKey DeserializeSshPublicKey(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string keyData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyData"u8)) + { + keyData = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SshPublicKey(keyData, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SshPublicKey)} does not support writing '{options.Format}' format."); + } + } + + SshPublicKey IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSshPublicKey(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SshPublicKey)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.cs new file mode 100644 index 000000000000..f5eab58038c4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed. + public partial class SshPublicKey + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SshPublicKey() + { + } + + /// Initializes a new instance of . + /// SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + /// Keeps track of any properties unknown to the library. + internal SshPublicKey(string keyData, IDictionary serializedAdditionalRawData) + { + KeyData = keyData; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + public string KeyData { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.Serialization.cs new file mode 100644 index 000000000000..ebd9ea27d193 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class StartContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StartContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(StartVm)) + { + writer.WritePropertyName("startVm"u8); + writer.WriteBooleanValue(StartVm.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StartContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StartContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStartContent(document.RootElement, options); + } + + internal static StartContent DeserializeStartContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? startVm = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startVm"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startVm = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StartContent(startVm, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StartContent)} does not support writing '{options.Format}' format."); + } + } + + StartContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeStartContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StartContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.cs new file mode 100644 index 000000000000..c9b715489611 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Start SAP instance(s) request body. + public partial class StartContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StartContent() + { + } + + /// Initializes a new instance of . + /// The boolean value indicates whether to start the virtual machines before starting the SAP instances. + /// Keeps track of any properties unknown to the library. + internal StartContent(bool? startVm, IDictionary serializedAdditionalRawData) + { + StartVm = startVm; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The boolean value indicates whether to start the virtual machines before starting the SAP instances. + public bool? StartVm { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.Serialization.cs new file mode 100644 index 000000000000..b64cd3e2ee3c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class StopContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StopContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SoftStopTimeoutSeconds)) + { + writer.WritePropertyName("softStopTimeoutSeconds"u8); + writer.WriteNumberValue(SoftStopTimeoutSeconds.Value); + } + if (Optional.IsDefined(DeallocateVm)) + { + writer.WritePropertyName("deallocateVm"u8); + writer.WriteBooleanValue(DeallocateVm.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StopContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StopContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStopContent(document.RootElement, options); + } + + internal static StopContent DeserializeStopContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? softStopTimeoutSeconds = default; + bool? deallocateVm = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("softStopTimeoutSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softStopTimeoutSeconds = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("deallocateVm"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deallocateVm = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StopContent(softStopTimeoutSeconds, deallocateVm, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StopContent)} does not support writing '{options.Format}' format."); + } + } + + StopContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeStopContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StopContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.cs new file mode 100644 index 000000000000..19f256f99e5c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Stop SAP instance(s) request body. + public partial class StopContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StopContent() + { + } + + /// Initializes a new instance of . + /// This parameter defines how long (in seconds) the soft shutdown waits until the RFC/HTTP clients no longer consider the server for calls with load balancing. Value 0 means that the kernel does not wait, but goes directly into the next shutdown state, i.e. hard stop. + /// The boolean value indicates whether to Stop and deallocate the virtual machines along with the SAP instances. + /// Keeps track of any properties unknown to the library. + internal StopContent(long? softStopTimeoutSeconds, bool? deallocateVm, IDictionary serializedAdditionalRawData) + { + SoftStopTimeoutSeconds = softStopTimeoutSeconds; + DeallocateVm = deallocateVm; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// This parameter defines how long (in seconds) the soft shutdown waits until the RFC/HTTP clients no longer consider the server for calls with load balancing. Value 0 means that the kernel does not wait, but goes directly into the next shutdown state, i.e. hard stop. + public long? SoftStopTimeoutSeconds { get; set; } + /// The boolean value indicates whether to Stop and deallocate the virtual machines along with the SAP instances. + public bool? DeallocateVm { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.Serialization.cs new file mode 100644 index 000000000000..abf6b7f87a9d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class StorageConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(TransportFileShareConfiguration)) + { + writer.WritePropertyName("transportFileShareConfiguration"u8); + writer.WriteObjectValue(TransportFileShareConfiguration, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StorageConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStorageConfiguration(document.RootElement, options); + } + + internal static StorageConfiguration DeserializeStorageConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FileShareConfiguration transportFileShareConfiguration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("transportFileShareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + transportFileShareConfiguration = FileShareConfiguration.DeserializeFileShareConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StorageConfiguration(transportFileShareConfiguration, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StorageConfiguration)} does not support writing '{options.Format}' format."); + } + } + + StorageConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeStorageConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StorageConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.cs new file mode 100644 index 000000000000..faaba7453055 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the storage configuration. + internal partial class StorageConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StorageConfiguration() + { + } + + /// Initializes a new instance of . + /// + /// The properties of the transport directory attached to the VIS. The default for transportFileShareConfiguration is the createAndMount flow if storage configuration is missing. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Keeps track of any properties unknown to the library. + internal StorageConfiguration(FileShareConfiguration transportFileShareConfiguration, IDictionary serializedAdditionalRawData) + { + TransportFileShareConfiguration = transportFileShareConfiguration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The properties of the transport directory attached to the VIS. The default for transportFileShareConfiguration is the createAndMount flow if storage configuration is missing. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public FileShareConfiguration TransportFileShareConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.Serialization.cs new file mode 100644 index 000000000000..21e761756ca3 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.Serialization.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ThreeTierConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(NetworkConfiguration)) + { + writer.WritePropertyName("networkConfiguration"u8); + writer.WriteObjectValue(NetworkConfiguration, options); + } + writer.WritePropertyName("centralServer"u8); + writer.WriteObjectValue(CentralServer, options); + writer.WritePropertyName("applicationServer"u8); + writer.WriteObjectValue(ApplicationServer, options); + writer.WritePropertyName("databaseServer"u8); + writer.WriteObjectValue(DatabaseServer, options); + if (Optional.IsDefined(HighAvailabilityConfig)) + { + writer.WritePropertyName("highAvailabilityConfig"u8); + writer.WriteObjectValue(HighAvailabilityConfig, options); + } + if (Optional.IsDefined(StorageConfiguration)) + { + writer.WritePropertyName("storageConfiguration"u8); + writer.WriteObjectValue(StorageConfiguration, options); + } + if (Optional.IsDefined(CustomResourceNames)) + { + writer.WritePropertyName("customResourceNames"u8); + writer.WriteObjectValue(CustomResourceNames, options); + } + } + + ThreeTierConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThreeTierConfiguration(document.RootElement, options); + } + + internal static ThreeTierConfiguration DeserializeThreeTierConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetworkConfiguration networkConfiguration = default; + CentralServerConfiguration centralServer = default; + ApplicationServerConfiguration applicationServer = default; + DatabaseConfiguration databaseServer = default; + HighAvailabilityConfiguration highAvailabilityConfig = default; + StorageConfiguration storageConfiguration = default; + ThreeTierCustomResourceNames customResourceNames = default; + string appResourceGroup = default; + SapDeploymentType deploymentType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkConfiguration = NetworkConfiguration.DeserializeNetworkConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("centralServer"u8)) + { + centralServer = CentralServerConfiguration.DeserializeCentralServerConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("applicationServer"u8)) + { + applicationServer = ApplicationServerConfiguration.DeserializeApplicationServerConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("databaseServer"u8)) + { + databaseServer = DatabaseConfiguration.DeserializeDatabaseConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("highAvailabilityConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilityConfig = HighAvailabilityConfiguration.DeserializeHighAvailabilityConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("storageConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageConfiguration = StorageConfiguration.DeserializeStorageConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("customResourceNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customResourceNames = ThreeTierCustomResourceNames.DeserializeThreeTierCustomResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("appResourceGroup"u8)) + { + appResourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ThreeTierConfiguration( + appResourceGroup, + deploymentType, + serializedAdditionalRawData, + networkConfiguration, + centralServer, + applicationServer, + databaseServer, + highAvailabilityConfig, + storageConfiguration, + customResourceNames); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ThreeTierConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ThreeTierConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeThreeTierConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThreeTierConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.cs new file mode 100644 index 000000000000..dd9e9cc5eff0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the three tier SAP configuration. For prerequisites for creating the infrastructure, please see [here](https://go.microsoft.com/fwlink/?linkid=2212611&clcid=0x409). + public partial class ThreeTierConfiguration : InfrastructureConfiguration + { + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The central server configuration. + /// The application server configuration. + /// The database configuration. + /// , , or is null. + public ThreeTierConfiguration(string appResourceGroup, CentralServerConfiguration centralServer, ApplicationServerConfiguration applicationServer, DatabaseConfiguration databaseServer) : base(appResourceGroup) + { + Argument.AssertNotNull(appResourceGroup, nameof(appResourceGroup)); + Argument.AssertNotNull(centralServer, nameof(centralServer)); + Argument.AssertNotNull(applicationServer, nameof(applicationServer)); + Argument.AssertNotNull(databaseServer, nameof(databaseServer)); + + CentralServer = centralServer; + ApplicationServer = applicationServer; + DatabaseServer = databaseServer; + DeploymentType = SapDeploymentType.ThreeTier; + } + + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The SAP deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + /// Network configuration common to all servers. + /// The central server configuration. + /// The application server configuration. + /// The database configuration. + /// The high availability configuration. + /// The storage configuration. + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + internal ThreeTierConfiguration(string appResourceGroup, SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData, NetworkConfiguration networkConfiguration, CentralServerConfiguration centralServer, ApplicationServerConfiguration applicationServer, DatabaseConfiguration databaseServer, HighAvailabilityConfiguration highAvailabilityConfig, StorageConfiguration storageConfiguration, ThreeTierCustomResourceNames customResourceNames) : base(appResourceGroup, deploymentType, serializedAdditionalRawData) + { + NetworkConfiguration = networkConfiguration; + CentralServer = centralServer; + ApplicationServer = applicationServer; + DatabaseServer = databaseServer; + HighAvailabilityConfig = highAvailabilityConfig; + StorageConfiguration = storageConfiguration; + CustomResourceNames = customResourceNames; + DeploymentType = deploymentType; + } + + /// Initializes a new instance of for deserialization. + internal ThreeTierConfiguration() + { + } + + /// Network configuration common to all servers. + internal NetworkConfiguration NetworkConfiguration { get; set; } + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. + public bool? IsSecondaryIPEnabled + { + get => NetworkConfiguration is null ? default : NetworkConfiguration.IsSecondaryIPEnabled; + set + { + if (NetworkConfiguration is null) + NetworkConfiguration = new NetworkConfiguration(); + NetworkConfiguration.IsSecondaryIPEnabled = value; + } + } + + /// The central server configuration. + public CentralServerConfiguration CentralServer { get; set; } + /// The application server configuration. + public ApplicationServerConfiguration ApplicationServer { get; set; } + /// The database configuration. + public DatabaseConfiguration DatabaseServer { get; set; } + /// The high availability configuration. + internal HighAvailabilityConfiguration HighAvailabilityConfig { get; set; } + /// The high availability type. + public SapHighAvailabilityType? HighAvailabilityType + { + get => HighAvailabilityConfig is null ? default(SapHighAvailabilityType?) : HighAvailabilityConfig.HighAvailabilityType; + set + { + HighAvailabilityConfig = value.HasValue ? new HighAvailabilityConfiguration(value.Value) : null; + } + } + + /// The storage configuration. + internal StorageConfiguration StorageConfiguration { get; set; } + /// + /// The properties of the transport directory attached to the VIS. The default for transportFileShareConfiguration is the createAndMount flow if storage configuration is missing. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public FileShareConfiguration StorageTransportFileShareConfiguration + { + get => StorageConfiguration is null ? default : StorageConfiguration.TransportFileShareConfiguration; + set + { + if (StorageConfiguration is null) + StorageConfiguration = new StorageConfiguration(); + StorageConfiguration.TransportFileShareConfiguration = value; + } + } + + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public ThreeTierCustomResourceNames CustomResourceNames { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.Serialization.cs new file mode 100644 index 000000000000..a3151071903d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownThreeTierCustomResourceNames))] + public partial class ThreeTierCustomResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("namingPatternType"u8); + writer.WriteStringValue(NamingPatternType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ThreeTierCustomResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThreeTierCustomResourceNames(document.RootElement, options); + } + + internal static ThreeTierCustomResourceNames DeserializeThreeTierCustomResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("namingPatternType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "FullResourceName": return ThreeTierFullResourceNames.DeserializeThreeTierFullResourceNames(element, options); + } + } + return UnknownThreeTierCustomResourceNames.DeserializeUnknownThreeTierCustomResourceNames(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support writing '{options.Format}' format."); + } + } + + ThreeTierCustomResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeThreeTierCustomResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.cs new file mode 100644 index 000000000000..1da2eab3183d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// The resource-names input to specify custom names for underlying azure resources that are part of a three tier SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class ThreeTierCustomResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected ThreeTierCustomResourceNames() + { + } + + /// Initializes a new instance of . + /// The pattern type to be used for resource naming. + /// Keeps track of any properties unknown to the library. + internal ThreeTierCustomResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData) + { + NamingPatternType = namingPatternType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The pattern type to be used for resource naming. + internal NamingPatternType NamingPatternType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.Serialization.cs new file mode 100644 index 000000000000..4689c06ed5b0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ThreeTierFullResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierFullResourceNames)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(CentralServer)) + { + writer.WritePropertyName("centralServer"u8); + writer.WriteObjectValue(CentralServer, options); + } + if (Optional.IsDefined(ApplicationServer)) + { + writer.WritePropertyName("applicationServer"u8); + writer.WriteObjectValue(ApplicationServer, options); + } + if (Optional.IsDefined(DatabaseServer)) + { + writer.WritePropertyName("databaseServer"u8); + writer.WriteObjectValue(DatabaseServer, options); + } + if (Optional.IsDefined(SharedStorage)) + { + writer.WritePropertyName("sharedStorage"u8); + writer.WriteObjectValue(SharedStorage, options); + } + } + + ThreeTierFullResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierFullResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThreeTierFullResourceNames(document.RootElement, options); + } + + internal static ThreeTierFullResourceNames DeserializeThreeTierFullResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CentralServerFullResourceNames centralServer = default; + ApplicationServerFullResourceNames applicationServer = default; + DatabaseServerFullResourceNames databaseServer = default; + SharedStorageResourceNames sharedStorage = default; + NamingPatternType namingPatternType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("centralServer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + centralServer = CentralServerFullResourceNames.DeserializeCentralServerFullResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("applicationServer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + applicationServer = ApplicationServerFullResourceNames.DeserializeApplicationServerFullResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("databaseServer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseServer = DatabaseServerFullResourceNames.DeserializeDatabaseServerFullResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("sharedStorage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sharedStorage = SharedStorageResourceNames.DeserializeSharedStorageResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("namingPatternType"u8)) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ThreeTierFullResourceNames( + namingPatternType, + serializedAdditionalRawData, + centralServer, + applicationServer, + databaseServer, + sharedStorage); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ThreeTierFullResourceNames)} does not support writing '{options.Format}' format."); + } + } + + ThreeTierFullResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeThreeTierFullResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThreeTierFullResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.cs new file mode 100644 index 000000000000..30dac04bfc8d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource name object where the specified values will be full resource names of the corresponding resources in a three tier SAP system. + public partial class ThreeTierFullResourceNames : ThreeTierCustomResourceNames + { + /// Initializes a new instance of . + public ThreeTierFullResourceNames() + { + NamingPatternType = NamingPatternType.FullResourceName; + } + + /// Initializes a new instance of . + /// The pattern type to be used for resource naming. + /// Keeps track of any properties unknown to the library. + /// The full resource names object for central server layer resources. + /// The full resource names object for application layer resources. The number of entries in this list should be equal to the number VMs to be created for application layer. + /// The full resource names object for database layer resources. The number of entries in this list should be equal to the number VMs to be created for database layer. + /// The resource names object for shared storage. + internal ThreeTierFullResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData, CentralServerFullResourceNames centralServer, ApplicationServerFullResourceNames applicationServer, DatabaseServerFullResourceNames databaseServer, SharedStorageResourceNames sharedStorage) : base(namingPatternType, serializedAdditionalRawData) + { + CentralServer = centralServer; + ApplicationServer = applicationServer; + DatabaseServer = databaseServer; + SharedStorage = sharedStorage; + NamingPatternType = namingPatternType; + } + + /// The full resource names object for central server layer resources. + public CentralServerFullResourceNames CentralServer { get; set; } + /// The full resource names object for application layer resources. The number of entries in this list should be equal to the number VMs to be created for application layer. + public ApplicationServerFullResourceNames ApplicationServer { get; set; } + /// The full resource names object for database layer resources. The number of entries in this list should be equal to the number VMs to be created for database layer. + public DatabaseServerFullResourceNames DatabaseServer { get; set; } + /// The resource names object for shared storage. + public SharedStorageResourceNames SharedStorage { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.Serialization.cs new file mode 100644 index 000000000000..18c506f2f1a6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ThreeTierRecommendationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierRecommendationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(DbVmSku)) + { + writer.WritePropertyName("dbVmSku"u8); + writer.WriteStringValue(DbVmSku); + } + if (Optional.IsDefined(DatabaseInstanceCount)) + { + writer.WritePropertyName("databaseInstanceCount"u8); + writer.WriteNumberValue(DatabaseInstanceCount.Value); + } + if (Optional.IsDefined(CentralServerVmSku)) + { + writer.WritePropertyName("centralServerVmSku"u8); + writer.WriteStringValue(CentralServerVmSku); + } + if (Optional.IsDefined(CentralServerInstanceCount)) + { + writer.WritePropertyName("centralServerInstanceCount"u8); + writer.WriteNumberValue(CentralServerInstanceCount.Value); + } + if (Optional.IsDefined(ApplicationServerVmSku)) + { + writer.WritePropertyName("applicationServerVmSku"u8); + writer.WriteStringValue(ApplicationServerVmSku); + } + if (Optional.IsDefined(ApplicationServerInstanceCount)) + { + writer.WritePropertyName("applicationServerInstanceCount"u8); + writer.WriteNumberValue(ApplicationServerInstanceCount.Value); + } + } + + ThreeTierRecommendationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierRecommendationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThreeTierRecommendationResult(document.RootElement, options); + } + + internal static ThreeTierRecommendationResult DeserializeThreeTierRecommendationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string dbVmSku = default; + long? databaseInstanceCount = default; + string centralServerVmSku = default; + long? centralServerInstanceCount = default; + string applicationServerVmSku = default; + long? applicationServerInstanceCount = default; + SapDeploymentType deploymentType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dbVmSku"u8)) + { + dbVmSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseInstanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseInstanceCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("centralServerVmSku"u8)) + { + centralServerVmSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("centralServerInstanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + centralServerInstanceCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("applicationServerVmSku"u8)) + { + applicationServerVmSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("applicationServerInstanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + applicationServerInstanceCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ThreeTierRecommendationResult( + deploymentType, + serializedAdditionalRawData, + dbVmSku, + databaseInstanceCount, + centralServerVmSku, + centralServerInstanceCount, + applicationServerVmSku, + applicationServerInstanceCount); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ThreeTierRecommendationResult)} does not support writing '{options.Format}' format."); + } + } + + ThreeTierRecommendationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeThreeTierRecommendationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThreeTierRecommendationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.cs new file mode 100644 index 000000000000..cf68c754d75d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The recommended configuration for a three tier SAP system. + public partial class ThreeTierRecommendationResult : SapSizingRecommendationResult + { + /// Initializes a new instance of . + internal ThreeTierRecommendationResult() + { + DeploymentType = SapDeploymentType.ThreeTier; + } + + /// Initializes a new instance of . + /// The deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + /// The database VM SKU. + /// The database server instance count. + /// The central server VM SKU. + /// The central server instance count. + /// The application server VM SKU. + /// The application server instance count. + internal ThreeTierRecommendationResult(SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData, string dbVmSku, long? databaseInstanceCount, string centralServerVmSku, long? centralServerInstanceCount, string applicationServerVmSku, long? applicationServerInstanceCount) : base(deploymentType, serializedAdditionalRawData) + { + DbVmSku = dbVmSku; + DatabaseInstanceCount = databaseInstanceCount; + CentralServerVmSku = centralServerVmSku; + CentralServerInstanceCount = centralServerInstanceCount; + ApplicationServerVmSku = applicationServerVmSku; + ApplicationServerInstanceCount = applicationServerInstanceCount; + DeploymentType = deploymentType; + } + + /// The database VM SKU. + public string DbVmSku { get; } + /// The database server instance count. + public long? DatabaseInstanceCount { get; } + /// The central server VM SKU. + public string CentralServerVmSku { get; } + /// The central server instance count. + public long? CentralServerInstanceCount { get; } + /// The application server VM SKU. + public string ApplicationServerVmSku { get; } + /// The application server instance count. + public long? ApplicationServerInstanceCount { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.Serialization.cs new file mode 100644 index 000000000000..306a68165137 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownFileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + FileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFileShareConfiguration(document.RootElement, options); + } + + internal static UnknownFileShareConfiguration DeserializeUnknownFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FileShareConfigurationType configurationType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurationType"u8)) + { + configurationType = new FileShareConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownFileShareConfiguration(configurationType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + FileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.cs new file mode 100644 index 000000000000..d3588642b83c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of FileShareConfiguration. + internal partial class UnknownFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of . + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + /// Keeps track of any properties unknown to the library. + internal UnknownFileShareConfiguration(FileShareConfigurationType configurationType, IDictionary serializedAdditionalRawData) : base(configurationType, serializedAdditionalRawData) + { + ConfigurationType = configurationType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownFileShareConfiguration() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.Serialization.cs new file mode 100644 index 000000000000..fee96cbfcace --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.Serialization.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownInfrastructureConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + InfrastructureConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInfrastructureConfiguration(document.RootElement, options); + } + + internal static UnknownInfrastructureConfiguration DeserializeUnknownInfrastructureConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appResourceGroup = default; + SapDeploymentType deploymentType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appResourceGroup"u8)) + { + appResourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownInfrastructureConfiguration(appResourceGroup, deploymentType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support writing '{options.Format}' format."); + } + } + + InfrastructureConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeInfrastructureConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.cs new file mode 100644 index 000000000000..8cd6afc1beef --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of InfrastructureConfiguration. + internal partial class UnknownInfrastructureConfiguration : InfrastructureConfiguration + { + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The SAP deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + internal UnknownInfrastructureConfiguration(string appResourceGroup, SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData) : base(appResourceGroup, deploymentType, serializedAdditionalRawData) + { + DeploymentType = deploymentType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownInfrastructureConfiguration() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.Serialization.cs new file mode 100644 index 000000000000..2d665f78c8f2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownOSConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + OSConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOSConfiguration(document.RootElement, options); + } + + internal static UnknownOSConfiguration DeserializeUnknownOSConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OSType osType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("osType"u8)) + { + osType = new OSType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownOSConfiguration(osType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OSConfiguration)} does not support writing '{options.Format}' format."); + } + } + + OSConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOSConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OSConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.cs new file mode 100644 index 000000000000..266b67037b5b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of OSConfiguration. + internal partial class UnknownOSConfiguration : OSConfiguration + { + /// Initializes a new instance of . + /// The OS Type. + /// Keeps track of any properties unknown to the library. + internal UnknownOSConfiguration(OSType osType, IDictionary serializedAdditionalRawData) : base(osType, serializedAdditionalRawData) + { + OSType = osType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownOSConfiguration() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.Serialization.cs new file mode 100644 index 000000000000..7ffcecffdf21 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownSapConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + SapConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapConfiguration(document.RootElement, options); + } + + internal static UnknownSapConfiguration DeserializeUnknownSapConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapConfigurationType configurationType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurationType"u8)) + { + configurationType = new SapConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownSapConfiguration(configurationType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SapConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.cs new file mode 100644 index 000000000000..43650e6a5ae5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of SapConfiguration. + internal partial class UnknownSapConfiguration : SapConfiguration + { + /// Initializes a new instance of . + /// The configuration type. Eg: Deployment/Discovery. + /// Keeps track of any properties unknown to the library. + internal UnknownSapConfiguration(SapConfigurationType configurationType, IDictionary serializedAdditionalRawData) : base(configurationType, serializedAdditionalRawData) + { + ConfigurationType = configurationType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownSapConfiguration() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.Serialization.cs new file mode 100644 index 000000000000..a6188e419bf1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownSapSizingRecommendationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + SapSizingRecommendationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSizingRecommendationResult(document.RootElement, options); + } + + internal static UnknownSapSizingRecommendationResult DeserializeUnknownSapSizingRecommendationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapDeploymentType deploymentType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownSapSizingRecommendationResult(deploymentType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support writing '{options.Format}' format."); + } + } + + SapSizingRecommendationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapSizingRecommendationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.cs new file mode 100644 index 000000000000..aed574f9819d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of SapSizingRecommendationResult. + internal partial class UnknownSapSizingRecommendationResult : SapSizingRecommendationResult + { + /// Initializes a new instance of . + /// The deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + internal UnknownSapSizingRecommendationResult(SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData) : base(deploymentType, serializedAdditionalRawData) + { + DeploymentType = deploymentType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownSapSizingRecommendationResult() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.Serialization.cs new file mode 100644 index 000000000000..22477a6d0324 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownSingleServerCustomResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + SingleServerCustomResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleServerCustomResourceNames(document.RootElement, options); + } + + internal static UnknownSingleServerCustomResourceNames DeserializeUnknownSingleServerCustomResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NamingPatternType namingPatternType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("namingPatternType"u8)) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownSingleServerCustomResourceNames(namingPatternType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support writing '{options.Format}' format."); + } + } + + SingleServerCustomResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSingleServerCustomResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.cs new file mode 100644 index 000000000000..ca9167a891c3 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of SingleServerCustomResourceNames. + internal partial class UnknownSingleServerCustomResourceNames : SingleServerCustomResourceNames + { + /// Initializes a new instance of . + /// The naming pattern type. + /// Keeps track of any properties unknown to the library. + internal UnknownSingleServerCustomResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData) : base(namingPatternType, serializedAdditionalRawData) + { + NamingPatternType = namingPatternType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownSingleServerCustomResourceNames() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..16070b96acfe --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownSoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + SoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSoftwareConfiguration(document.RootElement, options); + } + + internal static UnknownSoftwareConfiguration DeserializeUnknownSoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapSoftwareInstallationType softwareInstallationType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("softwareInstallationType"u8)) + { + softwareInstallationType = new SapSoftwareInstallationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownSoftwareConfiguration(softwareInstallationType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.cs new file mode 100644 index 000000000000..469cfda732f1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of SoftwareConfiguration. + internal partial class UnknownSoftwareConfiguration : SoftwareConfiguration + { + /// Initializes a new instance of . + /// The SAP software installation type. + /// Keeps track of any properties unknown to the library. + internal UnknownSoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, IDictionary serializedAdditionalRawData) : base(softwareInstallationType, serializedAdditionalRawData) + { + SoftwareInstallationType = softwareInstallationType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownSoftwareConfiguration() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.Serialization.cs new file mode 100644 index 000000000000..b1c34a687545 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownThreeTierCustomResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + ThreeTierCustomResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThreeTierCustomResourceNames(document.RootElement, options); + } + + internal static UnknownThreeTierCustomResourceNames DeserializeUnknownThreeTierCustomResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NamingPatternType namingPatternType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("namingPatternType"u8)) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownThreeTierCustomResourceNames(namingPatternType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support writing '{options.Format}' format."); + } + } + + ThreeTierCustomResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeThreeTierCustomResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.cs new file mode 100644 index 000000000000..35ac6ef0a5f0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of ThreeTierCustomResourceNames. + internal partial class UnknownThreeTierCustomResourceNames : ThreeTierCustomResourceNames + { + /// Initializes a new instance of . + /// The pattern type to be used for resource naming. + /// Keeps track of any properties unknown to the library. + internal UnknownThreeTierCustomResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData) : base(namingPatternType, serializedAdditionalRawData) + { + NamingPatternType = namingPatternType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownThreeTierCustomResourceNames() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.Serialization.cs new file mode 100644 index 000000000000..6bfe5e1690a0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UpdateSapVirtualInstanceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UpdateSapVirtualInstanceProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ManagedResourcesNetworkAccessType)) + { + writer.WritePropertyName("managedResourcesNetworkAccessType"u8); + writer.WriteStringValue(ManagedResourcesNetworkAccessType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + UpdateSapVirtualInstanceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UpdateSapVirtualInstanceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUpdateSapVirtualInstanceProperties(document.RootElement, options); + } + + internal static UpdateSapVirtualInstanceProperties DeserializeUpdateSapVirtualInstanceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("managedResourcesNetworkAccessType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managedResourcesNetworkAccessType = new ManagedResourcesNetworkAccessType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UpdateSapVirtualInstanceProperties(managedResourcesNetworkAccessType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UpdateSapVirtualInstanceProperties)} does not support writing '{options.Format}' format."); + } + } + + UpdateSapVirtualInstanceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUpdateSapVirtualInstanceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UpdateSapVirtualInstanceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.cs new file mode 100644 index 000000000000..5a311122d9de --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the update request body properties for updating Virtual Instance for SAP. + internal partial class UpdateSapVirtualInstanceProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public UpdateSapVirtualInstanceProperties() + { + } + + /// Initializes a new instance of . + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + /// Keeps track of any properties unknown to the library. + internal UpdateSapVirtualInstanceProperties(ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType, IDictionary serializedAdditionalRawData) + { + ManagedResourcesNetworkAccessType = managedResourcesNetworkAccessType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + public ManagedResourcesNetworkAccessType? ManagedResourcesNetworkAccessType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.Serialization.cs new file mode 100644 index 000000000000..7b2554bf1403 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class VirtualMachineConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("vmSize"u8); + writer.WriteStringValue(VmSize); + writer.WritePropertyName("imageReference"u8); + writer.WriteObjectValue(ImageReference, options); + writer.WritePropertyName("osProfile"u8); + writer.WriteObjectValue(OSProfile, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VirtualMachineConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVirtualMachineConfiguration(document.RootElement, options); + } + + internal static VirtualMachineConfiguration DeserializeVirtualMachineConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmSize = default; + ImageReference imageReference = default; + OSProfile osProfile = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmSize"u8)) + { + vmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("imageReference"u8)) + { + imageReference = ImageReference.DeserializeImageReference(property.Value, options); + continue; + } + if (property.NameEquals("osProfile"u8)) + { + osProfile = OSProfile.DeserializeOSProfile(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VirtualMachineConfiguration(vmSize, imageReference, osProfile, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support writing '{options.Format}' format."); + } + } + + VirtualMachineConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVirtualMachineConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.cs new file mode 100644 index 000000000000..7292e4ec577f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the virtual machine configuration. + public partial class VirtualMachineConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The virtual machine size. + /// The image reference. + /// The OS profile. + /// , or is null. + public VirtualMachineConfiguration(string vmSize, ImageReference imageReference, OSProfile osProfile) + { + Argument.AssertNotNull(vmSize, nameof(vmSize)); + Argument.AssertNotNull(imageReference, nameof(imageReference)); + Argument.AssertNotNull(osProfile, nameof(osProfile)); + + VmSize = vmSize; + ImageReference = imageReference; + OSProfile = osProfile; + } + + /// Initializes a new instance of . + /// The virtual machine size. + /// The image reference. + /// The OS profile. + /// Keeps track of any properties unknown to the library. + internal VirtualMachineConfiguration(string vmSize, ImageReference imageReference, OSProfile osProfile, IDictionary serializedAdditionalRawData) + { + VmSize = vmSize; + ImageReference = imageReference; + OSProfile = osProfile; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal VirtualMachineConfiguration() + { + } + + /// The virtual machine size. + public string VmSize { get; set; } + /// The image reference. + public ImageReference ImageReference { get; set; } + /// The OS profile. + public OSProfile OSProfile { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.Serialization.cs new file mode 100644 index 000000000000..7b9bf7a0a2b2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.Serialization.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class VirtualMachineResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(VmName)) + { + writer.WritePropertyName("vmName"u8); + writer.WriteStringValue(VmName); + } + if (Optional.IsDefined(HostName)) + { + writer.WritePropertyName("hostName"u8); + writer.WriteStringValue(HostName); + } + if (Optional.IsCollectionDefined(NetworkInterfaces)) + { + writer.WritePropertyName("networkInterfaces"u8); + writer.WriteStartArray(); + foreach (var item in NetworkInterfaces) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(OSDiskName)) + { + writer.WritePropertyName("osDiskName"u8); + writer.WriteStringValue(OSDiskName); + } + if (Optional.IsCollectionDefined(DataDiskNames)) + { + writer.WritePropertyName("dataDiskNames"u8); + writer.WriteStartObject(); + foreach (var item in DataDiskNames) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStartArray(); + foreach (var item0 in item.Value) + { + writer.WriteStringValue(item0); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VirtualMachineResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVirtualMachineResourceNames(document.RootElement, options); + } + + internal static VirtualMachineResourceNames DeserializeVirtualMachineResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmName = default; + string hostName = default; + IList networkInterfaces = default; + string osDiskName = default; + IDictionary> dataDiskNames = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmName"u8)) + { + vmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostName"u8)) + { + hostName = property.Value.GetString(); + continue; + } + if (property.NameEquals("networkInterfaces"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkInterfaceResourceNames.DeserializeNetworkInterfaceResourceNames(item, options)); + } + networkInterfaces = array; + continue; + } + if (property.NameEquals("osDiskName"u8)) + { + osDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataDiskNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary> dictionary = new Dictionary>(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dictionary.Add(property0.Name, array); + } + } + dataDiskNames = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VirtualMachineResourceNames( + vmName, + hostName, + networkInterfaces ?? new ChangeTrackingList(), + osDiskName, + dataDiskNames ?? new ChangeTrackingDictionary>(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VirtualMachineResourceNames)} does not support writing '{options.Format}' format."); + } + } + + VirtualMachineResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVirtualMachineResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VirtualMachineResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.cs new file mode 100644 index 000000000000..f1e4d4439a2a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource names object for virtual machine and related resources. + public partial class VirtualMachineResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public VirtualMachineResourceNames() + { + NetworkInterfaces = new ChangeTrackingList(); + DataDiskNames = new ChangeTrackingDictionary>(); + } + + /// Initializes a new instance of . + /// The full name for virtual machine. The length of this field can be upto 64 characters. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}vm. In case of HA-AvZone systems, default name will be {SID}{app/ascs/db}z{a/b}vm with an incrementor at the end in case of more than 1 vm per layer. For distributed and HA-AvSet systems, default name will be {SID}{app/ascs/db}vm with an incrementor at the end in case of more than 1 vm per layer. + /// The full name for virtual-machine's host (computer name). Currently, ACSS only supports host names which are less than or equal to 13 characters long. If this value is not provided, vmName will be used as host name. + /// The list of network interface name objects for the selected virtual machine. Currently, only one network interface is supported per virtual machine. + /// The full name for OS disk attached to the VM. If this value is not provided, it will be named by ARM as per its default naming standards (prefixed with vm name). There is only one OS disk attached per Virtual Machine. + /// The full resource names for virtual machine data disks. This is a dictionary containing list of names of data disks per volume. Currently supported volumes for database layer are ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os', 'backup']. For application and cs layers, only 'default' volume is supported. + /// Keeps track of any properties unknown to the library. + internal VirtualMachineResourceNames(string vmName, string hostName, IList networkInterfaces, string osDiskName, IDictionary> dataDiskNames, IDictionary serializedAdditionalRawData) + { + VmName = vmName; + HostName = hostName; + NetworkInterfaces = networkInterfaces; + OSDiskName = osDiskName; + DataDiskNames = dataDiskNames; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The full name for virtual machine. The length of this field can be upto 64 characters. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}vm. In case of HA-AvZone systems, default name will be {SID}{app/ascs/db}z{a/b}vm with an incrementor at the end in case of more than 1 vm per layer. For distributed and HA-AvSet systems, default name will be {SID}{app/ascs/db}vm with an incrementor at the end in case of more than 1 vm per layer. + public string VmName { get; set; } + /// The full name for virtual-machine's host (computer name). Currently, ACSS only supports host names which are less than or equal to 13 characters long. If this value is not provided, vmName will be used as host name. + public string HostName { get; set; } + /// The list of network interface name objects for the selected virtual machine. Currently, only one network interface is supported per virtual machine. + public IList NetworkInterfaces { get; } + /// The full name for OS disk attached to the VM. If this value is not provided, it will be named by ARM as per its default naming standards (prefixed with vm name). There is only one OS disk attached per Virtual Machine. + public string OSDiskName { get; set; } + /// The full resource names for virtual machine data disks. This is a dictionary containing list of names of data disks per volume. Currently supported volumes for database layer are ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os', 'backup']. For application and cs layers, only 'default' volume is supported. + public IDictionary> DataDiskNames { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.Serialization.cs new file mode 100644 index 000000000000..9561d76734d4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class WindowsConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + WindowsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWindowsConfiguration(document.RootElement, options); + } + + internal static WindowsConfiguration DeserializeWindowsConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OSType osType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("osType"u8)) + { + osType = new OSType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WindowsConfiguration(osType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support writing '{options.Format}' format."); + } + } + + WindowsConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWindowsConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.cs new file mode 100644 index 000000000000..55729d7198eb --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Specifies Windows operating system settings on the virtual machine. + public partial class WindowsConfiguration : OSConfiguration + { + /// Initializes a new instance of . + public WindowsConfiguration() + { + OSType = OSType.Windows; + } + + /// Initializes a new instance of . + /// The OS Type. + /// Keeps track of any properties unknown to the library. + internal WindowsConfiguration(OSType osType, IDictionary serializedAdditionalRawData) : base(osType, serializedAdditionalRawData) + { + OSType = osType; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ProviderConstants.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..c33e111ebe5c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/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.SapVirtualInstances +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapApplicationServerInstancesRestOperations.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapApplicationServerInstancesRestOperations.cs new file mode 100644 index 000000000000..20334b33da48 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapApplicationServerInstancesRestOperations.cs @@ -0,0 +1,827 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal partial class SapApplicationServerInstancesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SapApplicationServerInstancesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SapApplicationServerInstancesRestOperations(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 ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance 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 sapVirtualInstanceName, string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapApplicationServerInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapApplicationServerInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance 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 sapVirtualInstanceName, string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapApplicationServerInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapApplicationServerInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstanceData data) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstanceData 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, 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); + } + } + + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstancePatch 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstancePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Puts the SAP Application Server Instance resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// 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 sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapApplicationServerInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Puts the SAP Application Server Instance resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// 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 sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapApplicationServerInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance 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 sapVirtualInstanceName, string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance 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 sapVirtualInstanceName, string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPApplicationServerInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPApplicationServerInstanceListResult.DeserializeSAPApplicationServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPApplicationServerInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPApplicationServerInstanceListResult.DeserializeSAPApplicationServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StartContent content) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StartContent 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Starts the SAP Application Server Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// SAP Application server instance start request body. + /// 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 sapVirtualInstanceName, string applicationInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts the SAP Application Server Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// SAP Application server instance start request body. + /// 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 sapVirtualInstanceName, string applicationInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StopContent content) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StopContent 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Stops the SAP Application Server Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// SAP Application server instance stop request body. + /// 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 sapVirtualInstanceName, string applicationInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops the SAP Application Server Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// SAP Application server instance stop request body. + /// 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 sapVirtualInstanceName, string applicationInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + 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 the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPApplicationServerInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPApplicationServerInstanceListResult.DeserializeSAPApplicationServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPApplicationServerInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPApplicationServerInstanceListResult.DeserializeSAPApplicationServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapCentralServerInstancesRestOperations.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapCentralServerInstancesRestOperations.cs new file mode 100644 index 000000000000..bb6d957e0fde --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapCentralServerInstancesRestOperations.cs @@ -0,0 +1,827 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal partial class SapCentralServerInstancesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SapCentralServerInstancesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SapCentralServerInstancesRestOperations(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 ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the SAP Central Services Instance resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// 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 sapVirtualInstanceName, string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapCentralServerInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapCentralServerInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the SAP Central Services Instance resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// 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 sapVirtualInstanceName, string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapCentralServerInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapCentralServerInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstanceData data) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstanceData 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, 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); + } + } + + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstancePatch 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstancePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance resource request body. + /// 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 sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapCentralServerInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance resource request body. + /// 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 sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapCentralServerInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// 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 sapVirtualInstanceName, string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// 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 sapVirtualInstanceName, string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPCentralServerInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPCentralServerInstanceListResult.DeserializeSAPCentralServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPCentralServerInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPCentralServerInstanceListResult.DeserializeSAPCentralServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StartContent content) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StartContent 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Starts the SAP Central Services Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// SAP Central Services instance start request body. + /// 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 sapVirtualInstanceName, string centralInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts the SAP Central Services Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// SAP Central Services instance start request body. + /// 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 sapVirtualInstanceName, string centralInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StopContent content) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StopContent 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Stops the SAP Central Services Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// SAP Central Services instance stop request body. + /// 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 sapVirtualInstanceName, string centralInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops the SAP Central Services Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// SAP Central Services instance stop request body. + /// 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 sapVirtualInstanceName, string centralInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + 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 the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPCentralServerInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPCentralServerInstanceListResult.DeserializeSAPCentralServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPCentralServerInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPCentralServerInstanceListResult.DeserializeSAPCentralServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapDatabaseInstancesRestOperations.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapDatabaseInstancesRestOperations.cs new file mode 100644 index 000000000000..d0049a10de25 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapDatabaseInstancesRestOperations.cs @@ -0,0 +1,827 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal partial class SapDatabaseInstancesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SapDatabaseInstancesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SapDatabaseInstancesRestOperations(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 ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the SAP Database Instance resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// 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 sapVirtualInstanceName, string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapDatabaseInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapDatabaseInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the SAP Database Instance resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// 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 sapVirtualInstanceName, string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapDatabaseInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapDatabaseInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstanceData data) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstanceData 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, 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); + } + } + + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstancePatch 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstancePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the Database resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Database resource update request body. + /// 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 sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapDatabaseInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the Database resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Database resource update request body. + /// 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 sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapDatabaseInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// 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 sapVirtualInstanceName, string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// 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 sapVirtualInstanceName, string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPDatabaseInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPDatabaseInstanceListResult.DeserializeSAPDatabaseInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPDatabaseInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPDatabaseInstanceListResult.DeserializeSAPDatabaseInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StartContent content) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StartContent 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Starts the database instance of the SAP system. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// SAP Database server instance start request body. + /// 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 sapVirtualInstanceName, string databaseInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts the database instance of the SAP system. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// SAP Database server instance start request body. + /// 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 sapVirtualInstanceName, string databaseInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StopContent content) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StopContent 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Stops the database instance of the SAP system. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Stop request for the database instance of the SAP system. + /// 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 sapVirtualInstanceName, string databaseInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops the database instance of the SAP system. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Stop request for the database instance of the SAP system. + /// 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 sapVirtualInstanceName, string databaseInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + 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 the Database resources associated with a Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPDatabaseInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPDatabaseInstanceListResult.DeserializeSAPDatabaseInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPDatabaseInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPDatabaseInstanceListResult.DeserializeSAPDatabaseInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapVirtualInstancesRestOperations.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapVirtualInstancesRestOperations.cs new file mode 100644 index 000000000000..7de7877e90aa --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapVirtualInstancesRestOperations.cs @@ -0,0 +1,1281 @@ +// 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.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal partial class SapVirtualInstancesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SapVirtualInstancesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SapVirtualInstancesRestOperations(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 ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapVirtualInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapVirtualInstanceData.DeserializeSapVirtualInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapVirtualInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapVirtualInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapVirtualInstanceData.DeserializeSapVirtualInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapVirtualInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstanceData data) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstanceData 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, 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, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a Virtual Instance for SAP solutions (VIS) resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, 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); + } + } + + /// Creates a Virtual Instance for SAP solutions (VIS) resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstancePatch 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstancePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates a Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Request body to update a Virtual Instance for SAP solutions resource. + /// 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 sapVirtualInstanceName, SapVirtualInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates a Virtual Instance for SAP solutions resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Request body to update a Virtual Instance for SAP solutions resource. + /// 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 sapVirtualInstanceName, SapVirtualInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + 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.Workloads/sapVirtualInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(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.Workloads/sapVirtualInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + 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.Workloads/sapVirtualInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + SAPVirtualInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + SAPVirtualInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StartContent content) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StartContent 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Starts the SAP application, that is the Central Services instance and Application server instances. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The Virtual Instance for SAP solutions resource start request body. + /// 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 sapVirtualInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts the SAP application, that is the Central Services instance and Application server instances. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The Virtual Instance for SAP solutions resource start request body. + /// 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 sapVirtualInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopContent content) + { + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopContent 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Stops the SAP Application, that is the Application server instances and Central Services instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The Virtual Instance for SAP solutions resource stop request body. + /// 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 sapVirtualInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops the SAP Application, that is the Application server instances and Central Services instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The Virtual Instance for SAP solutions resource stop request body. + /// 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 sapVirtualInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSizingRecommendationsRequestUri(string subscriptionId, AzureLocation location, SapSizingRecommendationContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getSizingRecommendations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSizingRecommendationsRequest(string subscriptionId, AzureLocation location, SapSizingRecommendationContent 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.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getSizingRecommendations", 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, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Gets the sizing recommendations. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetSizingRecommendationsAsync(string subscriptionId, AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetSizingRecommendationsRequest(subscriptionId, location, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapSizingRecommendationResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapSizingRecommendationResult.DeserializeSapSizingRecommendationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the sizing recommendations. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetSizingRecommendations(string subscriptionId, AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetSizingRecommendationsRequest(subscriptionId, location, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapSizingRecommendationResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapSizingRecommendationResult.DeserializeSapSizingRecommendationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSapSupportedSkuRequestUri(string subscriptionId, AzureLocation location, SapSupportedSkusContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getSapSupportedSku", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSapSupportedSkuRequest(string subscriptionId, AzureLocation location, SapSupportedSkusContent 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.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getSapSupportedSku", 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, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetSapSupportedSkuAsync(string subscriptionId, AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetSapSupportedSkuRequest(subscriptionId, location, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapSupportedResourceSkusResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapSupportedResourceSkusResult.DeserializeSapSupportedResourceSkusResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetSapSupportedSku(string subscriptionId, AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetSapSupportedSkuRequest(subscriptionId, location, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapSupportedResourceSkusResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapSupportedResourceSkusResult.DeserializeSapSupportedResourceSkusResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetDiskConfigurationsRequestUri(string subscriptionId, AzureLocation location, SapDiskConfigurationsContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getDiskConfigurations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetDiskConfigurationsRequest(string subscriptionId, AzureLocation location, SapDiskConfigurationsContent 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.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getDiskConfigurations", 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, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetDiskConfigurationsAsync(string subscriptionId, AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetDiskConfigurationsRequest(subscriptionId, location, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapDiskConfigurationsResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapDiskConfigurationsResult.DeserializeSapDiskConfigurationsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetDiskConfigurations(string subscriptionId, AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetDiskConfigurationsRequest(subscriptionId, location, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapDiskConfigurationsResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapDiskConfigurationsResult.DeserializeSapDiskConfigurationsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetAvailabilityZoneDetailsRequestUri(string subscriptionId, AzureLocation location, SapAvailabilityZoneDetailsContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAvailabilityZoneDetailsRequest(string subscriptionId, AzureLocation location, SapAvailabilityZoneDetailsContent 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.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails", 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, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetAvailabilityZoneDetailsAsync(string subscriptionId, AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetAvailabilityZoneDetailsRequest(subscriptionId, location, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapAvailabilityZoneDetailsResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapAvailabilityZoneDetailsResult.DeserializeSapAvailabilityZoneDetailsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetAvailabilityZoneDetails(string subscriptionId, AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetAvailabilityZoneDetailsRequest(subscriptionId, location, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapAvailabilityZoneDetailsResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapAvailabilityZoneDetailsResult.DeserializeSapAvailabilityZoneDetailsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(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; + } + + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(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 = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(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 = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + 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; + } + + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + SAPVirtualInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// 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: + { + SAPVirtualInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceCollection.cs new file mode 100644 index 000000000000..ce15a8b6e1d0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// 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 GetSapApplicationServerInstances method from an instance of . + /// + public partial class SapApplicationServerInstanceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _sapApplicationServerInstanceClientDiagnostics; + private readonly SapApplicationServerInstancesRestOperations _sapApplicationServerInstanceRestClient; + + /// Initializes a new instance of the class for mocking. + protected SapApplicationServerInstanceCollection() + { + } + + /// 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 SapApplicationServerInstanceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapApplicationServerInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", SapApplicationServerInstanceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SapApplicationServerInstanceResource.ResourceType, out string sapApplicationServerInstanceApiVersion); + _sapApplicationServerInstanceRestClient = new SapApplicationServerInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapApplicationServerInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SapVirtualInstanceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SapVirtualInstanceResource.ResourceType), nameof(id)); + } + + /// + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// 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 applicationInstanceName, SapApplicationServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, data, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new SapApplicationServerInstanceOperationSource(Client), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// 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 applicationInstanceName, SapApplicationServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, data, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new SapApplicationServerInstanceOperationSource(Client), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance 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 applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.Get"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.Get"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapApplicationServerInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapApplicationServerInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapApplicationServerInstanceResource(Client, SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(e)), _sapApplicationServerInstanceClientDiagnostics, Pipeline, "SapApplicationServerInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapApplicationServerInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapApplicationServerInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapApplicationServerInstanceResource(Client, SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(e)), _sapApplicationServerInstanceClientDiagnostics, Pipeline, "SapApplicationServerInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance 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 applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.Exists"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, 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.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.Exists"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.Serialization.cs new file mode 100644 index 000000000000..d542f27c894e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapApplicationServerInstanceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerInstanceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + SapApplicationServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerInstanceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapApplicationServerInstanceData(document.RootElement, options); + } + + internal static SapApplicationServerInstanceData DeserializeSapApplicationServerInstanceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapApplicationServerProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SapApplicationServerProperties.DeserializeSapApplicationServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + 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"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapApplicationServerInstanceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapApplicationServerInstanceData)} does not support writing '{options.Format}' format."); + } + } + + SapApplicationServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapApplicationServerInstanceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapApplicationServerInstanceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.cs new file mode 100644 index 000000000000..cbf2c3802f58 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing the SapApplicationServerInstance data model. + /// Define the SAP Application Server Instance resource. + /// + public partial class SapApplicationServerInstanceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public SapApplicationServerInstanceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal SapApplicationServerInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SapApplicationServerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapApplicationServerInstanceData() + { + } + + /// The resource-specific properties for this resource. + public SapApplicationServerProperties Properties { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.Serialization.cs new file mode 100644 index 000000000000..8949a7b78c7b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapApplicationServerInstanceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SapApplicationServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SapApplicationServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.cs new file mode 100644 index 000000000000..09a7cb6fbf68 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.cs @@ -0,0 +1,871 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A Class representing a SapApplicationServerInstance 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 GetSapApplicationServerInstanceResource method. + /// Otherwise you can get one from its parent resource using the GetSapApplicationServerInstance method. + /// + public partial class SapApplicationServerInstanceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The sapVirtualInstanceName. + /// The applicationInstanceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sapApplicationServerInstanceClientDiagnostics; + private readonly SapApplicationServerInstancesRestOperations _sapApplicationServerInstanceRestClient; + private readonly SapApplicationServerInstanceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Workloads/sapVirtualInstances/applicationInstances"; + + /// Initializes a new instance of the class for mocking. + protected SapApplicationServerInstanceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SapApplicationServerInstanceResource(ArmClient client, SapApplicationServerInstanceData 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 SapApplicationServerInstanceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapApplicationServerInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sapApplicationServerInstanceApiVersion); + _sapApplicationServerInstanceRestClient = new SapApplicationServerInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapApplicationServerInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 SapApplicationServerInstanceData 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 the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Get"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.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 SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Get"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Delete"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(_sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Delete"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(_sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Puts the SAP Application Server Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(SapApplicationServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Update"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Puts the SAP Application Server Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// is null. + public virtual Response Update(SapApplicationServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Update"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/start + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// SAP Application server instance start request body. + /// The cancellation token to use. + public virtual async Task> StartAsync(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Start"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/start + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// SAP Application server instance start request body. + /// The cancellation token to use. + public virtual ArmOperation Start(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Start"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/stop + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// SAP Application server instance stop request body. + /// The cancellation token to use. + public virtual async Task> StopAsync(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Stop"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/stop + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// SAP Application server instance stop request body. + /// The cancellation token to use. + public virtual ArmOperation Stop(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Stop"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + 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.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + 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.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + 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 = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceCollection.cs new file mode 100644 index 000000000000..f4720665bca6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// 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 GetSapCentralServerInstances method from an instance of . + /// + public partial class SapCentralServerInstanceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _sapCentralServerInstanceClientDiagnostics; + private readonly SapCentralServerInstancesRestOperations _sapCentralServerInstanceRestClient; + + /// Initializes a new instance of the class for mocking. + protected SapCentralServerInstanceCollection() + { + } + + /// 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 SapCentralServerInstanceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapCentralServerInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", SapCentralServerInstanceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SapCentralServerInstanceResource.ResourceType, out string sapCentralServerInstanceApiVersion); + _sapCentralServerInstanceRestClient = new SapCentralServerInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapCentralServerInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SapVirtualInstanceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SapVirtualInstanceResource.ResourceType), nameof(id)); + } + + /// + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. + /// 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 centralInstanceName, SapCentralServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, data, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new SapCentralServerInstanceOperationSource(Client), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. + /// 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 centralInstanceName, SapCentralServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, data, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new SapCentralServerInstanceOperationSource(Client), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.Get"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.Get"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances + /// + /// + /// Operation Id + /// SAPCentralServerInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapCentralServerInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapCentralServerInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapCentralServerInstanceResource(Client, SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(e)), _sapCentralServerInstanceClientDiagnostics, Pipeline, "SapCentralServerInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances + /// + /// + /// Operation Id + /// SAPCentralServerInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapCentralServerInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapCentralServerInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapCentralServerInstanceResource(Client, SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(e)), _sapCentralServerInstanceClientDiagnostics, Pipeline, "SapCentralServerInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.Exists"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, 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.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.Exists"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.Serialization.cs new file mode 100644 index 000000000000..05a4d380f634 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapCentralServerInstanceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerInstanceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + SapCentralServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerInstanceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapCentralServerInstanceData(document.RootElement, options); + } + + internal static SapCentralServerInstanceData DeserializeSapCentralServerInstanceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapCentralServerProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SapCentralServerProperties.DeserializeSapCentralServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + 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"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapCentralServerInstanceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapCentralServerInstanceData)} does not support writing '{options.Format}' format."); + } + } + + SapCentralServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapCentralServerInstanceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapCentralServerInstanceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.cs new file mode 100644 index 000000000000..e2b64daf7eee --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing the SapCentralServerInstance data model. + /// Define the SAP Central Services Instance resource. + /// + public partial class SapCentralServerInstanceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public SapCentralServerInstanceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal SapCentralServerInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SapCentralServerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapCentralServerInstanceData() + { + } + + /// The resource-specific properties for this resource. + public SapCentralServerProperties Properties { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.Serialization.cs new file mode 100644 index 000000000000..b133bd8eceef --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapCentralServerInstanceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SapCentralServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SapCentralServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.cs new file mode 100644 index 000000000000..80e3337f1da6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.cs @@ -0,0 +1,871 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A Class representing a SapCentralServerInstance 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 GetSapCentralServerInstanceResource method. + /// Otherwise you can get one from its parent resource using the GetSapCentralServerInstance method. + /// + public partial class SapCentralServerInstanceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The sapVirtualInstanceName. + /// The centralInstanceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sapCentralServerInstanceClientDiagnostics; + private readonly SapCentralServerInstancesRestOperations _sapCentralServerInstanceRestClient; + private readonly SapCentralServerInstanceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Workloads/sapVirtualInstances/centralInstances"; + + /// Initializes a new instance of the class for mocking. + protected SapCentralServerInstanceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SapCentralServerInstanceResource(ArmClient client, SapCentralServerInstanceData 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 SapCentralServerInstanceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapCentralServerInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sapCentralServerInstanceApiVersion); + _sapCentralServerInstanceRestClient = new SapCentralServerInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapCentralServerInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 SapCentralServerInstanceData 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 the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Get"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.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 SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Get"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Delete"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(_sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Delete"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(_sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The SAP Central Services Instance resource request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(SapCentralServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Update"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The SAP Central Services Instance resource request body. + /// The cancellation token to use. + /// is null. + public virtual Response Update(SapCentralServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Update"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/start + /// + /// + /// Operation Id + /// SAPCentralServerInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// SAP Central Services instance start request body. + /// The cancellation token to use. + public virtual async Task> StartAsync(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Start"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/start + /// + /// + /// Operation Id + /// SAPCentralServerInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// SAP Central Services instance start request body. + /// The cancellation token to use. + public virtual ArmOperation Start(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Start"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/stop + /// + /// + /// Operation Id + /// SAPCentralServerInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// SAP Central Services instance stop request body. + /// The cancellation token to use. + public virtual async Task> StopAsync(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Stop"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/stop + /// + /// + /// Operation Id + /// SAPCentralServerInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// SAP Central Services instance stop request body. + /// The cancellation token to use. + public virtual ArmOperation Stop(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Stop"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapCentralServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapCentralServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + 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.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapCentralServerInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + 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.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + 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 = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapCentralServerInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapCentralServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapCentralServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceCollection.cs new file mode 100644 index 000000000000..838f24961510 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// 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 GetSapDatabaseInstances method from an instance of . + /// + public partial class SapDatabaseInstanceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _sapDatabaseInstanceClientDiagnostics; + private readonly SapDatabaseInstancesRestOperations _sapDatabaseInstanceRestClient; + + /// Initializes a new instance of the class for mocking. + protected SapDatabaseInstanceCollection() + { + } + + /// 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 SapDatabaseInstanceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapDatabaseInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", SapDatabaseInstanceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SapDatabaseInstanceResource.ResourceType, out string sapDatabaseInstanceApiVersion); + _sapDatabaseInstanceRestClient = new SapDatabaseInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapDatabaseInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SapVirtualInstanceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SapVirtualInstanceResource.ResourceType), nameof(id)); + } + + /// + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. + /// 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 databaseInstanceName, SapDatabaseInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, data, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new SapDatabaseInstanceOperationSource(Client), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. + /// 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 databaseInstanceName, SapDatabaseInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, data, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new SapDatabaseInstanceOperationSource(Client), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.Get"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.Get"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances + /// + /// + /// Operation Id + /// SAPDatabaseInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapDatabaseInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapDatabaseInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapDatabaseInstanceResource(Client, SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(e)), _sapDatabaseInstanceClientDiagnostics, Pipeline, "SapDatabaseInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances + /// + /// + /// Operation Id + /// SAPDatabaseInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapDatabaseInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapDatabaseInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapDatabaseInstanceResource(Client, SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(e)), _sapDatabaseInstanceClientDiagnostics, Pipeline, "SapDatabaseInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.Exists"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, 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.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.Exists"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.Serialization.cs new file mode 100644 index 000000000000..aabec700b433 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapDatabaseInstanceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseInstanceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + SapDatabaseInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseInstanceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDatabaseInstanceData(document.RootElement, options); + } + + internal static SapDatabaseInstanceData DeserializeSapDatabaseInstanceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapDatabaseProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SapDatabaseProperties.DeserializeSapDatabaseProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + 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"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDatabaseInstanceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDatabaseInstanceData)} does not support writing '{options.Format}' format."); + } + } + + SapDatabaseInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapDatabaseInstanceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDatabaseInstanceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.cs new file mode 100644 index 000000000000..2a7a52a0a861 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing the SapDatabaseInstance data model. + /// Define the Database resource. + /// + public partial class SapDatabaseInstanceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public SapDatabaseInstanceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal SapDatabaseInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SapDatabaseProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapDatabaseInstanceData() + { + } + + /// The resource-specific properties for this resource. + public SapDatabaseProperties Properties { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.Serialization.cs new file mode 100644 index 000000000000..7dea59643721 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapDatabaseInstanceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SapDatabaseInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SapDatabaseInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.cs new file mode 100644 index 000000000000..7143c285d63a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.cs @@ -0,0 +1,871 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A Class representing a SapDatabaseInstance 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 GetSapDatabaseInstanceResource method. + /// Otherwise you can get one from its parent resource using the GetSapDatabaseInstance method. + /// + public partial class SapDatabaseInstanceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The sapVirtualInstanceName. + /// The databaseInstanceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sapDatabaseInstanceClientDiagnostics; + private readonly SapDatabaseInstancesRestOperations _sapDatabaseInstanceRestClient; + private readonly SapDatabaseInstanceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Workloads/sapVirtualInstances/databaseInstances"; + + /// Initializes a new instance of the class for mocking. + protected SapDatabaseInstanceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SapDatabaseInstanceResource(ArmClient client, SapDatabaseInstanceData 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 SapDatabaseInstanceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapDatabaseInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sapDatabaseInstanceApiVersion); + _sapDatabaseInstanceRestClient = new SapDatabaseInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapDatabaseInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 SapDatabaseInstanceData 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 the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Get"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.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 SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Get"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Delete"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(_sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Delete"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(_sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the Database resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource update request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(SapDatabaseInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Update"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the Database resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource update request body. + /// The cancellation token to use. + /// is null. + public virtual Response Update(SapDatabaseInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Update"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/start + /// + /// + /// Operation Id + /// SAPDatabaseInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// SAP Database server instance start request body. + /// The cancellation token to use. + public virtual async Task> StartAsync(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Start"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/start + /// + /// + /// Operation Id + /// SAPDatabaseInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// SAP Database server instance start request body. + /// The cancellation token to use. + public virtual ArmOperation Start(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Start"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/stop + /// + /// + /// Operation Id + /// SAPDatabaseInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Stop request for the database instance of the SAP system. + /// The cancellation token to use. + public virtual async Task> StopAsync(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Stop"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/stop + /// + /// + /// Operation Id + /// SAPDatabaseInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Stop request for the database instance of the SAP system. + /// The cancellation token to use. + public virtual ArmOperation Stop(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Stop"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapDatabaseInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapDatabaseInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + 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.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapDatabaseInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + 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.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + 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 = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapDatabaseInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapDatabaseInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapDatabaseInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceCollection.cs new file mode 100644 index 000000000000..5544653d0006 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// 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 GetSapVirtualInstances method from an instance of . + /// + public partial class SapVirtualInstanceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _sapVirtualInstanceClientDiagnostics; + private readonly SapVirtualInstancesRestOperations _sapVirtualInstanceRestClient; + + /// Initializes a new instance of the class for mocking. + protected SapVirtualInstanceCollection() + { + } + + /// 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 SapVirtualInstanceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapVirtualInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", SapVirtualInstanceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SapVirtualInstanceResource.ResourceType, out string sapVirtualInstanceApiVersion); + _sapVirtualInstanceRestClient = new SapVirtualInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapVirtualInstanceApiVersion); +#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)); + } + + /// + /// Creates a Virtual Instance for SAP solutions (VIS) resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. + /// 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 sapVirtualInstanceName, SapVirtualInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, data, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new SapVirtualInstanceOperationSource(Client), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a Virtual Instance for SAP solutions (VIS) resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. + /// 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 sapVirtualInstanceName, SapVirtualInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, data, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new SapVirtualInstanceOperationSource(Client), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.Get"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.Get"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapVirtualInstanceRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapVirtualInstanceRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapVirtualInstanceResource(Client, SapVirtualInstanceData.DeserializeSapVirtualInstanceData(e)), _sapVirtualInstanceClientDiagnostics, Pipeline, "SapVirtualInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapVirtualInstanceRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapVirtualInstanceRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapVirtualInstanceResource(Client, SapVirtualInstanceData.DeserializeSapVirtualInstanceData(e)), _sapVirtualInstanceClientDiagnostics, Pipeline, "SapVirtualInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions 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 sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.Exists"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, 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.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.Exists"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.Serialization.cs new file mode 100644 index 000000000000..8bceae591aef --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.Serialization.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapVirtualInstanceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + } + + SapVirtualInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapVirtualInstanceData(document.RootElement, options); + } + + internal static SapVirtualInstanceData DeserializeSapVirtualInstanceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapVirtualInstanceProperties properties = default; + SAPVirtualInstanceIdentity identity = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SapVirtualInstanceProperties.DeserializeSapVirtualInstanceProperties(property.Value, options); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = SAPVirtualInstanceIdentity.DeserializeSAPVirtualInstanceIdentity(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + 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"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapVirtualInstanceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + identity, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceData)} does not support writing '{options.Format}' format."); + } + } + + SapVirtualInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapVirtualInstanceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.cs new file mode 100644 index 000000000000..23effb8e55dd --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing the SapVirtualInstance data model. + /// Define the Virtual Instance for SAP solutions resource. + /// + public partial class SapVirtualInstanceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public SapVirtualInstanceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// Keeps track of any properties unknown to the library. + internal SapVirtualInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SapVirtualInstanceProperties properties, SAPVirtualInstanceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapVirtualInstanceData() + { + } + + /// The resource-specific properties for this resource. + public SapVirtualInstanceProperties Properties { get; set; } + /// The managed service identities assigned to this resource. + public SAPVirtualInstanceIdentity Identity { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.Serialization.cs new file mode 100644 index 000000000000..bb21a27aa9a0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapVirtualInstanceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SapVirtualInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SapVirtualInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.cs new file mode 100644 index 000000000000..7880898f8e6a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.cs @@ -0,0 +1,1086 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A Class representing a SapVirtualInstance 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 GetSapVirtualInstanceResource method. + /// Otherwise you can get one from its parent resource using the GetSapVirtualInstance method. + /// + public partial class SapVirtualInstanceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The sapVirtualInstanceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sapVirtualInstanceClientDiagnostics; + private readonly SapVirtualInstancesRestOperations _sapVirtualInstanceRestClient; + private readonly SapVirtualInstanceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Workloads/sapVirtualInstances"; + + /// Initializes a new instance of the class for mocking. + protected SapVirtualInstanceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SapVirtualInstanceResource(ArmClient client, SapVirtualInstanceData 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 SapVirtualInstanceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapVirtualInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sapVirtualInstanceApiVersion); + _sapVirtualInstanceRestClient = new SapVirtualInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapVirtualInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// 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 SapVirtualInstanceData 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 SapCentralServerInstanceResources in the SapVirtualInstance. + /// An object representing collection of SapCentralServerInstanceResources and their operations over a SapCentralServerInstanceResource. + public virtual SapCentralServerInstanceCollection GetSapCentralServerInstances() + { + return GetCachedClient(client => new SapCentralServerInstanceCollection(client, Id)); + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSapCentralServerInstanceAsync(string centralInstanceName, CancellationToken cancellationToken = default) + { + return await GetSapCentralServerInstances().GetAsync(centralInstanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSapCentralServerInstance(string centralInstanceName, CancellationToken cancellationToken = default) + { + return GetSapCentralServerInstances().Get(centralInstanceName, cancellationToken); + } + + /// Gets a collection of SapDatabaseInstanceResources in the SapVirtualInstance. + /// An object representing collection of SapDatabaseInstanceResources and their operations over a SapDatabaseInstanceResource. + public virtual SapDatabaseInstanceCollection GetSapDatabaseInstances() + { + return GetCachedClient(client => new SapDatabaseInstanceCollection(client, Id)); + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSapDatabaseInstanceAsync(string databaseInstanceName, CancellationToken cancellationToken = default) + { + return await GetSapDatabaseInstances().GetAsync(databaseInstanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSapDatabaseInstance(string databaseInstanceName, CancellationToken cancellationToken = default) + { + return GetSapDatabaseInstances().Get(databaseInstanceName, cancellationToken); + } + + /// Gets a collection of SapApplicationServerInstanceResources in the SapVirtualInstance. + /// An object representing collection of SapApplicationServerInstanceResources and their operations over a SapApplicationServerInstanceResource. + public virtual SapApplicationServerInstanceCollection GetSapApplicationServerInstances() + { + return GetCachedClient(client => new SapApplicationServerInstanceCollection(client, Id)); + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSapApplicationServerInstanceAsync(string applicationInstanceName, CancellationToken cancellationToken = default) + { + return await GetSapApplicationServerInstances().GetAsync(applicationInstanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSapApplicationServerInstance(string applicationInstanceName, CancellationToken cancellationToken = default) + { + return GetSapApplicationServerInstances().Get(applicationInstanceName, cancellationToken); + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Get"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Get"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Delete"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(_sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Delete"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(_sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Request body to update a Virtual Instance for SAP solutions resource. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SapVirtualInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Update"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new SapVirtualInstanceOperationSource(Client), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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. + /// Request body to update a Virtual Instance for SAP solutions resource. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SapVirtualInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Update"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new SapVirtualInstanceOperationSource(Client), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP application, that is the Central Services instance and Application server instances. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/start + /// + /// + /// Operation Id + /// SAPVirtualInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 Virtual Instance for SAP solutions resource start request body. + /// The cancellation token to use. + public virtual async Task> StartAsync(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Start"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP application, that is the Central Services instance and Application server instances. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/start + /// + /// + /// Operation Id + /// SAPVirtualInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 Virtual Instance for SAP solutions resource start request body. + /// The cancellation token to use. + public virtual ArmOperation Start(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Start"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Application, that is the Application server instances and Central Services instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/stop + /// + /// + /// Operation Id + /// SAPVirtualInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 Virtual Instance for SAP solutions resource stop request body. + /// The cancellation token to use. + public virtual async Task> StopAsync(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Stop"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Application, that is the Application server instances and Central Services instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/stop + /// + /// + /// Operation Id + /// SAPVirtualInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 Virtual Instance for SAP solutions resource stop request body. + /// The cancellation token to use. + public virtual ArmOperation Stop(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Stop"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapVirtualInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapVirtualInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.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.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapVirtualInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.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.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + 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 = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapVirtualInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + 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 _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapVirtualInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// 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 = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapVirtualInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Properties/AssemblyInfo.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..bd4bf19bb2e8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.SapVirtualInstances.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("SapVirtualInstances")] diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/Azure.ResourceManager.SapVirtualInstances.Tests.csproj b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/Azure.ResourceManager.SapVirtualInstances.Tests.csproj new file mode 100644 index 000000000000..7fdacf298294 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/Azure.ResourceManager.SapVirtualInstances.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/SapVirtualInstancesManagementTestBase.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/SapVirtualInstancesManagementTestBase.cs new file mode 100644 index 000000000000..9197b1df6841 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/SapVirtualInstancesManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.SapVirtualInstances.Tests +{ + public class SapVirtualInstancesManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected SapVirtualInstancesManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected SapVirtualInstancesManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/SapVirtualInstancesManagementTestEnvironment.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/SapVirtualInstancesManagementTestEnvironment.cs new file mode 100644 index 000000000000..8ffa2df9862e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/SapVirtualInstancesManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.SapVirtualInstances.Tests +{ + public class SapVirtualInstancesManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tsp-location.yaml b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tsp-location.yaml new file mode 100644 index 000000000000..b83bf7722d06 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/workloads/Workloads.SAPVirtualInstance.Management +commit: 8f6744026f8f69f599f4713dadf1109f04e23a31 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/workloadssapvirtualinstance/ci.mgmt.yml b/sdk/workloadssapvirtualinstance/ci.mgmt.yml new file mode 100644 index 000000000000..a90c11972d53 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/ci.mgmt.yml @@ -0,0 +1,26 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/workloadssapvirtualinstance /ci.mgmt.yml + - sdk/workloadssapvirtualinstance /Azure.ResourceManager.SapVirtualInstances / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: workloadssapvirtualinstance + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.SapVirtualInstances + safeName: AzureResourceManagerSapVirtualInstances